github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/extensions/v1beta1/ingressPatch.go (about) 1 // Code generated by pulumigen DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package v1beta1 5 6 import ( 7 "context" 8 "reflect" 9 10 metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Patch resources are used to modify existing Kubernetes resources by using 15 // Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than 16 // one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource. 17 // Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the 18 // [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for 19 // additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi. 20 // Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. 21 // 22 // This resource waits until its status is ready before registering success 23 // for create/update, and populating output properties from the current state of the resource. 24 // The following conditions are used to determine whether the resource creation has 25 // succeeded or failed: 26 // 27 // 1. Ingress object exists. 28 // 2. Endpoint objects exist with matching names for each Ingress path (except when Service 29 // type is ExternalName). 30 // 3. Ingress entry exists for '.status.loadBalancer.ingress'. 31 // 32 // If the Ingress has not reached a Ready state after 10 minutes, it will 33 // time out and mark the resource update as Failed. You can override the default timeout value 34 // by setting the 'customTimeouts' option on the resource. 35 // 36 // Deprecated: extensions/v1beta1/Ingress is deprecated by networking.k8s.io/v1beta1/Ingress and not supported by Kubernetes v1.20+ clusters. 37 type IngressPatch struct { 38 pulumi.CustomResourceState 39 40 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 41 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 42 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 43 Kind pulumi.StringPtrOutput `pulumi:"kind"` 44 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 45 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 46 // Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 47 Spec IngressSpecPatchPtrOutput `pulumi:"spec"` 48 // Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 49 Status IngressStatusPatchPtrOutput `pulumi:"status"` 50 } 51 52 // NewIngressPatch registers a new resource with the given unique name, arguments, and options. 53 func NewIngressPatch(ctx *pulumi.Context, 54 name string, args *IngressPatchArgs, opts ...pulumi.ResourceOption) (*IngressPatch, error) { 55 if args == nil { 56 args = &IngressPatchArgs{} 57 } 58 59 args.ApiVersion = pulumi.StringPtr("extensions/v1beta1") 60 args.Kind = pulumi.StringPtr("Ingress") 61 aliases := pulumi.Aliases([]pulumi.Alias{ 62 { 63 Type: pulumi.String("kubernetes:networking.k8s.io/v1:IngressPatch"), 64 }, 65 { 66 Type: pulumi.String("kubernetes:networking.k8s.io/v1beta1:IngressPatch"), 67 }, 68 }) 69 opts = append(opts, aliases) 70 var resource IngressPatch 71 err := ctx.RegisterResource("kubernetes:extensions/v1beta1:IngressPatch", name, args, &resource, opts...) 72 if err != nil { 73 return nil, err 74 } 75 return &resource, nil 76 } 77 78 // GetIngressPatch gets an existing IngressPatch resource's state with the given name, ID, and optional 79 // state properties that are used to uniquely qualify the lookup (nil if not required). 80 func GetIngressPatch(ctx *pulumi.Context, 81 name string, id pulumi.IDInput, state *IngressPatchState, opts ...pulumi.ResourceOption) (*IngressPatch, error) { 82 var resource IngressPatch 83 err := ctx.ReadResource("kubernetes:extensions/v1beta1:IngressPatch", name, id, state, &resource, opts...) 84 if err != nil { 85 return nil, err 86 } 87 return &resource, nil 88 } 89 90 // Input properties used for looking up and filtering IngressPatch resources. 91 type ingressPatchState struct { 92 } 93 94 type IngressPatchState struct { 95 } 96 97 func (IngressPatchState) ElementType() reflect.Type { 98 return reflect.TypeOf((*ingressPatchState)(nil)).Elem() 99 } 100 101 type ingressPatchArgs struct { 102 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 103 ApiVersion *string `pulumi:"apiVersion"` 104 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 105 Kind *string `pulumi:"kind"` 106 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 107 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 108 // Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 109 Spec *IngressSpecPatch `pulumi:"spec"` 110 } 111 112 // The set of arguments for constructing a IngressPatch resource. 113 type IngressPatchArgs struct { 114 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 115 ApiVersion pulumi.StringPtrInput 116 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 117 Kind pulumi.StringPtrInput 118 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 119 Metadata metav1.ObjectMetaPatchPtrInput 120 // Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 121 Spec IngressSpecPatchPtrInput 122 } 123 124 func (IngressPatchArgs) ElementType() reflect.Type { 125 return reflect.TypeOf((*ingressPatchArgs)(nil)).Elem() 126 } 127 128 type IngressPatchInput interface { 129 pulumi.Input 130 131 ToIngressPatchOutput() IngressPatchOutput 132 ToIngressPatchOutputWithContext(ctx context.Context) IngressPatchOutput 133 } 134 135 func (*IngressPatch) ElementType() reflect.Type { 136 return reflect.TypeOf((**IngressPatch)(nil)).Elem() 137 } 138 139 func (i *IngressPatch) ToIngressPatchOutput() IngressPatchOutput { 140 return i.ToIngressPatchOutputWithContext(context.Background()) 141 } 142 143 func (i *IngressPatch) ToIngressPatchOutputWithContext(ctx context.Context) IngressPatchOutput { 144 return pulumi.ToOutputWithContext(ctx, i).(IngressPatchOutput) 145 } 146 147 // IngressPatchArrayInput is an input type that accepts IngressPatchArray and IngressPatchArrayOutput values. 148 // You can construct a concrete instance of `IngressPatchArrayInput` via: 149 // 150 // IngressPatchArray{ IngressPatchArgs{...} } 151 type IngressPatchArrayInput interface { 152 pulumi.Input 153 154 ToIngressPatchArrayOutput() IngressPatchArrayOutput 155 ToIngressPatchArrayOutputWithContext(context.Context) IngressPatchArrayOutput 156 } 157 158 type IngressPatchArray []IngressPatchInput 159 160 func (IngressPatchArray) ElementType() reflect.Type { 161 return reflect.TypeOf((*[]*IngressPatch)(nil)).Elem() 162 } 163 164 func (i IngressPatchArray) ToIngressPatchArrayOutput() IngressPatchArrayOutput { 165 return i.ToIngressPatchArrayOutputWithContext(context.Background()) 166 } 167 168 func (i IngressPatchArray) ToIngressPatchArrayOutputWithContext(ctx context.Context) IngressPatchArrayOutput { 169 return pulumi.ToOutputWithContext(ctx, i).(IngressPatchArrayOutput) 170 } 171 172 // IngressPatchMapInput is an input type that accepts IngressPatchMap and IngressPatchMapOutput values. 173 // You can construct a concrete instance of `IngressPatchMapInput` via: 174 // 175 // IngressPatchMap{ "key": IngressPatchArgs{...} } 176 type IngressPatchMapInput interface { 177 pulumi.Input 178 179 ToIngressPatchMapOutput() IngressPatchMapOutput 180 ToIngressPatchMapOutputWithContext(context.Context) IngressPatchMapOutput 181 } 182 183 type IngressPatchMap map[string]IngressPatchInput 184 185 func (IngressPatchMap) ElementType() reflect.Type { 186 return reflect.TypeOf((*map[string]*IngressPatch)(nil)).Elem() 187 } 188 189 func (i IngressPatchMap) ToIngressPatchMapOutput() IngressPatchMapOutput { 190 return i.ToIngressPatchMapOutputWithContext(context.Background()) 191 } 192 193 func (i IngressPatchMap) ToIngressPatchMapOutputWithContext(ctx context.Context) IngressPatchMapOutput { 194 return pulumi.ToOutputWithContext(ctx, i).(IngressPatchMapOutput) 195 } 196 197 type IngressPatchOutput struct{ *pulumi.OutputState } 198 199 func (IngressPatchOutput) ElementType() reflect.Type { 200 return reflect.TypeOf((**IngressPatch)(nil)).Elem() 201 } 202 203 func (o IngressPatchOutput) ToIngressPatchOutput() IngressPatchOutput { 204 return o 205 } 206 207 func (o IngressPatchOutput) ToIngressPatchOutputWithContext(ctx context.Context) IngressPatchOutput { 208 return o 209 } 210 211 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 212 func (o IngressPatchOutput) ApiVersion() pulumi.StringPtrOutput { 213 return o.ApplyT(func(v *IngressPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 214 } 215 216 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 217 func (o IngressPatchOutput) Kind() pulumi.StringPtrOutput { 218 return o.ApplyT(func(v *IngressPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 219 } 220 221 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 222 func (o IngressPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 223 return o.ApplyT(func(v *IngressPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 224 } 225 226 // Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 227 func (o IngressPatchOutput) Spec() IngressSpecPatchPtrOutput { 228 return o.ApplyT(func(v *IngressPatch) IngressSpecPatchPtrOutput { return v.Spec }).(IngressSpecPatchPtrOutput) 229 } 230 231 // Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 232 func (o IngressPatchOutput) Status() IngressStatusPatchPtrOutput { 233 return o.ApplyT(func(v *IngressPatch) IngressStatusPatchPtrOutput { return v.Status }).(IngressStatusPatchPtrOutput) 234 } 235 236 type IngressPatchArrayOutput struct{ *pulumi.OutputState } 237 238 func (IngressPatchArrayOutput) ElementType() reflect.Type { 239 return reflect.TypeOf((*[]*IngressPatch)(nil)).Elem() 240 } 241 242 func (o IngressPatchArrayOutput) ToIngressPatchArrayOutput() IngressPatchArrayOutput { 243 return o 244 } 245 246 func (o IngressPatchArrayOutput) ToIngressPatchArrayOutputWithContext(ctx context.Context) IngressPatchArrayOutput { 247 return o 248 } 249 250 func (o IngressPatchArrayOutput) Index(i pulumi.IntInput) IngressPatchOutput { 251 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IngressPatch { 252 return vs[0].([]*IngressPatch)[vs[1].(int)] 253 }).(IngressPatchOutput) 254 } 255 256 type IngressPatchMapOutput struct{ *pulumi.OutputState } 257 258 func (IngressPatchMapOutput) ElementType() reflect.Type { 259 return reflect.TypeOf((*map[string]*IngressPatch)(nil)).Elem() 260 } 261 262 func (o IngressPatchMapOutput) ToIngressPatchMapOutput() IngressPatchMapOutput { 263 return o 264 } 265 266 func (o IngressPatchMapOutput) ToIngressPatchMapOutputWithContext(ctx context.Context) IngressPatchMapOutput { 267 return o 268 } 269 270 func (o IngressPatchMapOutput) MapIndex(k pulumi.StringInput) IngressPatchOutput { 271 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IngressPatch { 272 return vs[0].(map[string]*IngressPatch)[vs[1].(string)] 273 }).(IngressPatchOutput) 274 } 275 276 func init() { 277 pulumi.RegisterInputType(reflect.TypeOf((*IngressPatchInput)(nil)).Elem(), &IngressPatch{}) 278 pulumi.RegisterInputType(reflect.TypeOf((*IngressPatchArrayInput)(nil)).Elem(), IngressPatchArray{}) 279 pulumi.RegisterInputType(reflect.TypeOf((*IngressPatchMapInput)(nil)).Elem(), IngressPatchMap{}) 280 pulumi.RegisterOutputType(IngressPatchOutput{}) 281 pulumi.RegisterOutputType(IngressPatchArrayOutput{}) 282 pulumi.RegisterOutputType(IngressPatchMapOutput{}) 283 }