github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/node/v1alpha1/runtimeClassPatch.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 v1alpha1 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 // RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md 21 type RuntimeClassPatch struct { 22 pulumi.CustomResourceState 23 24 // 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 25 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 26 // 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 27 Kind pulumi.StringPtrOutput `pulumi:"kind"` 28 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 29 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 30 // Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 31 Spec RuntimeClassSpecPatchPtrOutput `pulumi:"spec"` 32 } 33 34 // NewRuntimeClassPatch registers a new resource with the given unique name, arguments, and options. 35 func NewRuntimeClassPatch(ctx *pulumi.Context, 36 name string, args *RuntimeClassPatchArgs, opts ...pulumi.ResourceOption) (*RuntimeClassPatch, error) { 37 if args == nil { 38 args = &RuntimeClassPatchArgs{} 39 } 40 41 args.ApiVersion = pulumi.StringPtr("node.k8s.io/v1alpha1") 42 args.Kind = pulumi.StringPtr("RuntimeClass") 43 aliases := pulumi.Aliases([]pulumi.Alias{ 44 { 45 Type: pulumi.String("kubernetes:node.k8s.io/v1:RuntimeClassPatch"), 46 }, 47 { 48 Type: pulumi.String("kubernetes:node.k8s.io/v1beta1:RuntimeClassPatch"), 49 }, 50 }) 51 opts = append(opts, aliases) 52 var resource RuntimeClassPatch 53 err := ctx.RegisterResource("kubernetes:node.k8s.io/v1alpha1:RuntimeClassPatch", name, args, &resource, opts...) 54 if err != nil { 55 return nil, err 56 } 57 return &resource, nil 58 } 59 60 // GetRuntimeClassPatch gets an existing RuntimeClassPatch resource's state with the given name, ID, and optional 61 // state properties that are used to uniquely qualify the lookup (nil if not required). 62 func GetRuntimeClassPatch(ctx *pulumi.Context, 63 name string, id pulumi.IDInput, state *RuntimeClassPatchState, opts ...pulumi.ResourceOption) (*RuntimeClassPatch, error) { 64 var resource RuntimeClassPatch 65 err := ctx.ReadResource("kubernetes:node.k8s.io/v1alpha1:RuntimeClassPatch", name, id, state, &resource, opts...) 66 if err != nil { 67 return nil, err 68 } 69 return &resource, nil 70 } 71 72 // Input properties used for looking up and filtering RuntimeClassPatch resources. 73 type runtimeClassPatchState struct { 74 } 75 76 type RuntimeClassPatchState struct { 77 } 78 79 func (RuntimeClassPatchState) ElementType() reflect.Type { 80 return reflect.TypeOf((*runtimeClassPatchState)(nil)).Elem() 81 } 82 83 type runtimeClassPatchArgs struct { 84 // 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 85 ApiVersion *string `pulumi:"apiVersion"` 86 // 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 87 Kind *string `pulumi:"kind"` 88 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 89 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 90 // Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 91 Spec *RuntimeClassSpecPatch `pulumi:"spec"` 92 } 93 94 // The set of arguments for constructing a RuntimeClassPatch resource. 95 type RuntimeClassPatchArgs struct { 96 // 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 97 ApiVersion pulumi.StringPtrInput 98 // 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 99 Kind pulumi.StringPtrInput 100 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 101 Metadata metav1.ObjectMetaPatchPtrInput 102 // Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 103 Spec RuntimeClassSpecPatchPtrInput 104 } 105 106 func (RuntimeClassPatchArgs) ElementType() reflect.Type { 107 return reflect.TypeOf((*runtimeClassPatchArgs)(nil)).Elem() 108 } 109 110 type RuntimeClassPatchInput interface { 111 pulumi.Input 112 113 ToRuntimeClassPatchOutput() RuntimeClassPatchOutput 114 ToRuntimeClassPatchOutputWithContext(ctx context.Context) RuntimeClassPatchOutput 115 } 116 117 func (*RuntimeClassPatch) ElementType() reflect.Type { 118 return reflect.TypeOf((**RuntimeClassPatch)(nil)).Elem() 119 } 120 121 func (i *RuntimeClassPatch) ToRuntimeClassPatchOutput() RuntimeClassPatchOutput { 122 return i.ToRuntimeClassPatchOutputWithContext(context.Background()) 123 } 124 125 func (i *RuntimeClassPatch) ToRuntimeClassPatchOutputWithContext(ctx context.Context) RuntimeClassPatchOutput { 126 return pulumi.ToOutputWithContext(ctx, i).(RuntimeClassPatchOutput) 127 } 128 129 // RuntimeClassPatchArrayInput is an input type that accepts RuntimeClassPatchArray and RuntimeClassPatchArrayOutput values. 130 // You can construct a concrete instance of `RuntimeClassPatchArrayInput` via: 131 // 132 // RuntimeClassPatchArray{ RuntimeClassPatchArgs{...} } 133 type RuntimeClassPatchArrayInput interface { 134 pulumi.Input 135 136 ToRuntimeClassPatchArrayOutput() RuntimeClassPatchArrayOutput 137 ToRuntimeClassPatchArrayOutputWithContext(context.Context) RuntimeClassPatchArrayOutput 138 } 139 140 type RuntimeClassPatchArray []RuntimeClassPatchInput 141 142 func (RuntimeClassPatchArray) ElementType() reflect.Type { 143 return reflect.TypeOf((*[]*RuntimeClassPatch)(nil)).Elem() 144 } 145 146 func (i RuntimeClassPatchArray) ToRuntimeClassPatchArrayOutput() RuntimeClassPatchArrayOutput { 147 return i.ToRuntimeClassPatchArrayOutputWithContext(context.Background()) 148 } 149 150 func (i RuntimeClassPatchArray) ToRuntimeClassPatchArrayOutputWithContext(ctx context.Context) RuntimeClassPatchArrayOutput { 151 return pulumi.ToOutputWithContext(ctx, i).(RuntimeClassPatchArrayOutput) 152 } 153 154 // RuntimeClassPatchMapInput is an input type that accepts RuntimeClassPatchMap and RuntimeClassPatchMapOutput values. 155 // You can construct a concrete instance of `RuntimeClassPatchMapInput` via: 156 // 157 // RuntimeClassPatchMap{ "key": RuntimeClassPatchArgs{...} } 158 type RuntimeClassPatchMapInput interface { 159 pulumi.Input 160 161 ToRuntimeClassPatchMapOutput() RuntimeClassPatchMapOutput 162 ToRuntimeClassPatchMapOutputWithContext(context.Context) RuntimeClassPatchMapOutput 163 } 164 165 type RuntimeClassPatchMap map[string]RuntimeClassPatchInput 166 167 func (RuntimeClassPatchMap) ElementType() reflect.Type { 168 return reflect.TypeOf((*map[string]*RuntimeClassPatch)(nil)).Elem() 169 } 170 171 func (i RuntimeClassPatchMap) ToRuntimeClassPatchMapOutput() RuntimeClassPatchMapOutput { 172 return i.ToRuntimeClassPatchMapOutputWithContext(context.Background()) 173 } 174 175 func (i RuntimeClassPatchMap) ToRuntimeClassPatchMapOutputWithContext(ctx context.Context) RuntimeClassPatchMapOutput { 176 return pulumi.ToOutputWithContext(ctx, i).(RuntimeClassPatchMapOutput) 177 } 178 179 type RuntimeClassPatchOutput struct{ *pulumi.OutputState } 180 181 func (RuntimeClassPatchOutput) ElementType() reflect.Type { 182 return reflect.TypeOf((**RuntimeClassPatch)(nil)).Elem() 183 } 184 185 func (o RuntimeClassPatchOutput) ToRuntimeClassPatchOutput() RuntimeClassPatchOutput { 186 return o 187 } 188 189 func (o RuntimeClassPatchOutput) ToRuntimeClassPatchOutputWithContext(ctx context.Context) RuntimeClassPatchOutput { 190 return o 191 } 192 193 // 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 194 func (o RuntimeClassPatchOutput) ApiVersion() pulumi.StringPtrOutput { 195 return o.ApplyT(func(v *RuntimeClassPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 196 } 197 198 // 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 199 func (o RuntimeClassPatchOutput) Kind() pulumi.StringPtrOutput { 200 return o.ApplyT(func(v *RuntimeClassPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 201 } 202 203 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 204 func (o RuntimeClassPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 205 return o.ApplyT(func(v *RuntimeClassPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 206 } 207 208 // Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 209 func (o RuntimeClassPatchOutput) Spec() RuntimeClassSpecPatchPtrOutput { 210 return o.ApplyT(func(v *RuntimeClassPatch) RuntimeClassSpecPatchPtrOutput { return v.Spec }).(RuntimeClassSpecPatchPtrOutput) 211 } 212 213 type RuntimeClassPatchArrayOutput struct{ *pulumi.OutputState } 214 215 func (RuntimeClassPatchArrayOutput) ElementType() reflect.Type { 216 return reflect.TypeOf((*[]*RuntimeClassPatch)(nil)).Elem() 217 } 218 219 func (o RuntimeClassPatchArrayOutput) ToRuntimeClassPatchArrayOutput() RuntimeClassPatchArrayOutput { 220 return o 221 } 222 223 func (o RuntimeClassPatchArrayOutput) ToRuntimeClassPatchArrayOutputWithContext(ctx context.Context) RuntimeClassPatchArrayOutput { 224 return o 225 } 226 227 func (o RuntimeClassPatchArrayOutput) Index(i pulumi.IntInput) RuntimeClassPatchOutput { 228 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RuntimeClassPatch { 229 return vs[0].([]*RuntimeClassPatch)[vs[1].(int)] 230 }).(RuntimeClassPatchOutput) 231 } 232 233 type RuntimeClassPatchMapOutput struct{ *pulumi.OutputState } 234 235 func (RuntimeClassPatchMapOutput) ElementType() reflect.Type { 236 return reflect.TypeOf((*map[string]*RuntimeClassPatch)(nil)).Elem() 237 } 238 239 func (o RuntimeClassPatchMapOutput) ToRuntimeClassPatchMapOutput() RuntimeClassPatchMapOutput { 240 return o 241 } 242 243 func (o RuntimeClassPatchMapOutput) ToRuntimeClassPatchMapOutputWithContext(ctx context.Context) RuntimeClassPatchMapOutput { 244 return o 245 } 246 247 func (o RuntimeClassPatchMapOutput) MapIndex(k pulumi.StringInput) RuntimeClassPatchOutput { 248 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RuntimeClassPatch { 249 return vs[0].(map[string]*RuntimeClassPatch)[vs[1].(string)] 250 }).(RuntimeClassPatchOutput) 251 } 252 253 func init() { 254 pulumi.RegisterInputType(reflect.TypeOf((*RuntimeClassPatchInput)(nil)).Elem(), &RuntimeClassPatch{}) 255 pulumi.RegisterInputType(reflect.TypeOf((*RuntimeClassPatchArrayInput)(nil)).Elem(), RuntimeClassPatchArray{}) 256 pulumi.RegisterInputType(reflect.TypeOf((*RuntimeClassPatchMapInput)(nil)).Elem(), RuntimeClassPatchMap{}) 257 pulumi.RegisterOutputType(RuntimeClassPatchOutput{}) 258 pulumi.RegisterOutputType(RuntimeClassPatchArrayOutput{}) 259 pulumi.RegisterOutputType(RuntimeClassPatchMapOutput{}) 260 }