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