github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/storage/v1beta1/csinodePatch.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 // CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object. 21 // 22 // Deprecated: storage/v1beta1/CSINode is deprecated by storage.k8s.io/v1/CSINode. 23 type CSINodePatch struct { 24 pulumi.CustomResourceState 25 26 // 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 27 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 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 // metadata.name must be the Kubernetes node name. 31 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 32 // spec is the specification of CSINode 33 Spec CSINodeSpecPatchPtrOutput `pulumi:"spec"` 34 } 35 36 // NewCSINodePatch registers a new resource with the given unique name, arguments, and options. 37 func NewCSINodePatch(ctx *pulumi.Context, 38 name string, args *CSINodePatchArgs, opts ...pulumi.ResourceOption) (*CSINodePatch, error) { 39 if args == nil { 40 args = &CSINodePatchArgs{} 41 } 42 43 args.ApiVersion = pulumi.StringPtr("storage.k8s.io/v1beta1") 44 args.Kind = pulumi.StringPtr("CSINode") 45 aliases := pulumi.Aliases([]pulumi.Alias{ 46 { 47 Type: pulumi.String("kubernetes:storage.k8s.io/v1:CSINodePatch"), 48 }, 49 }) 50 opts = append(opts, aliases) 51 var resource CSINodePatch 52 err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1beta1:CSINodePatch", name, args, &resource, opts...) 53 if err != nil { 54 return nil, err 55 } 56 return &resource, nil 57 } 58 59 // GetCSINodePatch gets an existing CSINodePatch resource's state with the given name, ID, and optional 60 // state properties that are used to uniquely qualify the lookup (nil if not required). 61 func GetCSINodePatch(ctx *pulumi.Context, 62 name string, id pulumi.IDInput, state *CSINodePatchState, opts ...pulumi.ResourceOption) (*CSINodePatch, error) { 63 var resource CSINodePatch 64 err := ctx.ReadResource("kubernetes:storage.k8s.io/v1beta1:CSINodePatch", name, id, state, &resource, opts...) 65 if err != nil { 66 return nil, err 67 } 68 return &resource, nil 69 } 70 71 // Input properties used for looking up and filtering CSINodePatch resources. 72 type csinodePatchState struct { 73 } 74 75 type CSINodePatchState struct { 76 } 77 78 func (CSINodePatchState) ElementType() reflect.Type { 79 return reflect.TypeOf((*csinodePatchState)(nil)).Elem() 80 } 81 82 type csinodePatchArgs struct { 83 // 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 84 ApiVersion *string `pulumi:"apiVersion"` 85 // 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 86 Kind *string `pulumi:"kind"` 87 // metadata.name must be the Kubernetes node name. 88 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 89 // spec is the specification of CSINode 90 Spec *CSINodeSpecPatch `pulumi:"spec"` 91 } 92 93 // The set of arguments for constructing a CSINodePatch resource. 94 type CSINodePatchArgs struct { 95 // 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 96 ApiVersion pulumi.StringPtrInput 97 // 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 98 Kind pulumi.StringPtrInput 99 // metadata.name must be the Kubernetes node name. 100 Metadata metav1.ObjectMetaPatchPtrInput 101 // spec is the specification of CSINode 102 Spec CSINodeSpecPatchPtrInput 103 } 104 105 func (CSINodePatchArgs) ElementType() reflect.Type { 106 return reflect.TypeOf((*csinodePatchArgs)(nil)).Elem() 107 } 108 109 type CSINodePatchInput interface { 110 pulumi.Input 111 112 ToCSINodePatchOutput() CSINodePatchOutput 113 ToCSINodePatchOutputWithContext(ctx context.Context) CSINodePatchOutput 114 } 115 116 func (*CSINodePatch) ElementType() reflect.Type { 117 return reflect.TypeOf((**CSINodePatch)(nil)).Elem() 118 } 119 120 func (i *CSINodePatch) ToCSINodePatchOutput() CSINodePatchOutput { 121 return i.ToCSINodePatchOutputWithContext(context.Background()) 122 } 123 124 func (i *CSINodePatch) ToCSINodePatchOutputWithContext(ctx context.Context) CSINodePatchOutput { 125 return pulumi.ToOutputWithContext(ctx, i).(CSINodePatchOutput) 126 } 127 128 // CSINodePatchArrayInput is an input type that accepts CSINodePatchArray and CSINodePatchArrayOutput values. 129 // You can construct a concrete instance of `CSINodePatchArrayInput` via: 130 // 131 // CSINodePatchArray{ CSINodePatchArgs{...} } 132 type CSINodePatchArrayInput interface { 133 pulumi.Input 134 135 ToCSINodePatchArrayOutput() CSINodePatchArrayOutput 136 ToCSINodePatchArrayOutputWithContext(context.Context) CSINodePatchArrayOutput 137 } 138 139 type CSINodePatchArray []CSINodePatchInput 140 141 func (CSINodePatchArray) ElementType() reflect.Type { 142 return reflect.TypeOf((*[]*CSINodePatch)(nil)).Elem() 143 } 144 145 func (i CSINodePatchArray) ToCSINodePatchArrayOutput() CSINodePatchArrayOutput { 146 return i.ToCSINodePatchArrayOutputWithContext(context.Background()) 147 } 148 149 func (i CSINodePatchArray) ToCSINodePatchArrayOutputWithContext(ctx context.Context) CSINodePatchArrayOutput { 150 return pulumi.ToOutputWithContext(ctx, i).(CSINodePatchArrayOutput) 151 } 152 153 // CSINodePatchMapInput is an input type that accepts CSINodePatchMap and CSINodePatchMapOutput values. 154 // You can construct a concrete instance of `CSINodePatchMapInput` via: 155 // 156 // CSINodePatchMap{ "key": CSINodePatchArgs{...} } 157 type CSINodePatchMapInput interface { 158 pulumi.Input 159 160 ToCSINodePatchMapOutput() CSINodePatchMapOutput 161 ToCSINodePatchMapOutputWithContext(context.Context) CSINodePatchMapOutput 162 } 163 164 type CSINodePatchMap map[string]CSINodePatchInput 165 166 func (CSINodePatchMap) ElementType() reflect.Type { 167 return reflect.TypeOf((*map[string]*CSINodePatch)(nil)).Elem() 168 } 169 170 func (i CSINodePatchMap) ToCSINodePatchMapOutput() CSINodePatchMapOutput { 171 return i.ToCSINodePatchMapOutputWithContext(context.Background()) 172 } 173 174 func (i CSINodePatchMap) ToCSINodePatchMapOutputWithContext(ctx context.Context) CSINodePatchMapOutput { 175 return pulumi.ToOutputWithContext(ctx, i).(CSINodePatchMapOutput) 176 } 177 178 type CSINodePatchOutput struct{ *pulumi.OutputState } 179 180 func (CSINodePatchOutput) ElementType() reflect.Type { 181 return reflect.TypeOf((**CSINodePatch)(nil)).Elem() 182 } 183 184 func (o CSINodePatchOutput) ToCSINodePatchOutput() CSINodePatchOutput { 185 return o 186 } 187 188 func (o CSINodePatchOutput) ToCSINodePatchOutputWithContext(ctx context.Context) CSINodePatchOutput { 189 return o 190 } 191 192 // 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 193 func (o CSINodePatchOutput) ApiVersion() pulumi.StringPtrOutput { 194 return o.ApplyT(func(v *CSINodePatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 195 } 196 197 // 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 198 func (o CSINodePatchOutput) Kind() pulumi.StringPtrOutput { 199 return o.ApplyT(func(v *CSINodePatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 200 } 201 202 // metadata.name must be the Kubernetes node name. 203 func (o CSINodePatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 204 return o.ApplyT(func(v *CSINodePatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 205 } 206 207 // spec is the specification of CSINode 208 func (o CSINodePatchOutput) Spec() CSINodeSpecPatchPtrOutput { 209 return o.ApplyT(func(v *CSINodePatch) CSINodeSpecPatchPtrOutput { return v.Spec }).(CSINodeSpecPatchPtrOutput) 210 } 211 212 type CSINodePatchArrayOutput struct{ *pulumi.OutputState } 213 214 func (CSINodePatchArrayOutput) ElementType() reflect.Type { 215 return reflect.TypeOf((*[]*CSINodePatch)(nil)).Elem() 216 } 217 218 func (o CSINodePatchArrayOutput) ToCSINodePatchArrayOutput() CSINodePatchArrayOutput { 219 return o 220 } 221 222 func (o CSINodePatchArrayOutput) ToCSINodePatchArrayOutputWithContext(ctx context.Context) CSINodePatchArrayOutput { 223 return o 224 } 225 226 func (o CSINodePatchArrayOutput) Index(i pulumi.IntInput) CSINodePatchOutput { 227 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CSINodePatch { 228 return vs[0].([]*CSINodePatch)[vs[1].(int)] 229 }).(CSINodePatchOutput) 230 } 231 232 type CSINodePatchMapOutput struct{ *pulumi.OutputState } 233 234 func (CSINodePatchMapOutput) ElementType() reflect.Type { 235 return reflect.TypeOf((*map[string]*CSINodePatch)(nil)).Elem() 236 } 237 238 func (o CSINodePatchMapOutput) ToCSINodePatchMapOutput() CSINodePatchMapOutput { 239 return o 240 } 241 242 func (o CSINodePatchMapOutput) ToCSINodePatchMapOutputWithContext(ctx context.Context) CSINodePatchMapOutput { 243 return o 244 } 245 246 func (o CSINodePatchMapOutput) MapIndex(k pulumi.StringInput) CSINodePatchOutput { 247 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CSINodePatch { 248 return vs[0].(map[string]*CSINodePatch)[vs[1].(string)] 249 }).(CSINodePatchOutput) 250 } 251 252 func init() { 253 pulumi.RegisterInputType(reflect.TypeOf((*CSINodePatchInput)(nil)).Elem(), &CSINodePatch{}) 254 pulumi.RegisterInputType(reflect.TypeOf((*CSINodePatchArrayInput)(nil)).Elem(), CSINodePatchArray{}) 255 pulumi.RegisterInputType(reflect.TypeOf((*CSINodePatchMapInput)(nil)).Elem(), CSINodePatchMap{}) 256 pulumi.RegisterOutputType(CSINodePatchOutput{}) 257 pulumi.RegisterOutputType(CSINodePatchArrayOutput{}) 258 pulumi.RegisterOutputType(CSINodePatchMapOutput{}) 259 }