github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/node/v1/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 v1 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 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://kubernetes.io/docs/concepts/containers/runtime-class/ 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 // handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable. 27 Handler pulumi.StringPtrOutput `pulumi:"handler"` 28 // 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 29 Kind pulumi.StringPtrOutput `pulumi:"kind"` 30 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 31 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 32 // overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see 33 // https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/ 34 Overhead OverheadPatchPtrOutput `pulumi:"overhead"` 35 // scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes. 36 Scheduling SchedulingPatchPtrOutput `pulumi:"scheduling"` 37 } 38 39 // NewRuntimeClassPatch registers a new resource with the given unique name, arguments, and options. 40 func NewRuntimeClassPatch(ctx *pulumi.Context, 41 name string, args *RuntimeClassPatchArgs, opts ...pulumi.ResourceOption) (*RuntimeClassPatch, error) { 42 if args == nil { 43 args = &RuntimeClassPatchArgs{} 44 } 45 46 args.ApiVersion = pulumi.StringPtr("node.k8s.io/v1") 47 args.Kind = pulumi.StringPtr("RuntimeClass") 48 aliases := pulumi.Aliases([]pulumi.Alias{ 49 { 50 Type: pulumi.String("kubernetes:node.k8s.io/v1alpha1:RuntimeClassPatch"), 51 }, 52 { 53 Type: pulumi.String("kubernetes:node.k8s.io/v1beta1:RuntimeClassPatch"), 54 }, 55 }) 56 opts = append(opts, aliases) 57 var resource RuntimeClassPatch 58 err := ctx.RegisterResource("kubernetes:node.k8s.io/v1:RuntimeClassPatch", name, args, &resource, opts...) 59 if err != nil { 60 return nil, err 61 } 62 return &resource, nil 63 } 64 65 // GetRuntimeClassPatch gets an existing RuntimeClassPatch resource's state with the given name, ID, and optional 66 // state properties that are used to uniquely qualify the lookup (nil if not required). 67 func GetRuntimeClassPatch(ctx *pulumi.Context, 68 name string, id pulumi.IDInput, state *RuntimeClassPatchState, opts ...pulumi.ResourceOption) (*RuntimeClassPatch, error) { 69 var resource RuntimeClassPatch 70 err := ctx.ReadResource("kubernetes:node.k8s.io/v1:RuntimeClassPatch", name, id, state, &resource, opts...) 71 if err != nil { 72 return nil, err 73 } 74 return &resource, nil 75 } 76 77 // Input properties used for looking up and filtering RuntimeClassPatch resources. 78 type runtimeClassPatchState struct { 79 } 80 81 type RuntimeClassPatchState struct { 82 } 83 84 func (RuntimeClassPatchState) ElementType() reflect.Type { 85 return reflect.TypeOf((*runtimeClassPatchState)(nil)).Elem() 86 } 87 88 type runtimeClassPatchArgs struct { 89 // 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 90 ApiVersion *string `pulumi:"apiVersion"` 91 // handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable. 92 Handler *string `pulumi:"handler"` 93 // 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 94 Kind *string `pulumi:"kind"` 95 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 96 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 97 // overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see 98 // https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/ 99 Overhead *OverheadPatch `pulumi:"overhead"` 100 // scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes. 101 Scheduling *SchedulingPatch `pulumi:"scheduling"` 102 } 103 104 // The set of arguments for constructing a RuntimeClassPatch resource. 105 type RuntimeClassPatchArgs struct { 106 // 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 107 ApiVersion pulumi.StringPtrInput 108 // handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable. 109 Handler pulumi.StringPtrInput 110 // 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 111 Kind pulumi.StringPtrInput 112 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 113 Metadata metav1.ObjectMetaPatchPtrInput 114 // overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see 115 // https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/ 116 Overhead OverheadPatchPtrInput 117 // scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes. 118 Scheduling SchedulingPatchPtrInput 119 } 120 121 func (RuntimeClassPatchArgs) ElementType() reflect.Type { 122 return reflect.TypeOf((*runtimeClassPatchArgs)(nil)).Elem() 123 } 124 125 type RuntimeClassPatchInput interface { 126 pulumi.Input 127 128 ToRuntimeClassPatchOutput() RuntimeClassPatchOutput 129 ToRuntimeClassPatchOutputWithContext(ctx context.Context) RuntimeClassPatchOutput 130 } 131 132 func (*RuntimeClassPatch) ElementType() reflect.Type { 133 return reflect.TypeOf((**RuntimeClassPatch)(nil)).Elem() 134 } 135 136 func (i *RuntimeClassPatch) ToRuntimeClassPatchOutput() RuntimeClassPatchOutput { 137 return i.ToRuntimeClassPatchOutputWithContext(context.Background()) 138 } 139 140 func (i *RuntimeClassPatch) ToRuntimeClassPatchOutputWithContext(ctx context.Context) RuntimeClassPatchOutput { 141 return pulumi.ToOutputWithContext(ctx, i).(RuntimeClassPatchOutput) 142 } 143 144 // RuntimeClassPatchArrayInput is an input type that accepts RuntimeClassPatchArray and RuntimeClassPatchArrayOutput values. 145 // You can construct a concrete instance of `RuntimeClassPatchArrayInput` via: 146 // 147 // RuntimeClassPatchArray{ RuntimeClassPatchArgs{...} } 148 type RuntimeClassPatchArrayInput interface { 149 pulumi.Input 150 151 ToRuntimeClassPatchArrayOutput() RuntimeClassPatchArrayOutput 152 ToRuntimeClassPatchArrayOutputWithContext(context.Context) RuntimeClassPatchArrayOutput 153 } 154 155 type RuntimeClassPatchArray []RuntimeClassPatchInput 156 157 func (RuntimeClassPatchArray) ElementType() reflect.Type { 158 return reflect.TypeOf((*[]*RuntimeClassPatch)(nil)).Elem() 159 } 160 161 func (i RuntimeClassPatchArray) ToRuntimeClassPatchArrayOutput() RuntimeClassPatchArrayOutput { 162 return i.ToRuntimeClassPatchArrayOutputWithContext(context.Background()) 163 } 164 165 func (i RuntimeClassPatchArray) ToRuntimeClassPatchArrayOutputWithContext(ctx context.Context) RuntimeClassPatchArrayOutput { 166 return pulumi.ToOutputWithContext(ctx, i).(RuntimeClassPatchArrayOutput) 167 } 168 169 // RuntimeClassPatchMapInput is an input type that accepts RuntimeClassPatchMap and RuntimeClassPatchMapOutput values. 170 // You can construct a concrete instance of `RuntimeClassPatchMapInput` via: 171 // 172 // RuntimeClassPatchMap{ "key": RuntimeClassPatchArgs{...} } 173 type RuntimeClassPatchMapInput interface { 174 pulumi.Input 175 176 ToRuntimeClassPatchMapOutput() RuntimeClassPatchMapOutput 177 ToRuntimeClassPatchMapOutputWithContext(context.Context) RuntimeClassPatchMapOutput 178 } 179 180 type RuntimeClassPatchMap map[string]RuntimeClassPatchInput 181 182 func (RuntimeClassPatchMap) ElementType() reflect.Type { 183 return reflect.TypeOf((*map[string]*RuntimeClassPatch)(nil)).Elem() 184 } 185 186 func (i RuntimeClassPatchMap) ToRuntimeClassPatchMapOutput() RuntimeClassPatchMapOutput { 187 return i.ToRuntimeClassPatchMapOutputWithContext(context.Background()) 188 } 189 190 func (i RuntimeClassPatchMap) ToRuntimeClassPatchMapOutputWithContext(ctx context.Context) RuntimeClassPatchMapOutput { 191 return pulumi.ToOutputWithContext(ctx, i).(RuntimeClassPatchMapOutput) 192 } 193 194 type RuntimeClassPatchOutput struct{ *pulumi.OutputState } 195 196 func (RuntimeClassPatchOutput) ElementType() reflect.Type { 197 return reflect.TypeOf((**RuntimeClassPatch)(nil)).Elem() 198 } 199 200 func (o RuntimeClassPatchOutput) ToRuntimeClassPatchOutput() RuntimeClassPatchOutput { 201 return o 202 } 203 204 func (o RuntimeClassPatchOutput) ToRuntimeClassPatchOutputWithContext(ctx context.Context) RuntimeClassPatchOutput { 205 return o 206 } 207 208 // 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 209 func (o RuntimeClassPatchOutput) ApiVersion() pulumi.StringPtrOutput { 210 return o.ApplyT(func(v *RuntimeClassPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 211 } 212 213 // handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable. 214 func (o RuntimeClassPatchOutput) Handler() pulumi.StringPtrOutput { 215 return o.ApplyT(func(v *RuntimeClassPatch) pulumi.StringPtrOutput { return v.Handler }).(pulumi.StringPtrOutput) 216 } 217 218 // 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 219 func (o RuntimeClassPatchOutput) Kind() pulumi.StringPtrOutput { 220 return o.ApplyT(func(v *RuntimeClassPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 221 } 222 223 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 224 func (o RuntimeClassPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 225 return o.ApplyT(func(v *RuntimeClassPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 226 } 227 228 // overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see 229 // 230 // https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/ 231 func (o RuntimeClassPatchOutput) Overhead() OverheadPatchPtrOutput { 232 return o.ApplyT(func(v *RuntimeClassPatch) OverheadPatchPtrOutput { return v.Overhead }).(OverheadPatchPtrOutput) 233 } 234 235 // scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes. 236 func (o RuntimeClassPatchOutput) Scheduling() SchedulingPatchPtrOutput { 237 return o.ApplyT(func(v *RuntimeClassPatch) SchedulingPatchPtrOutput { return v.Scheduling }).(SchedulingPatchPtrOutput) 238 } 239 240 type RuntimeClassPatchArrayOutput struct{ *pulumi.OutputState } 241 242 func (RuntimeClassPatchArrayOutput) ElementType() reflect.Type { 243 return reflect.TypeOf((*[]*RuntimeClassPatch)(nil)).Elem() 244 } 245 246 func (o RuntimeClassPatchArrayOutput) ToRuntimeClassPatchArrayOutput() RuntimeClassPatchArrayOutput { 247 return o 248 } 249 250 func (o RuntimeClassPatchArrayOutput) ToRuntimeClassPatchArrayOutputWithContext(ctx context.Context) RuntimeClassPatchArrayOutput { 251 return o 252 } 253 254 func (o RuntimeClassPatchArrayOutput) Index(i pulumi.IntInput) RuntimeClassPatchOutput { 255 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RuntimeClassPatch { 256 return vs[0].([]*RuntimeClassPatch)[vs[1].(int)] 257 }).(RuntimeClassPatchOutput) 258 } 259 260 type RuntimeClassPatchMapOutput struct{ *pulumi.OutputState } 261 262 func (RuntimeClassPatchMapOutput) ElementType() reflect.Type { 263 return reflect.TypeOf((*map[string]*RuntimeClassPatch)(nil)).Elem() 264 } 265 266 func (o RuntimeClassPatchMapOutput) ToRuntimeClassPatchMapOutput() RuntimeClassPatchMapOutput { 267 return o 268 } 269 270 func (o RuntimeClassPatchMapOutput) ToRuntimeClassPatchMapOutputWithContext(ctx context.Context) RuntimeClassPatchMapOutput { 271 return o 272 } 273 274 func (o RuntimeClassPatchMapOutput) MapIndex(k pulumi.StringInput) RuntimeClassPatchOutput { 275 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RuntimeClassPatch { 276 return vs[0].(map[string]*RuntimeClassPatch)[vs[1].(string)] 277 }).(RuntimeClassPatchOutput) 278 } 279 280 func init() { 281 pulumi.RegisterInputType(reflect.TypeOf((*RuntimeClassPatchInput)(nil)).Elem(), &RuntimeClassPatch{}) 282 pulumi.RegisterInputType(reflect.TypeOf((*RuntimeClassPatchArrayInput)(nil)).Elem(), RuntimeClassPatchArray{}) 283 pulumi.RegisterInputType(reflect.TypeOf((*RuntimeClassPatchMapInput)(nil)).Elem(), RuntimeClassPatchMap{}) 284 pulumi.RegisterOutputType(RuntimeClassPatchOutput{}) 285 pulumi.RegisterOutputType(RuntimeClassPatchArrayOutput{}) 286 pulumi.RegisterOutputType(RuntimeClassPatchMapOutput{}) 287 }