api: generated files

This commit is contained in:
Patrick Ohly 2022-11-10 20:22:42 +01:00
parent 5cca60f0b8
commit 9683c60c05
91 changed files with 28616 additions and 1105 deletions

File diff suppressed because it is too large Load Diff

View File

@ -691,6 +691,20 @@
], ],
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.ClaimSource": {
"description": "ClaimSource describes a reference to a ResourceClaim.\n\nExactly one of these fields should be set. Consumers of this type must treat an empty object as if it has an unknown value.",
"properties": {
"resourceClaimName": {
"description": "ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod.",
"type": "string"
},
"resourceClaimTemplateName": {
"description": "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod.\n\nThe template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be <pod name>-<resource name>, where <resource name> is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long).\n\nAn existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed.\n\nThis field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.",
"type": "string"
}
},
"type": "object"
},
"io.k8s.api.core.v1.ClientIPConfig": { "io.k8s.api.core.v1.ClientIPConfig": {
"description": "ClientIPConfig represents the configurations of Client IP based session affinity.", "description": "ClientIPConfig represents the configurations of Client IP based session affinity.",
"properties": { "properties": {
@ -4869,6 +4883,29 @@
], ],
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.PodResourceClaim": {
"description": "PodResourceClaim references exactly one ResourceClaim through a ClaimSource. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name.",
"properties": {
"name": {
"default": "",
"description": "Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL.",
"type": "string"
},
"source": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.ClaimSource"
}
],
"default": {},
"description": "Source describes where to find the ResourceClaim."
}
},
"required": [
"name"
],
"type": "object"
},
"io.k8s.api.core.v1.PodSchedulingGate": { "io.k8s.api.core.v1.PodSchedulingGate": {
"description": "PodSchedulingGate is associated to a Pod to guard its scheduling.", "description": "PodSchedulingGate is associated to a Pod to guard its scheduling.",
"properties": { "properties": {
@ -5141,6 +5178,24 @@
}, },
"type": "array" "type": "array"
}, },
"resourceClaims": {
"description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.PodResourceClaim"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge,retainKeys"
},
"restartPolicy": { "restartPolicy": {
"description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\n", "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\n",
"type": "string" "type": "string"
@ -5981,6 +6036,20 @@
], ],
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.ResourceClaim": {
"description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
"properties": {
"name": {
"default": "",
"description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"io.k8s.api.core.v1.ResourceFieldSelector": { "io.k8s.api.core.v1.ResourceFieldSelector": {
"description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
"properties": { "properties": {
@ -6169,6 +6238,19 @@
"io.k8s.api.core.v1.ResourceRequirements": { "io.k8s.api.core.v1.ResourceRequirements": {
"description": "ResourceRequirements describes the compute resource requirements.", "description": "ResourceRequirements describes the compute resource requirements.",
"properties": { "properties": {
"claims": {
"description": "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.ResourceClaim"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-type": "set"
},
"limits": { "limits": {
"additionalProperties": { "additionalProperties": {
"allOf": [ "allOf": [
@ -8313,6 +8395,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -8695,6 +8782,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -9033,6 +9125,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -843,6 +843,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1220,6 +1225,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1558,6 +1568,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -796,6 +796,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1173,6 +1178,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1511,6 +1521,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -1228,6 +1228,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1548,6 +1553,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1886,6 +1896,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -1571,6 +1571,20 @@
], ],
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.ClaimSource": {
"description": "ClaimSource describes a reference to a ResourceClaim.\n\nExactly one of these fields should be set. Consumers of this type must treat an empty object as if it has an unknown value.",
"properties": {
"resourceClaimName": {
"description": "ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod.",
"type": "string"
},
"resourceClaimTemplateName": {
"description": "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod.\n\nThe template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be <pod name>-<resource name>, where <resource name> is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long).\n\nAn existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed.\n\nThis field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.",
"type": "string"
}
},
"type": "object"
},
"io.k8s.api.core.v1.ConfigMapEnvSource": { "io.k8s.api.core.v1.ConfigMapEnvSource": {
"description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.",
"properties": { "properties": {
@ -3311,6 +3325,29 @@
], ],
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.PodResourceClaim": {
"description": "PodResourceClaim references exactly one ResourceClaim through a ClaimSource. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name.",
"properties": {
"name": {
"default": "",
"description": "Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL.",
"type": "string"
},
"source": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.ClaimSource"
}
],
"default": {},
"description": "Source describes where to find the ResourceClaim."
}
},
"required": [
"name"
],
"type": "object"
},
"io.k8s.api.core.v1.PodSchedulingGate": { "io.k8s.api.core.v1.PodSchedulingGate": {
"description": "PodSchedulingGate is associated to a Pod to guard its scheduling.", "description": "PodSchedulingGate is associated to a Pod to guard its scheduling.",
"properties": { "properties": {
@ -3583,6 +3620,24 @@
}, },
"type": "array" "type": "array"
}, },
"resourceClaims": {
"description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.PodResourceClaim"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge,retainKeys"
},
"restartPolicy": { "restartPolicy": {
"description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\n", "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\n",
"type": "string" "type": "string"
@ -3946,6 +4001,20 @@
], ],
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.ResourceClaim": {
"description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
"properties": {
"name": {
"default": "",
"description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"io.k8s.api.core.v1.ResourceFieldSelector": { "io.k8s.api.core.v1.ResourceFieldSelector": {
"description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
"properties": { "properties": {
@ -3977,6 +4046,19 @@
"io.k8s.api.core.v1.ResourceRequirements": { "io.k8s.api.core.v1.ResourceRequirements": {
"description": "ResourceRequirements describes the compute resource requirements.", "description": "ResourceRequirements describes the compute resource requirements.",
"properties": { "properties": {
"claims": {
"description": "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.ResourceClaim"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-type": "set"
},
"limits": { "limits": {
"additionalProperties": { "additionalProperties": {
"allOf": [ "allOf": [
@ -5330,6 +5412,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -5707,6 +5794,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -6045,6 +6137,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -598,6 +598,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -918,6 +923,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1256,6 +1266,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -1251,6 +1251,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1628,6 +1633,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1966,6 +1976,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -862,6 +862,20 @@
], ],
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.ClaimSource": {
"description": "ClaimSource describes a reference to a ResourceClaim.\n\nExactly one of these fields should be set. Consumers of this type must treat an empty object as if it has an unknown value.",
"properties": {
"resourceClaimName": {
"description": "ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod.",
"type": "string"
},
"resourceClaimTemplateName": {
"description": "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod.\n\nThe template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be <pod name>-<resource name>, where <resource name> is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long).\n\nAn existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed.\n\nThis field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.",
"type": "string"
}
},
"type": "object"
},
"io.k8s.api.core.v1.ConfigMapEnvSource": { "io.k8s.api.core.v1.ConfigMapEnvSource": {
"description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.",
"properties": { "properties": {
@ -2485,6 +2499,29 @@
], ],
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.PodResourceClaim": {
"description": "PodResourceClaim references exactly one ResourceClaim through a ClaimSource. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name.",
"properties": {
"name": {
"default": "",
"description": "Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL.",
"type": "string"
},
"source": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.ClaimSource"
}
],
"default": {},
"description": "Source describes where to find the ResourceClaim."
}
},
"required": [
"name"
],
"type": "object"
},
"io.k8s.api.core.v1.PodSchedulingGate": { "io.k8s.api.core.v1.PodSchedulingGate": {
"description": "PodSchedulingGate is associated to a Pod to guard its scheduling.", "description": "PodSchedulingGate is associated to a Pod to guard its scheduling.",
"properties": { "properties": {
@ -2757,6 +2794,24 @@
}, },
"type": "array" "type": "array"
}, },
"resourceClaims": {
"description": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.PodResourceClaim"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-map-keys": [
"name"
],
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge,retainKeys"
},
"restartPolicy": { "restartPolicy": {
"description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\n", "description": "Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\n",
"type": "string" "type": "string"
@ -3120,6 +3175,20 @@
], ],
"type": "object" "type": "object"
}, },
"io.k8s.api.core.v1.ResourceClaim": {
"description": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
"properties": {
"name": {
"default": "",
"description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"io.k8s.api.core.v1.ResourceFieldSelector": { "io.k8s.api.core.v1.ResourceFieldSelector": {
"description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
"properties": { "properties": {
@ -3151,6 +3220,19 @@
"io.k8s.api.core.v1.ResourceRequirements": { "io.k8s.api.core.v1.ResourceRequirements": {
"description": "ResourceRequirements describes the compute resource requirements.", "description": "ResourceRequirements describes the compute resource requirements.",
"properties": { "properties": {
"claims": {
"description": "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.ResourceClaim"
}
],
"default": {}
},
"type": "array",
"x-kubernetes-list-type": "set"
},
"limits": { "limits": {
"additionalProperties": { "additionalProperties": {
"allOf": [ "allOf": [
@ -4504,6 +4586,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -4881,6 +4968,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -5219,6 +5311,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -636,6 +636,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -956,6 +961,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1294,6 +1304,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -525,6 +525,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -850,6 +855,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1188,6 +1198,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -688,6 +688,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1008,6 +1013,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1346,6 +1356,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -647,6 +647,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -972,6 +977,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1310,6 +1320,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -1108,6 +1108,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1428,6 +1433,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1766,6 +1776,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -1112,6 +1112,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1432,6 +1437,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1770,6 +1780,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -615,6 +615,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -935,6 +940,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1273,6 +1283,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -1276,6 +1276,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1653,6 +1658,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1991,6 +2001,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -603,6 +603,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -923,6 +928,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1261,6 +1271,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -588,6 +588,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -908,6 +913,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1246,6 +1256,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -647,6 +647,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1024,6 +1029,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1362,6 +1372,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -908,6 +908,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -1285,6 +1290,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1623,6 +1633,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,158 @@
{
"components": {
"schemas": {
"io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup": {
"description": "APIGroup contains the name, the supported versions, and the preferred version of a group.",
"properties": {
"apiVersion": {
"description": "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",
"type": "string"
},
"kind": {
"description": "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",
"type": "string"
},
"name": {
"default": "",
"description": "name is the name of the group.",
"type": "string"
},
"preferredVersion": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery"
}
],
"default": {},
"description": "preferredVersion is the version preferred by the API server, which probably is the storage version."
},
"serverAddressByClientCIDRs": {
"description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR"
}
],
"default": {}
},
"type": "array"
},
"versions": {
"description": "versions are the versions supported in this group.",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery"
}
],
"default": {}
},
"type": "array"
}
},
"required": [
"name",
"versions"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
"group": "",
"kind": "APIGroup",
"version": "v1"
}
]
},
"io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery": {
"description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.",
"properties": {
"groupVersion": {
"default": "",
"description": "groupVersion specifies the API group and version in the form \"group/version\"",
"type": "string"
},
"version": {
"default": "",
"description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.",
"type": "string"
}
},
"required": [
"groupVersion",
"version"
],
"type": "object"
},
"io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR": {
"description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.",
"properties": {
"clientCIDR": {
"default": "",
"description": "The CIDR with which clients can match their IP to figure out the server address that they should use.",
"type": "string"
},
"serverAddress": {
"default": "",
"description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.",
"type": "string"
}
},
"required": [
"clientCIDR",
"serverAddress"
],
"type": "object"
}
},
"securitySchemes": {
"BearerToken": {
"description": "Bearer Token authentication",
"in": "header",
"name": "authorization",
"type": "apiKey"
}
}
},
"info": {
"title": "Kubernetes",
"version": "unversioned"
},
"openapi": "3.0.0",
"paths": {
"/apis/resource.k8s.io/": {
"get": {
"description": "get information of a group",
"operationId": "getResourceAPIGroup",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup"
}
},
"application/vnd.kubernetes.protobuf": {
"schema": {
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup"
}
}
},
"description": "OK"
},
"401": {
"description": "Unauthorized"
}
},
"tags": [
"resource"
]
}
}
}
}

View File

@ -501,6 +501,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -821,6 +826,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1159,6 +1169,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -2340,6 +2340,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -2717,6 +2722,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -3055,6 +3065,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -527,6 +527,11 @@
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "DeleteOptions",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
@ -904,6 +909,11 @@
"group": "", "group": "",
"kind": "Status", "kind": "Status",
"version": "v1" "version": "v1"
},
{
"group": "resource.k8s.io",
"kind": "Status",
"version": "v1alpha1"
} }
] ]
}, },
@ -1242,6 +1252,11 @@
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1beta1" "version": "v1beta1"
}, },
{
"group": "resource.k8s.io",
"kind": "WatchEvent",
"version": "v1alpha1"
},
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",

View File

@ -192,6 +192,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddGeneratedConversionFunc((*v1.ClaimSource)(nil), (*core.ClaimSource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_ClaimSource_To_core_ClaimSource(a.(*v1.ClaimSource), b.(*core.ClaimSource), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*core.ClaimSource)(nil), (*v1.ClaimSource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_core_ClaimSource_To_v1_ClaimSource(a.(*core.ClaimSource), b.(*v1.ClaimSource), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.ClientIPConfig)(nil), (*core.ClientIPConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { if err := s.AddGeneratedConversionFunc((*v1.ClientIPConfig)(nil), (*core.ClientIPConfig)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_ClientIPConfig_To_core_ClientIPConfig(a.(*v1.ClientIPConfig), b.(*core.ClientIPConfig), scope) return Convert_v1_ClientIPConfig_To_core_ClientIPConfig(a.(*v1.ClientIPConfig), b.(*core.ClientIPConfig), scope)
}); err != nil { }); err != nil {
@ -1352,6 +1362,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddGeneratedConversionFunc((*v1.PodResourceClaim)(nil), (*core.PodResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_PodResourceClaim_To_core_PodResourceClaim(a.(*v1.PodResourceClaim), b.(*core.PodResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*core.PodResourceClaim)(nil), (*v1.PodResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_core_PodResourceClaim_To_v1_PodResourceClaim(a.(*core.PodResourceClaim), b.(*v1.PodResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.PodSchedulingGate)(nil), (*core.PodSchedulingGate)(nil), func(a, b interface{}, scope conversion.Scope) error { if err := s.AddGeneratedConversionFunc((*v1.PodSchedulingGate)(nil), (*core.PodSchedulingGate)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_PodSchedulingGate_To_core_PodSchedulingGate(a.(*v1.PodSchedulingGate), b.(*core.PodSchedulingGate), scope) return Convert_v1_PodSchedulingGate_To_core_PodSchedulingGate(a.(*v1.PodSchedulingGate), b.(*core.PodSchedulingGate), scope)
}); err != nil { }); err != nil {
@ -1572,6 +1592,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil { }); err != nil {
return err return err
} }
if err := s.AddGeneratedConversionFunc((*v1.ResourceClaim)(nil), (*core.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_ResourceClaim_To_core_ResourceClaim(a.(*v1.ResourceClaim), b.(*core.ResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*core.ResourceClaim)(nil), (*v1.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_core_ResourceClaim_To_v1_ResourceClaim(a.(*core.ResourceClaim), b.(*v1.ResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.ResourceFieldSelector)(nil), (*core.ResourceFieldSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { if err := s.AddGeneratedConversionFunc((*v1.ResourceFieldSelector)(nil), (*core.ResourceFieldSelector)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_ResourceFieldSelector_To_core_ResourceFieldSelector(a.(*v1.ResourceFieldSelector), b.(*core.ResourceFieldSelector), scope) return Convert_v1_ResourceFieldSelector_To_core_ResourceFieldSelector(a.(*v1.ResourceFieldSelector), b.(*core.ResourceFieldSelector), scope)
}); err != nil { }); err != nil {
@ -2633,6 +2663,28 @@ func Convert_core_CinderVolumeSource_To_v1_CinderVolumeSource(in *core.CinderVol
return autoConvert_core_CinderVolumeSource_To_v1_CinderVolumeSource(in, out, s) return autoConvert_core_CinderVolumeSource_To_v1_CinderVolumeSource(in, out, s)
} }
func autoConvert_v1_ClaimSource_To_core_ClaimSource(in *v1.ClaimSource, out *core.ClaimSource, s conversion.Scope) error {
out.ResourceClaimName = (*string)(unsafe.Pointer(in.ResourceClaimName))
out.ResourceClaimTemplateName = (*string)(unsafe.Pointer(in.ResourceClaimTemplateName))
return nil
}
// Convert_v1_ClaimSource_To_core_ClaimSource is an autogenerated conversion function.
func Convert_v1_ClaimSource_To_core_ClaimSource(in *v1.ClaimSource, out *core.ClaimSource, s conversion.Scope) error {
return autoConvert_v1_ClaimSource_To_core_ClaimSource(in, out, s)
}
func autoConvert_core_ClaimSource_To_v1_ClaimSource(in *core.ClaimSource, out *v1.ClaimSource, s conversion.Scope) error {
out.ResourceClaimName = (*string)(unsafe.Pointer(in.ResourceClaimName))
out.ResourceClaimTemplateName = (*string)(unsafe.Pointer(in.ResourceClaimTemplateName))
return nil
}
// Convert_core_ClaimSource_To_v1_ClaimSource is an autogenerated conversion function.
func Convert_core_ClaimSource_To_v1_ClaimSource(in *core.ClaimSource, out *v1.ClaimSource, s conversion.Scope) error {
return autoConvert_core_ClaimSource_To_v1_ClaimSource(in, out, s)
}
func autoConvert_v1_ClientIPConfig_To_core_ClientIPConfig(in *v1.ClientIPConfig, out *core.ClientIPConfig, s conversion.Scope) error { func autoConvert_v1_ClientIPConfig_To_core_ClientIPConfig(in *v1.ClientIPConfig, out *core.ClientIPConfig, s conversion.Scope) error {
out.TimeoutSeconds = (*int32)(unsafe.Pointer(in.TimeoutSeconds)) out.TimeoutSeconds = (*int32)(unsafe.Pointer(in.TimeoutSeconds))
return nil return nil
@ -6089,6 +6141,32 @@ func Convert_core_PodReadinessGate_To_v1_PodReadinessGate(in *core.PodReadinessG
return autoConvert_core_PodReadinessGate_To_v1_PodReadinessGate(in, out, s) return autoConvert_core_PodReadinessGate_To_v1_PodReadinessGate(in, out, s)
} }
func autoConvert_v1_PodResourceClaim_To_core_PodResourceClaim(in *v1.PodResourceClaim, out *core.PodResourceClaim, s conversion.Scope) error {
out.Name = in.Name
if err := Convert_v1_ClaimSource_To_core_ClaimSource(&in.Source, &out.Source, s); err != nil {
return err
}
return nil
}
// Convert_v1_PodResourceClaim_To_core_PodResourceClaim is an autogenerated conversion function.
func Convert_v1_PodResourceClaim_To_core_PodResourceClaim(in *v1.PodResourceClaim, out *core.PodResourceClaim, s conversion.Scope) error {
return autoConvert_v1_PodResourceClaim_To_core_PodResourceClaim(in, out, s)
}
func autoConvert_core_PodResourceClaim_To_v1_PodResourceClaim(in *core.PodResourceClaim, out *v1.PodResourceClaim, s conversion.Scope) error {
out.Name = in.Name
if err := Convert_core_ClaimSource_To_v1_ClaimSource(&in.Source, &out.Source, s); err != nil {
return err
}
return nil
}
// Convert_core_PodResourceClaim_To_v1_PodResourceClaim is an autogenerated conversion function.
func Convert_core_PodResourceClaim_To_v1_PodResourceClaim(in *core.PodResourceClaim, out *v1.PodResourceClaim, s conversion.Scope) error {
return autoConvert_core_PodResourceClaim_To_v1_PodResourceClaim(in, out, s)
}
func autoConvert_v1_PodSchedulingGate_To_core_PodSchedulingGate(in *v1.PodSchedulingGate, out *core.PodSchedulingGate, s conversion.Scope) error { func autoConvert_v1_PodSchedulingGate_To_core_PodSchedulingGate(in *v1.PodSchedulingGate, out *core.PodSchedulingGate, s conversion.Scope) error {
out.Name = in.Name out.Name = in.Name
return nil return nil
@ -6229,6 +6307,7 @@ func autoConvert_v1_PodSpec_To_core_PodSpec(in *v1.PodSpec, out *core.PodSpec, s
out.OS = (*core.PodOS)(unsafe.Pointer(in.OS)) out.OS = (*core.PodOS)(unsafe.Pointer(in.OS))
// INFO: in.HostUsers opted out of conversion generation // INFO: in.HostUsers opted out of conversion generation
out.SchedulingGates = *(*[]core.PodSchedulingGate)(unsafe.Pointer(&in.SchedulingGates)) out.SchedulingGates = *(*[]core.PodSchedulingGate)(unsafe.Pointer(&in.SchedulingGates))
out.ResourceClaims = *(*[]core.PodResourceClaim)(unsafe.Pointer(&in.ResourceClaims))
return nil return nil
} }
@ -6283,6 +6362,7 @@ func autoConvert_core_PodSpec_To_v1_PodSpec(in *core.PodSpec, out *v1.PodSpec, s
out.TopologySpreadConstraints = *(*[]v1.TopologySpreadConstraint)(unsafe.Pointer(&in.TopologySpreadConstraints)) out.TopologySpreadConstraints = *(*[]v1.TopologySpreadConstraint)(unsafe.Pointer(&in.TopologySpreadConstraints))
out.OS = (*v1.PodOS)(unsafe.Pointer(in.OS)) out.OS = (*v1.PodOS)(unsafe.Pointer(in.OS))
out.SchedulingGates = *(*[]v1.PodSchedulingGate)(unsafe.Pointer(&in.SchedulingGates)) out.SchedulingGates = *(*[]v1.PodSchedulingGate)(unsafe.Pointer(&in.SchedulingGates))
out.ResourceClaims = *(*[]v1.PodResourceClaim)(unsafe.Pointer(&in.ResourceClaims))
return nil return nil
} }
@ -6947,6 +7027,26 @@ func Convert_core_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(
return autoConvert_core_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in, out, s) return autoConvert_core_ReplicationControllerStatus_To_v1_ReplicationControllerStatus(in, out, s)
} }
func autoConvert_v1_ResourceClaim_To_core_ResourceClaim(in *v1.ResourceClaim, out *core.ResourceClaim, s conversion.Scope) error {
out.Name = in.Name
return nil
}
// Convert_v1_ResourceClaim_To_core_ResourceClaim is an autogenerated conversion function.
func Convert_v1_ResourceClaim_To_core_ResourceClaim(in *v1.ResourceClaim, out *core.ResourceClaim, s conversion.Scope) error {
return autoConvert_v1_ResourceClaim_To_core_ResourceClaim(in, out, s)
}
func autoConvert_core_ResourceClaim_To_v1_ResourceClaim(in *core.ResourceClaim, out *v1.ResourceClaim, s conversion.Scope) error {
out.Name = in.Name
return nil
}
// Convert_core_ResourceClaim_To_v1_ResourceClaim is an autogenerated conversion function.
func Convert_core_ResourceClaim_To_v1_ResourceClaim(in *core.ResourceClaim, out *v1.ResourceClaim, s conversion.Scope) error {
return autoConvert_core_ResourceClaim_To_v1_ResourceClaim(in, out, s)
}
func autoConvert_v1_ResourceFieldSelector_To_core_ResourceFieldSelector(in *v1.ResourceFieldSelector, out *core.ResourceFieldSelector, s conversion.Scope) error { func autoConvert_v1_ResourceFieldSelector_To_core_ResourceFieldSelector(in *v1.ResourceFieldSelector, out *core.ResourceFieldSelector, s conversion.Scope) error {
out.ContainerName = in.ContainerName out.ContainerName = in.ContainerName
out.Resource = in.Resource out.Resource = in.Resource
@ -7074,6 +7174,7 @@ func Convert_core_ResourceQuotaStatus_To_v1_ResourceQuotaStatus(in *core.Resourc
func autoConvert_v1_ResourceRequirements_To_core_ResourceRequirements(in *v1.ResourceRequirements, out *core.ResourceRequirements, s conversion.Scope) error { func autoConvert_v1_ResourceRequirements_To_core_ResourceRequirements(in *v1.ResourceRequirements, out *core.ResourceRequirements, s conversion.Scope) error {
out.Limits = *(*core.ResourceList)(unsafe.Pointer(&in.Limits)) out.Limits = *(*core.ResourceList)(unsafe.Pointer(&in.Limits))
out.Requests = *(*core.ResourceList)(unsafe.Pointer(&in.Requests)) out.Requests = *(*core.ResourceList)(unsafe.Pointer(&in.Requests))
out.Claims = *(*[]core.ResourceClaim)(unsafe.Pointer(&in.Claims))
return nil return nil
} }
@ -7085,6 +7186,7 @@ func Convert_v1_ResourceRequirements_To_core_ResourceRequirements(in *v1.Resourc
func autoConvert_core_ResourceRequirements_To_v1_ResourceRequirements(in *core.ResourceRequirements, out *v1.ResourceRequirements, s conversion.Scope) error { func autoConvert_core_ResourceRequirements_To_v1_ResourceRequirements(in *core.ResourceRequirements, out *v1.ResourceRequirements, s conversion.Scope) error {
out.Limits = *(*v1.ResourceList)(unsafe.Pointer(&in.Limits)) out.Limits = *(*v1.ResourceList)(unsafe.Pointer(&in.Limits))
out.Requests = *(*v1.ResourceList)(unsafe.Pointer(&in.Requests)) out.Requests = *(*v1.ResourceList)(unsafe.Pointer(&in.Requests))
out.Claims = *(*[]v1.ResourceClaim)(unsafe.Pointer(&in.Claims))
return nil return nil
} }

View File

@ -419,6 +419,32 @@ func (in *CinderVolumeSource) DeepCopy() *CinderVolumeSource {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClaimSource) DeepCopyInto(out *ClaimSource) {
*out = *in
if in.ResourceClaimName != nil {
in, out := &in.ResourceClaimName, &out.ResourceClaimName
*out = new(string)
**out = **in
}
if in.ResourceClaimTemplateName != nil {
in, out := &in.ResourceClaimTemplateName, &out.ResourceClaimTemplateName
*out = new(string)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimSource.
func (in *ClaimSource) DeepCopy() *ClaimSource {
if in == nil {
return nil
}
out := new(ClaimSource)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClientIPConfig) DeepCopyInto(out *ClientIPConfig) { func (in *ClientIPConfig) DeepCopyInto(out *ClientIPConfig) {
*out = *in *out = *in
@ -3728,6 +3754,23 @@ func (in *PodReadinessGate) DeepCopy() *PodReadinessGate {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodResourceClaim) DeepCopyInto(out *PodResourceClaim) {
*out = *in
in.Source.DeepCopyInto(&out.Source)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodResourceClaim.
func (in *PodResourceClaim) DeepCopy() *PodResourceClaim {
if in == nil {
return nil
}
out := new(PodResourceClaim)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSchedulingGate) DeepCopyInto(out *PodSchedulingGate) { func (in *PodSchedulingGate) DeepCopyInto(out *PodSchedulingGate) {
*out = *in *out = *in
@ -3982,6 +4025,13 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) {
*out = make([]PodSchedulingGate, len(*in)) *out = make([]PodSchedulingGate, len(*in))
copy(*out, *in) copy(*out, *in)
} }
if in.ResourceClaims != nil {
in, out := &in.ResourceClaims, &out.ResourceClaims
*out = make([]PodResourceClaim, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return return
} }
@ -4560,6 +4610,22 @@ func (in *ReplicationControllerStatus) DeepCopy() *ReplicationControllerStatus {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaim) DeepCopyInto(out *ResourceClaim) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaim.
func (in *ResourceClaim) DeepCopy() *ResourceClaim {
if in == nil {
return nil
}
out := new(ResourceClaim)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceFieldSelector) DeepCopyInto(out *ResourceFieldSelector) { func (in *ResourceFieldSelector) DeepCopyInto(out *ResourceFieldSelector) {
*out = *in *out = *in
@ -4740,6 +4806,11 @@ func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements) {
(*out)[key] = val.DeepCopy() (*out)[key] = val.DeepCopy()
} }
} }
if in.Claims != nil {
in, out := &in.Claims, &out.Claims
*out = make([]ResourceClaim, len(*in))
copy(*out, *in)
}
return return
} }

View File

@ -0,0 +1,668 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by conversion-gen. DO NOT EDIT.
package v1alpha1
import (
unsafe "unsafe"
v1 "k8s.io/api/core/v1"
v1alpha1 "k8s.io/api/resource/v1alpha1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
types "k8s.io/apimachinery/pkg/types"
core "k8s.io/kubernetes/pkg/apis/core"
resource "k8s.io/kubernetes/pkg/apis/resource"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*v1alpha1.AllocationResult)(nil), (*resource.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_AllocationResult_To_resource_AllocationResult(a.(*v1alpha1.AllocationResult), b.(*resource.AllocationResult), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.AllocationResult)(nil), (*v1alpha1.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_AllocationResult_To_v1alpha1_AllocationResult(a.(*resource.AllocationResult), b.(*v1alpha1.AllocationResult), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.PodScheduling)(nil), (*resource.PodScheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodScheduling_To_resource_PodScheduling(a.(*v1alpha1.PodScheduling), b.(*resource.PodScheduling), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodScheduling)(nil), (*v1alpha1.PodScheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodScheduling_To_v1alpha1_PodScheduling(a.(*resource.PodScheduling), b.(*v1alpha1.PodScheduling), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.PodSchedulingList)(nil), (*resource.PodSchedulingList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList(a.(*v1alpha1.PodSchedulingList), b.(*resource.PodSchedulingList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingList)(nil), (*v1alpha1.PodSchedulingList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList(a.(*resource.PodSchedulingList), b.(*v1alpha1.PodSchedulingList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.PodSchedulingSpec)(nil), (*resource.PodSchedulingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(a.(*v1alpha1.PodSchedulingSpec), b.(*resource.PodSchedulingSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingSpec)(nil), (*v1alpha1.PodSchedulingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(a.(*resource.PodSchedulingSpec), b.(*v1alpha1.PodSchedulingSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.PodSchedulingStatus)(nil), (*resource.PodSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(a.(*v1alpha1.PodSchedulingStatus), b.(*resource.PodSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingStatus)(nil), (*v1alpha1.PodSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(a.(*resource.PodSchedulingStatus), b.(*v1alpha1.PodSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaim)(nil), (*resource.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaim_To_resource_ResourceClaim(a.(*v1alpha1.ResourceClaim), b.(*resource.ResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaim)(nil), (*v1alpha1.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaim_To_v1alpha1_ResourceClaim(a.(*resource.ResourceClaim), b.(*v1alpha1.ResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimConsumerReference)(nil), (*resource.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(a.(*v1alpha1.ResourceClaimConsumerReference), b.(*resource.ResourceClaimConsumerReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimConsumerReference)(nil), (*v1alpha1.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference(a.(*resource.ResourceClaimConsumerReference), b.(*v1alpha1.ResourceClaimConsumerReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimList)(nil), (*resource.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList(a.(*v1alpha1.ResourceClaimList), b.(*resource.ResourceClaimList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimList)(nil), (*v1alpha1.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList(a.(*resource.ResourceClaimList), b.(*v1alpha1.ResourceClaimList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimParametersReference)(nil), (*resource.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(a.(*v1alpha1.ResourceClaimParametersReference), b.(*resource.ResourceClaimParametersReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersReference)(nil), (*v1alpha1.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference(a.(*resource.ResourceClaimParametersReference), b.(*v1alpha1.ResourceClaimParametersReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimSchedulingStatus)(nil), (*resource.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(a.(*v1alpha1.ResourceClaimSchedulingStatus), b.(*resource.ResourceClaimSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSchedulingStatus)(nil), (*v1alpha1.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus(a.(*resource.ResourceClaimSchedulingStatus), b.(*v1alpha1.ResourceClaimSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimSpec)(nil), (*resource.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(a.(*v1alpha1.ResourceClaimSpec), b.(*resource.ResourceClaimSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSpec)(nil), (*v1alpha1.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(a.(*resource.ResourceClaimSpec), b.(*v1alpha1.ResourceClaimSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimStatus)(nil), (*resource.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(a.(*v1alpha1.ResourceClaimStatus), b.(*resource.ResourceClaimStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimStatus)(nil), (*v1alpha1.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(a.(*resource.ResourceClaimStatus), b.(*v1alpha1.ResourceClaimStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimTemplate)(nil), (*resource.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(a.(*v1alpha1.ResourceClaimTemplate), b.(*resource.ResourceClaimTemplate), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplate)(nil), (*v1alpha1.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate(a.(*resource.ResourceClaimTemplate), b.(*v1alpha1.ResourceClaimTemplate), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimTemplateList)(nil), (*resource.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(a.(*v1alpha1.ResourceClaimTemplateList), b.(*resource.ResourceClaimTemplateList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateList)(nil), (*v1alpha1.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList(a.(*resource.ResourceClaimTemplateList), b.(*v1alpha1.ResourceClaimTemplateList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimTemplateSpec)(nil), (*resource.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(a.(*v1alpha1.ResourceClaimTemplateSpec), b.(*resource.ResourceClaimTemplateSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateSpec)(nil), (*v1alpha1.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(a.(*resource.ResourceClaimTemplateSpec), b.(*v1alpha1.ResourceClaimTemplateSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClass)(nil), (*resource.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClass_To_resource_ResourceClass(a.(*v1alpha1.ResourceClass), b.(*resource.ResourceClass), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClass)(nil), (*v1alpha1.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClass_To_v1alpha1_ResourceClass(a.(*resource.ResourceClass), b.(*v1alpha1.ResourceClass), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClassList)(nil), (*resource.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClassList_To_resource_ResourceClassList(a.(*v1alpha1.ResourceClassList), b.(*resource.ResourceClassList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClassList)(nil), (*v1alpha1.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClassList_To_v1alpha1_ResourceClassList(a.(*resource.ResourceClassList), b.(*v1alpha1.ResourceClassList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClassParametersReference)(nil), (*resource.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(a.(*v1alpha1.ResourceClassParametersReference), b.(*resource.ResourceClassParametersReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersReference)(nil), (*v1alpha1.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference(a.(*resource.ResourceClassParametersReference), b.(*v1alpha1.ResourceClassParametersReference), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha1_AllocationResult_To_resource_AllocationResult(in *v1alpha1.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error {
out.ResourceHandle = in.ResourceHandle
out.AvailableOnNodes = (*core.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes))
out.Shareable = in.Shareable
return nil
}
// Convert_v1alpha1_AllocationResult_To_resource_AllocationResult is an autogenerated conversion function.
func Convert_v1alpha1_AllocationResult_To_resource_AllocationResult(in *v1alpha1.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error {
return autoConvert_v1alpha1_AllocationResult_To_resource_AllocationResult(in, out, s)
}
func autoConvert_resource_AllocationResult_To_v1alpha1_AllocationResult(in *resource.AllocationResult, out *v1alpha1.AllocationResult, s conversion.Scope) error {
out.ResourceHandle = in.ResourceHandle
out.AvailableOnNodes = (*v1.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes))
out.Shareable = in.Shareable
return nil
}
// Convert_resource_AllocationResult_To_v1alpha1_AllocationResult is an autogenerated conversion function.
func Convert_resource_AllocationResult_To_v1alpha1_AllocationResult(in *resource.AllocationResult, out *v1alpha1.AllocationResult, s conversion.Scope) error {
return autoConvert_resource_AllocationResult_To_v1alpha1_AllocationResult(in, out, s)
}
func autoConvert_v1alpha1_PodScheduling_To_resource_PodScheduling(in *v1alpha1.PodScheduling, out *resource.PodScheduling, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_PodScheduling_To_resource_PodScheduling is an autogenerated conversion function.
func Convert_v1alpha1_PodScheduling_To_resource_PodScheduling(in *v1alpha1.PodScheduling, out *resource.PodScheduling, s conversion.Scope) error {
return autoConvert_v1alpha1_PodScheduling_To_resource_PodScheduling(in, out, s)
}
func autoConvert_resource_PodScheduling_To_v1alpha1_PodScheduling(in *resource.PodScheduling, out *v1alpha1.PodScheduling, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_resource_PodScheduling_To_v1alpha1_PodScheduling is an autogenerated conversion function.
func Convert_resource_PodScheduling_To_v1alpha1_PodScheduling(in *resource.PodScheduling, out *v1alpha1.PodScheduling, s conversion.Scope) error {
return autoConvert_resource_PodScheduling_To_v1alpha1_PodScheduling(in, out, s)
}
func autoConvert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList(in *v1alpha1.PodSchedulingList, out *resource.PodSchedulingList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.PodScheduling)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList is an autogenerated conversion function.
func Convert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList(in *v1alpha1.PodSchedulingList, out *resource.PodSchedulingList, s conversion.Scope) error {
return autoConvert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList(in, out, s)
}
func autoConvert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList(in *resource.PodSchedulingList, out *v1alpha1.PodSchedulingList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha1.PodScheduling)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList is an autogenerated conversion function.
func Convert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList(in *resource.PodSchedulingList, out *v1alpha1.PodSchedulingList, s conversion.Scope) error {
return autoConvert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList(in, out, s)
}
func autoConvert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(in *v1alpha1.PodSchedulingSpec, out *resource.PodSchedulingSpec, s conversion.Scope) error {
out.SelectedNode = in.SelectedNode
out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes))
return nil
}
// Convert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec is an autogenerated conversion function.
func Convert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(in *v1alpha1.PodSchedulingSpec, out *resource.PodSchedulingSpec, s conversion.Scope) error {
return autoConvert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(in, out, s)
}
func autoConvert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(in *resource.PodSchedulingSpec, out *v1alpha1.PodSchedulingSpec, s conversion.Scope) error {
out.SelectedNode = in.SelectedNode
out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes))
return nil
}
// Convert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec is an autogenerated conversion function.
func Convert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(in *resource.PodSchedulingSpec, out *v1alpha1.PodSchedulingSpec, s conversion.Scope) error {
return autoConvert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(in, out, s)
}
func autoConvert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(in *v1alpha1.PodSchedulingStatus, out *resource.PodSchedulingStatus, s conversion.Scope) error {
out.ResourceClaims = *(*[]resource.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims))
return nil
}
// Convert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus is an autogenerated conversion function.
func Convert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(in *v1alpha1.PodSchedulingStatus, out *resource.PodSchedulingStatus, s conversion.Scope) error {
return autoConvert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(in, out, s)
}
func autoConvert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(in *resource.PodSchedulingStatus, out *v1alpha1.PodSchedulingStatus, s conversion.Scope) error {
out.ResourceClaims = *(*[]v1alpha1.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims))
return nil
}
// Convert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus is an autogenerated conversion function.
func Convert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(in *resource.PodSchedulingStatus, out *v1alpha1.PodSchedulingStatus, s conversion.Scope) error {
return autoConvert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaim_To_resource_ResourceClaim(in *v1alpha1.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_ResourceClaim_To_resource_ResourceClaim is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaim_To_resource_ResourceClaim(in *v1alpha1.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaim_To_resource_ResourceClaim(in, out, s)
}
func autoConvert_resource_ResourceClaim_To_v1alpha1_ResourceClaim(in *resource.ResourceClaim, out *v1alpha1.ResourceClaim, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_resource_ResourceClaim_To_v1alpha1_ResourceClaim is an autogenerated conversion function.
func Convert_resource_ResourceClaim_To_v1alpha1_ResourceClaim(in *resource.ResourceClaim, out *v1alpha1.ResourceClaim, s conversion.Scope) error {
return autoConvert_resource_ResourceClaim_To_v1alpha1_ResourceClaim(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha1.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Resource = in.Resource
out.Name = in.Name
out.UID = types.UID(in.UID)
return nil
}
// Convert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha1.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in, out, s)
}
func autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha1.ResourceClaimConsumerReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Resource = in.Resource
out.Name = in.Name
out.UID = types.UID(in.UID)
return nil
}
// Convert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference is an autogenerated conversion function.
func Convert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha1.ResourceClaimConsumerReference, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha1.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceClaim)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha1.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList(in, out, s)
}
func autoConvert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha1.ResourceClaimList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha1.ResourceClaim)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList is an autogenerated conversion function.
func Convert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha1.ResourceClaimList, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha1.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
return nil
}
// Convert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha1.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in, out, s)
}
func autoConvert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha1.ResourceClaimParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
return nil
}
// Convert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference is an autogenerated conversion function.
func Convert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha1.ResourceClaimParametersReference, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha1.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error {
out.Name = in.Name
out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes))
return nil
}
// Convert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha1.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in, out, s)
}
func autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha1.ResourceClaimSchedulingStatus, s conversion.Scope) error {
out.Name = in.Name
out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes))
return nil
}
// Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus is an autogenerated conversion function.
func Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha1.ResourceClaimSchedulingStatus, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha1.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error {
out.ResourceClassName = in.ResourceClassName
out.ParametersRef = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef))
out.AllocationMode = resource.AllocationMode(in.AllocationMode)
return nil
}
// Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha1.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(in, out, s)
}
func autoConvert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha1.ResourceClaimSpec, s conversion.Scope) error {
out.ResourceClassName = in.ResourceClassName
out.ParametersRef = (*v1alpha1.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef))
out.AllocationMode = v1alpha1.AllocationMode(in.AllocationMode)
return nil
}
// Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec is an autogenerated conversion function.
func Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha1.ResourceClaimSpec, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha1.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error {
out.DriverName = in.DriverName
out.Allocation = (*resource.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]resource.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.DeallocationRequested = in.DeallocationRequested
return nil
}
// Convert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha1.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(in, out, s)
}
func autoConvert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha1.ResourceClaimStatus, s conversion.Scope) error {
out.DriverName = in.DriverName
out.Allocation = (*v1alpha1.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]v1alpha1.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.DeallocationRequested = in.DeallocationRequested
return nil
}
// Convert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus is an autogenerated conversion function.
func Convert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha1.ResourceClaimStatus, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha1.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha1.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in, out, s)
}
func autoConvert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha1.ResourceClaimTemplate, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate is an autogenerated conversion function.
func Convert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha1.ResourceClaimTemplate, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha1.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceClaimTemplate)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha1.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in, out, s)
}
func autoConvert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha1.ResourceClaimTemplateList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha1.ResourceClaimTemplate)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList is an autogenerated conversion function.
func Convert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha1.ResourceClaimTemplateList, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha1.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha1.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in, out, s)
}
func autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha1.ResourceClaimTemplateSpec, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec is an autogenerated conversion function.
func Convert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha1.ResourceClaimTemplateSpec, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(in, out, s)
}
func autoConvert_v1alpha1_ResourceClass_To_resource_ResourceClass(in *v1alpha1.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.DriverName = in.DriverName
out.ParametersRef = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef))
out.SuitableNodes = (*core.NodeSelector)(unsafe.Pointer(in.SuitableNodes))
return nil
}
// Convert_v1alpha1_ResourceClass_To_resource_ResourceClass is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClass_To_resource_ResourceClass(in *v1alpha1.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClass_To_resource_ResourceClass(in, out, s)
}
func autoConvert_resource_ResourceClass_To_v1alpha1_ResourceClass(in *resource.ResourceClass, out *v1alpha1.ResourceClass, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.DriverName = in.DriverName
out.ParametersRef = (*v1alpha1.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef))
out.SuitableNodes = (*v1.NodeSelector)(unsafe.Pointer(in.SuitableNodes))
return nil
}
// Convert_resource_ResourceClass_To_v1alpha1_ResourceClass is an autogenerated conversion function.
func Convert_resource_ResourceClass_To_v1alpha1_ResourceClass(in *resource.ResourceClass, out *v1alpha1.ResourceClass, s conversion.Scope) error {
return autoConvert_resource_ResourceClass_To_v1alpha1_ResourceClass(in, out, s)
}
func autoConvert_v1alpha1_ResourceClassList_To_resource_ResourceClassList(in *v1alpha1.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceClass)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha1_ResourceClassList_To_resource_ResourceClassList is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClassList_To_resource_ResourceClassList(in *v1alpha1.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClassList_To_resource_ResourceClassList(in, out, s)
}
func autoConvert_resource_ResourceClassList_To_v1alpha1_ResourceClassList(in *resource.ResourceClassList, out *v1alpha1.ResourceClassList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha1.ResourceClass)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_ResourceClassList_To_v1alpha1_ResourceClassList is an autogenerated conversion function.
func Convert_resource_ResourceClassList_To_v1alpha1_ResourceClassList(in *resource.ResourceClassList, out *v1alpha1.ResourceClassList, s conversion.Scope) error {
return autoConvert_resource_ResourceClassList_To_v1alpha1_ResourceClassList(in, out, s)
}
func autoConvert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha1.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
out.Namespace = in.Namespace
return nil
}
// Convert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha1.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in, out, s)
}
func autoConvert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha1.ResourceClassParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
out.Namespace = in.Namespace
return nil
}
// Convert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference is an autogenerated conversion function.
func Convert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha1.ResourceClassParametersReference, s conversion.Scope) error {
return autoConvert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference(in, out, s)
}

View File

@ -0,0 +1,62 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by defaulter-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "k8s.io/api/resource/v1alpha1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// RegisterDefaults adds defaulters functions to the given scheme.
// Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error {
scheme.AddTypeDefaultingFunc(&v1alpha1.ResourceClaim{}, func(obj interface{}) { SetObjectDefaults_ResourceClaim(obj.(*v1alpha1.ResourceClaim)) })
scheme.AddTypeDefaultingFunc(&v1alpha1.ResourceClaimList{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimList(obj.(*v1alpha1.ResourceClaimList)) })
scheme.AddTypeDefaultingFunc(&v1alpha1.ResourceClaimTemplate{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimTemplate(obj.(*v1alpha1.ResourceClaimTemplate)) })
scheme.AddTypeDefaultingFunc(&v1alpha1.ResourceClaimTemplateList{}, func(obj interface{}) {
SetObjectDefaults_ResourceClaimTemplateList(obj.(*v1alpha1.ResourceClaimTemplateList))
})
return nil
}
func SetObjectDefaults_ResourceClaim(in *v1alpha1.ResourceClaim) {
SetDefaults_ResourceClaimSpec(&in.Spec)
}
func SetObjectDefaults_ResourceClaimList(in *v1alpha1.ResourceClaimList) {
for i := range in.Items {
a := &in.Items[i]
SetObjectDefaults_ResourceClaim(a)
}
}
func SetObjectDefaults_ResourceClaimTemplate(in *v1alpha1.ResourceClaimTemplate) {
SetDefaults_ResourceClaimSpec(&in.Spec.Spec)
}
func SetObjectDefaults_ResourceClaimTemplateList(in *v1alpha1.ResourceClaimTemplateList) {
for i := range in.Items {
a := &in.Items[i]
SetObjectDefaults_ResourceClaimTemplate(a)
}
}

477
pkg/apis/resource/zz_generated.deepcopy.go generated Normal file
View File

@ -0,0 +1,477 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package resource
import (
runtime "k8s.io/apimachinery/pkg/runtime"
core "k8s.io/kubernetes/pkg/apis/core"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AllocationResult) DeepCopyInto(out *AllocationResult) {
*out = *in
if in.AvailableOnNodes != nil {
in, out := &in.AvailableOnNodes, &out.AvailableOnNodes
*out = new(core.NodeSelector)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResult.
func (in *AllocationResult) DeepCopy() *AllocationResult {
if in == nil {
return nil
}
out := new(AllocationResult)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodScheduling) DeepCopyInto(out *PodScheduling) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodScheduling.
func (in *PodScheduling) DeepCopy() *PodScheduling {
if in == nil {
return nil
}
out := new(PodScheduling)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodScheduling) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSchedulingList) DeepCopyInto(out *PodSchedulingList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]PodScheduling, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingList.
func (in *PodSchedulingList) DeepCopy() *PodSchedulingList {
if in == nil {
return nil
}
out := new(PodSchedulingList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodSchedulingList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSchedulingSpec) DeepCopyInto(out *PodSchedulingSpec) {
*out = *in
if in.PotentialNodes != nil {
in, out := &in.PotentialNodes, &out.PotentialNodes
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingSpec.
func (in *PodSchedulingSpec) DeepCopy() *PodSchedulingSpec {
if in == nil {
return nil
}
out := new(PodSchedulingSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSchedulingStatus) DeepCopyInto(out *PodSchedulingStatus) {
*out = *in
if in.ResourceClaims != nil {
in, out := &in.ResourceClaims, &out.ResourceClaims
*out = make([]ResourceClaimSchedulingStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingStatus.
func (in *PodSchedulingStatus) DeepCopy() *PodSchedulingStatus {
if in == nil {
return nil
}
out := new(PodSchedulingStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaim) DeepCopyInto(out *ResourceClaim) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaim.
func (in *ResourceClaim) DeepCopy() *ResourceClaim {
if in == nil {
return nil
}
out := new(ResourceClaim)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClaim) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimConsumerReference) DeepCopyInto(out *ResourceClaimConsumerReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimConsumerReference.
func (in *ResourceClaimConsumerReference) DeepCopy() *ResourceClaimConsumerReference {
if in == nil {
return nil
}
out := new(ResourceClaimConsumerReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimList) DeepCopyInto(out *ResourceClaimList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ResourceClaim, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimList.
func (in *ResourceClaimList) DeepCopy() *ResourceClaimList {
if in == nil {
return nil
}
out := new(ResourceClaimList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClaimList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimParametersReference) DeepCopyInto(out *ResourceClaimParametersReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersReference.
func (in *ResourceClaimParametersReference) DeepCopy() *ResourceClaimParametersReference {
if in == nil {
return nil
}
out := new(ResourceClaimParametersReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimSchedulingStatus) DeepCopyInto(out *ResourceClaimSchedulingStatus) {
*out = *in
if in.UnsuitableNodes != nil {
in, out := &in.UnsuitableNodes, &out.UnsuitableNodes
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSchedulingStatus.
func (in *ResourceClaimSchedulingStatus) DeepCopy() *ResourceClaimSchedulingStatus {
if in == nil {
return nil
}
out := new(ResourceClaimSchedulingStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec) {
*out = *in
if in.ParametersRef != nil {
in, out := &in.ParametersRef, &out.ParametersRef
*out = new(ResourceClaimParametersReference)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSpec.
func (in *ResourceClaimSpec) DeepCopy() *ResourceClaimSpec {
if in == nil {
return nil
}
out := new(ResourceClaimSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus) {
*out = *in
if in.Allocation != nil {
in, out := &in.Allocation, &out.Allocation
*out = new(AllocationResult)
(*in).DeepCopyInto(*out)
}
if in.ReservedFor != nil {
in, out := &in.ReservedFor, &out.ReservedFor
*out = make([]ResourceClaimConsumerReference, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimStatus.
func (in *ResourceClaimStatus) DeepCopy() *ResourceClaimStatus {
if in == nil {
return nil
}
out := new(ResourceClaimStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimTemplate) DeepCopyInto(out *ResourceClaimTemplate) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplate.
func (in *ResourceClaimTemplate) DeepCopy() *ResourceClaimTemplate {
if in == nil {
return nil
}
out := new(ResourceClaimTemplate)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClaimTemplate) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimTemplateList) DeepCopyInto(out *ResourceClaimTemplateList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ResourceClaimTemplate, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateList.
func (in *ResourceClaimTemplateList) DeepCopy() *ResourceClaimTemplateList {
if in == nil {
return nil
}
out := new(ResourceClaimTemplateList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClaimTemplateList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimTemplateSpec) DeepCopyInto(out *ResourceClaimTemplateSpec) {
*out = *in
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateSpec.
func (in *ResourceClaimTemplateSpec) DeepCopy() *ResourceClaimTemplateSpec {
if in == nil {
return nil
}
out := new(ResourceClaimTemplateSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClass) DeepCopyInto(out *ResourceClass) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.ParametersRef != nil {
in, out := &in.ParametersRef, &out.ParametersRef
*out = new(ResourceClassParametersReference)
**out = **in
}
if in.SuitableNodes != nil {
in, out := &in.SuitableNodes, &out.SuitableNodes
*out = new(core.NodeSelector)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClass.
func (in *ResourceClass) DeepCopy() *ResourceClass {
if in == nil {
return nil
}
out := new(ResourceClass)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClass) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClassList) DeepCopyInto(out *ResourceClassList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ResourceClass, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassList.
func (in *ResourceClassList) DeepCopy() *ResourceClassList {
if in == nil {
return nil
}
out := new(ResourceClassList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClassList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClassParametersReference) DeepCopyInto(out *ResourceClassParametersReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersReference.
func (in *ResourceClassParametersReference) DeepCopy() *ResourceClassParametersReference {
if in == nil {
return nil
}
out := new(ResourceClassParametersReference)
in.DeepCopyInto(out)
return out
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -400,6 +400,36 @@ message CinderVolumeSource {
optional LocalObjectReference secretRef = 4; optional LocalObjectReference secretRef = 4;
} }
// ClaimSource describes a reference to a ResourceClaim.
//
// Exactly one of these fields should be set. Consumers of this type must
// treat an empty object as if it has an unknown value.
message ClaimSource {
// ResourceClaimName is the name of a ResourceClaim object in the same
// namespace as this pod.
optional string resourceClaimName = 1;
// ResourceClaimTemplateName is the name of a ResourceClaimTemplate
// object in the same namespace as this pod.
//
// The template will be used to create a new ResourceClaim, which will
// be bound to this pod. When this pod is deleted, the ResourceClaim
// will also be deleted. The name of the ResourceClaim will be <pod
// name>-<resource name>, where <resource name> is the
// PodResourceClaim.Name. Pod validation will reject the pod if the
// concatenated name is not valid for a ResourceClaim (e.g. too long).
//
// An existing ResourceClaim with that name that is not owned by the
// pod will not be used for the pod to avoid using an unrelated
// resource by mistake. Scheduling and pod startup are then blocked
// until the unrelated ResourceClaim is removed.
//
// This field is immutable and no changes will be made to the
// corresponding ResourceClaim by the control plane after creating the
// ResourceClaim.
optional string resourceClaimTemplateName = 2;
}
// ClientIPConfig represents the configurations of Client IP based session affinity. // ClientIPConfig represents the configurations of Client IP based session affinity.
message ClientIPConfig { message ClientIPConfig {
// timeoutSeconds specifies the seconds of ClientIP type session sticky time. // timeoutSeconds specifies the seconds of ClientIP type session sticky time.
@ -3360,6 +3390,18 @@ message PodReadinessGate {
optional string conditionType = 1; optional string conditionType = 1;
} }
// PodResourceClaim references exactly one ResourceClaim through a ClaimSource.
// It adds a name to it that uniquely identifies the ResourceClaim inside the Pod.
// Containers that need access to the ResourceClaim reference it with this name.
message PodResourceClaim {
// Name uniquely identifies this resource claim inside the pod.
// This must be a DNS_LABEL.
optional string name = 1;
// Source describes where to find the ResourceClaim.
optional ClaimSource source = 2;
}
// PodSchedulingGate is associated to a Pod to guard its scheduling. // PodSchedulingGate is associated to a Pod to guard its scheduling.
message PodSchedulingGate { message PodSchedulingGate {
// Name of the scheduling gate. // Name of the scheduling gate.
@ -3775,6 +3817,24 @@ message PodSpec {
// +listType=map // +listType=map
// +listMapKey=name // +listMapKey=name
repeated PodSchedulingGate schedulingGates = 38; repeated PodSchedulingGate schedulingGates = 38;
// ResourceClaims defines which ResourceClaims must be allocated
// and reserved before the Pod is allowed to start. The resources
// will be made available to those containers which consume them
// by name.
//
// This is an alpha field and requires enabling the
// DynamicResourceAllocation feature gate.
//
// This field is immutable.
//
// +patchMergeKey=name
// +patchStrategy=merge,retainKeys
// +listType=map
// +listMapKey=name
// +featureGate=DynamicResourceAllocation
// +optional
repeated PodResourceClaim resourceClaims = 39;
} }
// PodStatus represents information about the status of a pod. Status may trail the actual // PodStatus represents information about the status of a pod. Status may trail the actual
@ -4348,6 +4408,14 @@ message ReplicationControllerStatus {
repeated ReplicationControllerCondition conditions = 6; repeated ReplicationControllerCondition conditions = 6;
} }
// ResourceClaim references one entry in PodSpec.ResourceClaims.
message ResourceClaim {
// Name must match the name of one entry in pod.spec.resourceClaims of
// the Pod where this field is used. It makes that resource available
// inside a container.
optional string name = 1;
}
// ResourceFieldSelector represents container resources (cpu, memory) and their output format // ResourceFieldSelector represents container resources (cpu, memory) and their output format
// +structType=atomic // +structType=atomic
message ResourceFieldSelector { message ResourceFieldSelector {
@ -4437,6 +4505,19 @@ message ResourceRequirements {
// More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
// +optional // +optional
map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> requests = 2; map<string, k8s.io.apimachinery.pkg.api.resource.Quantity> requests = 2;
// Claims lists the names of resources, defined in spec.resourceClaims,
// that are used by this container.
//
// This is an alpha field and requires enabling the
// DynamicResourceAllocation feature gate.
//
// This field is immutable.
//
// +listType=set
// +featureGate=DynamicResourceAllocation
// +optional
repeated ResourceClaim claims = 3;
} }
// SELinuxOptions are the labels to be applied to the container // SELinuxOptions are the labels to be applied to the container

View File

@ -209,6 +209,16 @@ func (CinderVolumeSource) SwaggerDoc() map[string]string {
return map_CinderVolumeSource return map_CinderVolumeSource
} }
var map_ClaimSource = map[string]string{
"": "ClaimSource describes a reference to a ResourceClaim.\n\nExactly one of these fields should be set. Consumers of this type must treat an empty object as if it has an unknown value.",
"resourceClaimName": "ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod.",
"resourceClaimTemplateName": "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod.\n\nThe template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be <pod name>-<resource name>, where <resource name> is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long).\n\nAn existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed.\n\nThis field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.",
}
func (ClaimSource) SwaggerDoc() map[string]string {
return map_ClaimSource
}
var map_ClientIPConfig = map[string]string{ var map_ClientIPConfig = map[string]string{
"": "ClientIPConfig represents the configurations of Client IP based session affinity.", "": "ClientIPConfig represents the configurations of Client IP based session affinity.",
"timeoutSeconds": "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", "timeoutSeconds": "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).",
@ -1606,6 +1616,16 @@ func (PodReadinessGate) SwaggerDoc() map[string]string {
return map_PodReadinessGate return map_PodReadinessGate
} }
var map_PodResourceClaim = map[string]string{
"": "PodResourceClaim references exactly one ResourceClaim through a ClaimSource. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name.",
"name": "Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL.",
"source": "Source describes where to find the ResourceClaim.",
}
func (PodResourceClaim) SwaggerDoc() map[string]string {
return map_PodResourceClaim
}
var map_PodSchedulingGate = map[string]string{ var map_PodSchedulingGate = map[string]string{
"": "PodSchedulingGate is associated to a Pod to guard its scheduling.", "": "PodSchedulingGate is associated to a Pod to guard its scheduling.",
"name": "Name of the scheduling gate. Each scheduling gate must have a unique name field.", "name": "Name of the scheduling gate. Each scheduling gate must have a unique name field.",
@ -1682,6 +1702,7 @@ var map_PodSpec = map[string]string{
"os": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", "os": "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup",
"hostUsers": "Use the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.", "hostUsers": "Use the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.",
"schedulingGates": "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. More info: https://git.k8s.io/enhancements/keps/sig-scheduling/3521-pod-scheduling-readiness.\n\nThis is an alpha-level feature enabled by PodSchedulingReadiness feature gate.", "schedulingGates": "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. More info: https://git.k8s.io/enhancements/keps/sig-scheduling/3521-pod-scheduling-readiness.\n\nThis is an alpha-level feature enabled by PodSchedulingReadiness feature gate.",
"resourceClaims": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.",
} }
func (PodSpec) SwaggerDoc() map[string]string { func (PodSpec) SwaggerDoc() map[string]string {
@ -1954,6 +1975,15 @@ func (ReplicationControllerStatus) SwaggerDoc() map[string]string {
return map_ReplicationControllerStatus return map_ReplicationControllerStatus
} }
var map_ResourceClaim = map[string]string{
"": "ResourceClaim references one entry in PodSpec.ResourceClaims.",
"name": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.",
}
func (ResourceClaim) SwaggerDoc() map[string]string {
return map_ResourceClaim
}
var map_ResourceFieldSelector = map[string]string{ var map_ResourceFieldSelector = map[string]string{
"": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", "": "ResourceFieldSelector represents container resources (cpu, memory) and their output format",
"containerName": "Container name: required for volumes, optional for env vars", "containerName": "Container name: required for volumes, optional for env vars",
@ -2011,6 +2041,7 @@ var map_ResourceRequirements = map[string]string{
"": "ResourceRequirements describes the compute resource requirements.", "": "ResourceRequirements describes the compute resource requirements.",
"limits": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", "limits": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
"requests": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", "requests": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/",
"claims": "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.",
} }
func (ResourceRequirements) SwaggerDoc() map[string]string { func (ResourceRequirements) SwaggerDoc() map[string]string {

View File

@ -419,6 +419,32 @@ func (in *CinderVolumeSource) DeepCopy() *CinderVolumeSource {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClaimSource) DeepCopyInto(out *ClaimSource) {
*out = *in
if in.ResourceClaimName != nil {
in, out := &in.ResourceClaimName, &out.ResourceClaimName
*out = new(string)
**out = **in
}
if in.ResourceClaimTemplateName != nil {
in, out := &in.ResourceClaimTemplateName, &out.ResourceClaimTemplateName
*out = new(string)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimSource.
func (in *ClaimSource) DeepCopy() *ClaimSource {
if in == nil {
return nil
}
out := new(ClaimSource)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClientIPConfig) DeepCopyInto(out *ClientIPConfig) { func (in *ClientIPConfig) DeepCopyInto(out *ClientIPConfig) {
*out = *in *out = *in
@ -3726,6 +3752,23 @@ func (in *PodReadinessGate) DeepCopy() *PodReadinessGate {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodResourceClaim) DeepCopyInto(out *PodResourceClaim) {
*out = *in
in.Source.DeepCopyInto(&out.Source)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodResourceClaim.
func (in *PodResourceClaim) DeepCopy() *PodResourceClaim {
if in == nil {
return nil
}
out := new(PodResourceClaim)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSchedulingGate) DeepCopyInto(out *PodSchedulingGate) { func (in *PodSchedulingGate) DeepCopyInto(out *PodSchedulingGate) {
*out = *in *out = *in
@ -3980,6 +4023,13 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) {
*out = make([]PodSchedulingGate, len(*in)) *out = make([]PodSchedulingGate, len(*in))
copy(*out, *in) copy(*out, *in)
} }
if in.ResourceClaims != nil {
in, out := &in.ResourceClaims, &out.ResourceClaims
*out = make([]PodResourceClaim, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return return
} }
@ -4563,6 +4613,22 @@ func (in *ReplicationControllerStatus) DeepCopy() *ReplicationControllerStatus {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaim) DeepCopyInto(out *ResourceClaim) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaim.
func (in *ResourceClaim) DeepCopy() *ResourceClaim {
if in == nil {
return nil
}
out := new(ResourceClaim)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceFieldSelector) DeepCopyInto(out *ResourceFieldSelector) { func (in *ResourceFieldSelector) DeepCopyInto(out *ResourceFieldSelector) {
*out = *in *out = *in
@ -4743,6 +4809,11 @@ func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements) {
(*out)[key] = val.DeepCopy() (*out)[key] = val.DeepCopy()
} }
} }
if in.Claims != nil {
in, out := &in.Claims, &out.Claims
*out = make([]ResourceClaim, len(*in))
copy(*out, *in)
}
return return
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,371 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
syntax = "proto2";
package k8s.io.api.resource.v1alpha1;
import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "k8s.io/api/resource/v1alpha1";
// AllocationResult contains attributed of an allocated resource.
message AllocationResult {
// ResourceHandle contains arbitrary data returned by the driver after a
// successful allocation. This is opaque for
// Kubernetes. Driver documentation may explain to users how to
// interpret this data if needed.
//
// The maximum size of this field is 16KiB. This may get
// increased in the future, but not reduced.
// +optional
optional string resourceHandle = 1;
// This field will get set by the resource driver after it has
// allocated the resource driver to inform the scheduler where it can
// schedule Pods using the ResourceClaim.
//
// Setting this field is optional. If null, the resource is available
// everywhere.
// +optional
optional k8s.io.api.core.v1.NodeSelector availableOnNodes = 2;
// Shareable determines whether the resource supports more
// than one consumer at a time.
// +optional
optional bool shareable = 3;
}
// PodScheduling objects hold information that is needed to schedule
// a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation
// mode.
//
// This is an alpha type and requires enabling the DynamicResourceAllocation
// feature gate.
message PodScheduling {
// Standard object metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec describes where resources for the Pod are needed.
optional PodSchedulingSpec spec = 2;
// Status describes where resources for the Pod can be allocated.
// +optional
optional PodSchedulingStatus status = 3;
}
// PodSchedulingList is a collection of Pod scheduling objects.
message PodSchedulingList {
// Standard list metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// Items is the list of PodScheduling objects.
repeated PodScheduling items = 2;
}
// PodSchedulingSpec describes where resources for the Pod are needed.
message PodSchedulingSpec {
// SelectedNode is the node for which allocation of ResourceClaims that
// are referenced by the Pod and that use "WaitForFirstConsumer"
// allocation is to be attempted.
// +optional
optional string selectedNode = 1;
// PotentialNodes lists nodes where the Pod might be able to run.
//
// The size of this field is limited to 128. This is large enough for
// many clusters. Larger clusters may need more attempts to find a node
// that suits all pending resources. This may get increased in the
// future, but not reduced.
//
// +listType=set
// +optional
repeated string potentialNodes = 2;
}
// PodSchedulingStatus describes where resources for the Pod can be allocated.
message PodSchedulingStatus {
// ResourceClaims describes resource availability for each
// pod.spec.resourceClaim entry where the corresponding ResourceClaim
// uses "WaitForFirstConsumer" allocation mode.
//
// +listType=map
// +listMapKey=name
// +optional
repeated ResourceClaimSchedulingStatus resourceClaims = 1;
}
// ResourceClaim describes which resources are needed by a resource consumer.
// Its status tracks whether the resource has been allocated and what the
// resulting attributes are.
//
// This is an alpha type and requires enabling the DynamicResourceAllocation
// feature gate.
message ResourceClaim {
// Standard object metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec describes the desired attributes of a resource that then needs
// to be allocated. It can only be set once when creating the
// ResourceClaim.
optional ResourceClaimSpec spec = 2;
// Status describes whether the resource is available and with which
// attributes.
// +optional
optional ResourceClaimStatus status = 3;
}
// ResourceClaimConsumerReference contains enough information to let you
// locate the consumer of a ResourceClaim. The user must be a resource in the same
// namespace as the ResourceClaim.
message ResourceClaimConsumerReference {
// APIGroup is the group for the resource being referenced. It is
// empty for the core API. This matches the group in the APIVersion
// that is used when creating the resources.
// +optional
optional string apiGroup = 1;
// Resource is the type of resource being referenced, for example "pods".
optional string resource = 3;
// Name is the name of resource being referenced.
optional string name = 4;
// UID identifies exactly one incarnation of the resource.
optional string uid = 5;
}
// ResourceClaimList is a collection of claims.
message ResourceClaimList {
// Standard list metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// Items is the list of resource claims.
repeated ResourceClaim items = 2;
}
// ResourceClaimParametersReference contains enough information to let you
// locate the parameters for a ResourceClaim. The object must be in the same
// namespace as the ResourceClaim.
message ResourceClaimParametersReference {
// APIGroup is the group for the resource being referenced. It is
// empty for the core API. This matches the group in the APIVersion
// that is used when creating the resources.
// +optional
optional string apiGroup = 1;
// Kind is the type of resource being referenced. This is the same
// value as in the parameter object's metadata, for example "ConfigMap".
optional string kind = 2;
// Name is the name of resource being referenced.
optional string name = 3;
}
// ResourceClaimSchedulingStatus contains information about one particular
// ResourceClaim with "WaitForFirstConsumer" allocation mode.
message ResourceClaimSchedulingStatus {
// Name matches the pod.spec.resourceClaims[*].Name field.
// +optional
optional string name = 1;
// UnsuitableNodes lists nodes that the ResourceClaim cannot be
// allocated for.
//
// The size of this field is limited to 128, the same as for
// PodSchedulingSpec.PotentialNodes. This may get increased in the
// future, but not reduced.
//
// +listType=set
// +optional
repeated string unsuitableNodes = 2;
}
// ResourceClaimSpec defines how a resource is to be allocated.
message ResourceClaimSpec {
// ResourceClassName references the driver and additional parameters
// via the name of a ResourceClass that was created as part of the
// driver deployment.
optional string resourceClassName = 1;
// ParametersRef references a separate object with arbitrary parameters
// that will be used by the driver when allocating a resource for the
// claim.
//
// The object must be in the same namespace as the ResourceClaim.
// +optional
optional ResourceClaimParametersReference parametersRef = 2;
// Allocation can start immediately or when a Pod wants to use the
// resource. "WaitForFirstConsumer" is the default.
// +optional
optional string allocationMode = 3;
}
// ResourceClaimStatus tracks whether the resource has been allocated and what
// the resulting attributes are.
message ResourceClaimStatus {
// DriverName is a copy of the driver name from the ResourceClass at
// the time when allocation started.
// +optional
optional string driverName = 1;
// Allocation is set by the resource driver once a resource has been
// allocated successfully. If this is not specified, the resource is
// not yet allocated.
// +optional
optional AllocationResult allocation = 2;
// ReservedFor indicates which entities are currently allowed to use
// the claim. A Pod which references a ResourceClaim which is not
// reserved for that Pod will not be started.
//
// There can be at most 32 such reservations. This may get increased in
// the future, but not reduced.
//
// +listType=set
// +optional
repeated ResourceClaimConsumerReference reservedFor = 3;
// DeallocationRequested indicates that a ResourceClaim is to be
// deallocated.
//
// The driver then must deallocate this claim and reset the field
// together with clearing the Allocation field.
//
// While DeallocationRequested is set, no new consumers may be added to
// ReservedFor.
// +optional
optional bool deallocationRequested = 4;
}
// ResourceClaimTemplate is used to produce ResourceClaim objects.
message ResourceClaimTemplate {
// Standard object metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Describes the ResourceClaim that is to be generated.
//
// This field is immutable. A ResourceClaim will get created by the
// control plane for a Pod when needed and then not get updated
// anymore.
optional ResourceClaimTemplateSpec spec = 2;
}
// ResourceClaimTemplateList is a collection of claim templates.
message ResourceClaimTemplateList {
// Standard list metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// Items is the list of resource claim templates.
repeated ResourceClaimTemplate items = 2;
}
// ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
message ResourceClaimTemplateSpec {
// ObjectMeta may contain labels and annotations that will be copied into the PVC
// when creating it. No other fields are allowed and will be rejected during
// validation.
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec for the ResourceClaim. The entire content is copied unchanged
// into the ResourceClaim that gets created from this template. The
// same fields as in a ResourceClaim are also valid here.
optional ResourceClaimSpec spec = 2;
}
// ResourceClass is used by administrators to influence how resources
// are allocated.
//
// This is an alpha type and requires enabling the DynamicResourceAllocation
// feature gate.
message ResourceClass {
// Standard object metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// DriverName defines the name of the dynamic resource driver that is
// used for allocation of a ResourceClaim that uses this class.
//
// Resource drivers have a unique name in forward domain order
// (acme.example.com).
optional string driverName = 2;
// ParametersRef references an arbitrary separate object that may hold
// parameters that will be used by the driver when allocating a
// resource that uses this class. A dynamic resource driver can
// distinguish between parameters stored here and and those stored in
// ResourceClaimSpec.
// +optional
optional ResourceClassParametersReference parametersRef = 3;
// Only nodes matching the selector will be considered by the scheduler
// when trying to find a Node that fits a Pod when that Pod uses
// a ResourceClaim that has not been allocated yet.
//
// Setting this field is optional. If null, all nodes are candidates.
// +optional
optional k8s.io.api.core.v1.NodeSelector suitableNodes = 4;
}
// ResourceClassList is a collection of classes.
message ResourceClassList {
// Standard list metadata
// +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// Items is the list of resource classes.
repeated ResourceClass items = 2;
}
// ResourceClassParametersReference contains enough information to let you
// locate the parameters for a ResourceClass.
message ResourceClassParametersReference {
// APIGroup is the group for the resource being referenced. It is
// empty for the core API. This matches the group in the APIVersion
// that is used when creating the resources.
// +optional
optional string apiGroup = 1;
// Kind is the type of resource being referenced. This is the same
// value as in the parameter object's metadata.
optional string kind = 2;
// Name is the name of resource being referenced.
optional string name = 3;
// Namespace that contains the referenced resource. Must be empty
// for cluster-scoped resources and non-empty for namespaced
// resources.
// +optional
optional string namespace = 4;
}

View File

@ -0,0 +1,222 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
// This file contains a collection of methods that can be used from go-restful to
// generate Swagger API documentation for its models. Please read this PR for more
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
//
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
// they are on one line! For multiple line or blocks that you want to ignore use ---.
// Any context after a --- is ignored.
//
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
var map_AllocationResult = map[string]string{
"": "AllocationResult contains attributed of an allocated resource.",
"resourceHandle": "ResourceHandle contains arbitrary data returned by the driver after a successful allocation. This is opaque for Kubernetes. Driver documentation may explain to users how to interpret this data if needed.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.",
"availableOnNodes": "This field will get set by the resource driver after it has allocated the resource driver to inform the scheduler where it can schedule Pods using the ResourceClaim.\n\nSetting this field is optional. If null, the resource is available everywhere.",
"shareable": "Shareable determines whether the resource supports more than one consumer at a time.",
}
func (AllocationResult) SwaggerDoc() map[string]string {
return map_AllocationResult
}
var map_PodScheduling = map[string]string{
"": "PodScheduling objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
"metadata": "Standard object metadata",
"spec": "Spec describes where resources for the Pod are needed.",
"status": "Status describes where resources for the Pod can be allocated.",
}
func (PodScheduling) SwaggerDoc() map[string]string {
return map_PodScheduling
}
var map_PodSchedulingList = map[string]string{
"": "PodSchedulingList is a collection of Pod scheduling objects.",
"metadata": "Standard list metadata",
"items": "Items is the list of PodScheduling objects.",
}
func (PodSchedulingList) SwaggerDoc() map[string]string {
return map_PodSchedulingList
}
var map_PodSchedulingSpec = map[string]string{
"": "PodSchedulingSpec describes where resources for the Pod are needed.",
"selectedNode": "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.",
"potentialNodes": "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.",
}
func (PodSchedulingSpec) SwaggerDoc() map[string]string {
return map_PodSchedulingSpec
}
var map_PodSchedulingStatus = map[string]string{
"": "PodSchedulingStatus describes where resources for the Pod can be allocated.",
"resourceClaims": "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.",
}
func (PodSchedulingStatus) SwaggerDoc() map[string]string {
return map_PodSchedulingStatus
}
var map_ResourceClaim = map[string]string{
"": "ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
"metadata": "Standard object metadata",
"spec": "Spec describes the desired attributes of a resource that then needs to be allocated. It can only be set once when creating the ResourceClaim.",
"status": "Status describes whether the resource is available and with which attributes.",
}
func (ResourceClaim) SwaggerDoc() map[string]string {
return map_ResourceClaim
}
var map_ResourceClaimConsumerReference = map[string]string{
"": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.",
"apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.",
"resource": "Resource is the type of resource being referenced, for example \"pods\".",
"name": "Name is the name of resource being referenced.",
"uid": "UID identifies exactly one incarnation of the resource.",
}
func (ResourceClaimConsumerReference) SwaggerDoc() map[string]string {
return map_ResourceClaimConsumerReference
}
var map_ResourceClaimList = map[string]string{
"": "ResourceClaimList is a collection of claims.",
"metadata": "Standard list metadata",
"items": "Items is the list of resource claims.",
}
func (ResourceClaimList) SwaggerDoc() map[string]string {
return map_ResourceClaimList
}
var map_ResourceClaimParametersReference = map[string]string{
"": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.",
"apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.",
"kind": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata, for example \"ConfigMap\".",
"name": "Name is the name of resource being referenced.",
}
func (ResourceClaimParametersReference) SwaggerDoc() map[string]string {
return map_ResourceClaimParametersReference
}
var map_ResourceClaimSchedulingStatus = map[string]string{
"": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.",
"name": "Name matches the pod.spec.resourceClaims[*].Name field.",
"unsuitableNodes": "UnsuitableNodes lists nodes that the ResourceClaim cannot be allocated for.\n\nThe size of this field is limited to 128, the same as for PodSchedulingSpec.PotentialNodes. This may get increased in the future, but not reduced.",
}
func (ResourceClaimSchedulingStatus) SwaggerDoc() map[string]string {
return map_ResourceClaimSchedulingStatus
}
var map_ResourceClaimSpec = map[string]string{
"": "ResourceClaimSpec defines how a resource is to be allocated.",
"resourceClassName": "ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.",
"parametersRef": "ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.\n\nThe object must be in the same namespace as the ResourceClaim.",
"allocationMode": "Allocation can start immediately or when a Pod wants to use the resource. \"WaitForFirstConsumer\" is the default.",
}
func (ResourceClaimSpec) SwaggerDoc() map[string]string {
return map_ResourceClaimSpec
}
var map_ResourceClaimStatus = map[string]string{
"": "ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.",
"driverName": "DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.",
"allocation": "Allocation is set by the resource driver once a resource has been allocated successfully. If this is not specified, the resource is not yet allocated.",
"reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.",
"deallocationRequested": "DeallocationRequested indicates that a ResourceClaim is to be deallocated.\n\nThe driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nWhile DeallocationRequested is set, no new consumers may be added to ReservedFor.",
}
func (ResourceClaimStatus) SwaggerDoc() map[string]string {
return map_ResourceClaimStatus
}
var map_ResourceClaimTemplate = map[string]string{
"": "ResourceClaimTemplate is used to produce ResourceClaim objects.",
"metadata": "Standard object metadata",
"spec": "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.",
}
func (ResourceClaimTemplate) SwaggerDoc() map[string]string {
return map_ResourceClaimTemplate
}
var map_ResourceClaimTemplateList = map[string]string{
"": "ResourceClaimTemplateList is a collection of claim templates.",
"metadata": "Standard list metadata",
"items": "Items is the list of resource claim templates.",
}
func (ResourceClaimTemplateList) SwaggerDoc() map[string]string {
return map_ResourceClaimTemplateList
}
var map_ResourceClaimTemplateSpec = map[string]string{
"": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.",
"metadata": "ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.",
"spec": "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.",
}
func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string {
return map_ResourceClaimTemplateSpec
}
var map_ResourceClass = map[string]string{
"": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.",
"metadata": "Standard object metadata",
"driverName": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).",
"parametersRef": "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.",
"suitableNodes": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates.",
}
func (ResourceClass) SwaggerDoc() map[string]string {
return map_ResourceClass
}
var map_ResourceClassList = map[string]string{
"": "ResourceClassList is a collection of classes.",
"metadata": "Standard list metadata",
"items": "Items is the list of resource classes.",
}
func (ResourceClassList) SwaggerDoc() map[string]string {
return map_ResourceClassList
}
var map_ResourceClassParametersReference = map[string]string{
"": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.",
"apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.",
"kind": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata.",
"name": "Name is the name of resource being referenced.",
"namespace": "Namespace that contains the referenced resource. Must be empty for cluster-scoped resources and non-empty for namespaced resources.",
}
func (ResourceClassParametersReference) SwaggerDoc() map[string]string {
return map_ResourceClassParametersReference
}
// AUTO-GENERATED FUNCTIONS END HERE

View File

@ -0,0 +1,477 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AllocationResult) DeepCopyInto(out *AllocationResult) {
*out = *in
if in.AvailableOnNodes != nil {
in, out := &in.AvailableOnNodes, &out.AvailableOnNodes
*out = new(v1.NodeSelector)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResult.
func (in *AllocationResult) DeepCopy() *AllocationResult {
if in == nil {
return nil
}
out := new(AllocationResult)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodScheduling) DeepCopyInto(out *PodScheduling) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodScheduling.
func (in *PodScheduling) DeepCopy() *PodScheduling {
if in == nil {
return nil
}
out := new(PodScheduling)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodScheduling) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSchedulingList) DeepCopyInto(out *PodSchedulingList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]PodScheduling, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingList.
func (in *PodSchedulingList) DeepCopy() *PodSchedulingList {
if in == nil {
return nil
}
out := new(PodSchedulingList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodSchedulingList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSchedulingSpec) DeepCopyInto(out *PodSchedulingSpec) {
*out = *in
if in.PotentialNodes != nil {
in, out := &in.PotentialNodes, &out.PotentialNodes
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingSpec.
func (in *PodSchedulingSpec) DeepCopy() *PodSchedulingSpec {
if in == nil {
return nil
}
out := new(PodSchedulingSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSchedulingStatus) DeepCopyInto(out *PodSchedulingStatus) {
*out = *in
if in.ResourceClaims != nil {
in, out := &in.ResourceClaims, &out.ResourceClaims
*out = make([]ResourceClaimSchedulingStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSchedulingStatus.
func (in *PodSchedulingStatus) DeepCopy() *PodSchedulingStatus {
if in == nil {
return nil
}
out := new(PodSchedulingStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaim) DeepCopyInto(out *ResourceClaim) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaim.
func (in *ResourceClaim) DeepCopy() *ResourceClaim {
if in == nil {
return nil
}
out := new(ResourceClaim)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClaim) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimConsumerReference) DeepCopyInto(out *ResourceClaimConsumerReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimConsumerReference.
func (in *ResourceClaimConsumerReference) DeepCopy() *ResourceClaimConsumerReference {
if in == nil {
return nil
}
out := new(ResourceClaimConsumerReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimList) DeepCopyInto(out *ResourceClaimList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ResourceClaim, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimList.
func (in *ResourceClaimList) DeepCopy() *ResourceClaimList {
if in == nil {
return nil
}
out := new(ResourceClaimList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClaimList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimParametersReference) DeepCopyInto(out *ResourceClaimParametersReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersReference.
func (in *ResourceClaimParametersReference) DeepCopy() *ResourceClaimParametersReference {
if in == nil {
return nil
}
out := new(ResourceClaimParametersReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimSchedulingStatus) DeepCopyInto(out *ResourceClaimSchedulingStatus) {
*out = *in
if in.UnsuitableNodes != nil {
in, out := &in.UnsuitableNodes, &out.UnsuitableNodes
*out = make([]string, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSchedulingStatus.
func (in *ResourceClaimSchedulingStatus) DeepCopy() *ResourceClaimSchedulingStatus {
if in == nil {
return nil
}
out := new(ResourceClaimSchedulingStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec) {
*out = *in
if in.ParametersRef != nil {
in, out := &in.ParametersRef, &out.ParametersRef
*out = new(ResourceClaimParametersReference)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimSpec.
func (in *ResourceClaimSpec) DeepCopy() *ResourceClaimSpec {
if in == nil {
return nil
}
out := new(ResourceClaimSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimStatus) DeepCopyInto(out *ResourceClaimStatus) {
*out = *in
if in.Allocation != nil {
in, out := &in.Allocation, &out.Allocation
*out = new(AllocationResult)
(*in).DeepCopyInto(*out)
}
if in.ReservedFor != nil {
in, out := &in.ReservedFor, &out.ReservedFor
*out = make([]ResourceClaimConsumerReference, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimStatus.
func (in *ResourceClaimStatus) DeepCopy() *ResourceClaimStatus {
if in == nil {
return nil
}
out := new(ResourceClaimStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimTemplate) DeepCopyInto(out *ResourceClaimTemplate) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplate.
func (in *ResourceClaimTemplate) DeepCopy() *ResourceClaimTemplate {
if in == nil {
return nil
}
out := new(ResourceClaimTemplate)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClaimTemplate) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimTemplateList) DeepCopyInto(out *ResourceClaimTemplateList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ResourceClaimTemplate, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateList.
func (in *ResourceClaimTemplateList) DeepCopy() *ResourceClaimTemplateList {
if in == nil {
return nil
}
out := new(ResourceClaimTemplateList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClaimTemplateList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClaimTemplateSpec) DeepCopyInto(out *ResourceClaimTemplateSpec) {
*out = *in
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimTemplateSpec.
func (in *ResourceClaimTemplateSpec) DeepCopy() *ResourceClaimTemplateSpec {
if in == nil {
return nil
}
out := new(ResourceClaimTemplateSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClass) DeepCopyInto(out *ResourceClass) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.ParametersRef != nil {
in, out := &in.ParametersRef, &out.ParametersRef
*out = new(ResourceClassParametersReference)
**out = **in
}
if in.SuitableNodes != nil {
in, out := &in.SuitableNodes, &out.SuitableNodes
*out = new(v1.NodeSelector)
(*in).DeepCopyInto(*out)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClass.
func (in *ResourceClass) DeepCopy() *ResourceClass {
if in == nil {
return nil
}
out := new(ResourceClass)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClass) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClassList) DeepCopyInto(out *ResourceClassList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ResourceClass, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassList.
func (in *ResourceClassList) DeepCopy() *ResourceClassList {
if in == nil {
return nil
}
out := new(ResourceClassList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ResourceClassList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceClassParametersReference) DeepCopyInto(out *ResourceClassParametersReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersReference.
func (in *ResourceClassParametersReference) DeepCopy() *ResourceClassParametersReference {
if in == nil {
return nil
}
out := new(ResourceClassParametersReference)
in.DeepCopyInto(out)
return out
}

View File

@ -0,0 +1,48 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// ClaimSourceApplyConfiguration represents an declarative configuration of the ClaimSource type for use
// with apply.
type ClaimSourceApplyConfiguration struct {
ResourceClaimName *string `json:"resourceClaimName,omitempty"`
ResourceClaimTemplateName *string `json:"resourceClaimTemplateName,omitempty"`
}
// ClaimSourceApplyConfiguration constructs an declarative configuration of the ClaimSource type for use with
// apply.
func ClaimSource() *ClaimSourceApplyConfiguration {
return &ClaimSourceApplyConfiguration{}
}
// WithResourceClaimName sets the ResourceClaimName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceClaimName field is set to the value of the last call.
func (b *ClaimSourceApplyConfiguration) WithResourceClaimName(value string) *ClaimSourceApplyConfiguration {
b.ResourceClaimName = &value
return b
}
// WithResourceClaimTemplateName sets the ResourceClaimTemplateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceClaimTemplateName field is set to the value of the last call.
func (b *ClaimSourceApplyConfiguration) WithResourceClaimTemplateName(value string) *ClaimSourceApplyConfiguration {
b.ResourceClaimTemplateName = &value
return b
}

View File

@ -0,0 +1,48 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// PodResourceClaimApplyConfiguration represents an declarative configuration of the PodResourceClaim type for use
// with apply.
type PodResourceClaimApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Source *ClaimSourceApplyConfiguration `json:"source,omitempty"`
}
// PodResourceClaimApplyConfiguration constructs an declarative configuration of the PodResourceClaim type for use with
// apply.
func PodResourceClaim() *PodResourceClaimApplyConfiguration {
return &PodResourceClaimApplyConfiguration{}
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *PodResourceClaimApplyConfiguration) WithName(value string) *PodResourceClaimApplyConfiguration {
b.Name = &value
return b
}
// WithSource sets the Source field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Source field is set to the value of the last call.
func (b *PodResourceClaimApplyConfiguration) WithSource(value *ClaimSourceApplyConfiguration) *PodResourceClaimApplyConfiguration {
b.Source = value
return b
}

View File

@ -63,6 +63,7 @@ type PodSpecApplyConfiguration struct {
OS *PodOSApplyConfiguration `json:"os,omitempty"` OS *PodOSApplyConfiguration `json:"os,omitempty"`
HostUsers *bool `json:"hostUsers,omitempty"` HostUsers *bool `json:"hostUsers,omitempty"`
SchedulingGates []PodSchedulingGateApplyConfiguration `json:"schedulingGates,omitempty"` SchedulingGates []PodSchedulingGateApplyConfiguration `json:"schedulingGates,omitempty"`
ResourceClaims []PodResourceClaimApplyConfiguration `json:"resourceClaims,omitempty"`
} }
// PodSpecApplyConfiguration constructs an declarative configuration of the PodSpec type for use with // PodSpecApplyConfiguration constructs an declarative configuration of the PodSpec type for use with
@ -430,3 +431,16 @@ func (b *PodSpecApplyConfiguration) WithSchedulingGates(values ...*PodScheduling
} }
return b return b
} }
// WithResourceClaims adds the given value to the ResourceClaims field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the ResourceClaims field.
func (b *PodSpecApplyConfiguration) WithResourceClaims(values ...*PodResourceClaimApplyConfiguration) *PodSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResourceClaims")
}
b.ResourceClaims = append(b.ResourceClaims, *values[i])
}
return b
}

View File

@ -0,0 +1,39 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1
// ResourceClaimApplyConfiguration represents an declarative configuration of the ResourceClaim type for use
// with apply.
type ResourceClaimApplyConfiguration struct {
Name *string `json:"name,omitempty"`
}
// ResourceClaimApplyConfiguration constructs an declarative configuration of the ResourceClaim type for use with
// apply.
func ResourceClaim() *ResourceClaimApplyConfiguration {
return &ResourceClaimApplyConfiguration{}
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithName(value string) *ResourceClaimApplyConfiguration {
b.Name = &value
return b
}

View File

@ -25,8 +25,9 @@ import (
// ResourceRequirementsApplyConfiguration represents an declarative configuration of the ResourceRequirements type for use // ResourceRequirementsApplyConfiguration represents an declarative configuration of the ResourceRequirements type for use
// with apply. // with apply.
type ResourceRequirementsApplyConfiguration struct { type ResourceRequirementsApplyConfiguration struct {
Limits *v1.ResourceList `json:"limits,omitempty"` Limits *v1.ResourceList `json:"limits,omitempty"`
Requests *v1.ResourceList `json:"requests,omitempty"` Requests *v1.ResourceList `json:"requests,omitempty"`
Claims []ResourceClaimApplyConfiguration `json:"claims,omitempty"`
} }
// ResourceRequirementsApplyConfiguration constructs an declarative configuration of the ResourceRequirements type for use with // ResourceRequirementsApplyConfiguration constructs an declarative configuration of the ResourceRequirements type for use with
@ -50,3 +51,16 @@ func (b *ResourceRequirementsApplyConfiguration) WithRequests(value v1.ResourceL
b.Requests = &value b.Requests = &value
return b return b
} }
// WithClaims adds the given value to the Claims field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Claims field.
func (b *ResourceRequirementsApplyConfiguration) WithClaims(values ...*ResourceClaimApplyConfiguration) *ResourceRequirementsApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithClaims")
}
b.Claims = append(b.Claims, *values[i])
}
return b
}

View File

@ -3916,6 +3916,15 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.core.v1.ClaimSource
map:
fields:
- name: resourceClaimName
type:
scalar: string
- name: resourceClaimTemplateName
type:
scalar: string
- name: io.k8s.api.core.v1.ClientIPConfig - name: io.k8s.api.core.v1.ClientIPConfig
map: map:
fields: fields:
@ -5884,6 +5893,17 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.core.v1.PodResourceClaim
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: source
type:
namedType: io.k8s.api.core.v1.ClaimSource
default: {}
- name: io.k8s.api.core.v1.PodSchedulingGate - name: io.k8s.api.core.v1.PodSchedulingGate
map: map:
fields: fields:
@ -6038,6 +6058,14 @@ var schemaYAML = typed.YAMLObject(`types:
elementType: elementType:
namedType: io.k8s.api.core.v1.PodReadinessGate namedType: io.k8s.api.core.v1.PodReadinessGate
elementRelationship: atomic elementRelationship: atomic
- name: resourceClaims
type:
list:
elementType:
namedType: io.k8s.api.core.v1.PodResourceClaim
elementRelationship: associative
keys:
- name
- name: restartPolicy - name: restartPolicy
type: type:
scalar: string scalar: string
@ -6443,6 +6471,13 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: numeric scalar: numeric
default: 0 default: 0
- name: io.k8s.api.core.v1.ResourceClaim
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: io.k8s.api.core.v1.ResourceFieldSelector - name: io.k8s.api.core.v1.ResourceFieldSelector
map: map:
fields: fields:
@ -6512,6 +6547,12 @@ var schemaYAML = typed.YAMLObject(`types:
- name: io.k8s.api.core.v1.ResourceRequirements - name: io.k8s.api.core.v1.ResourceRequirements
map: map:
fields: fields:
- name: claims
type:
list:
elementType:
namedType: io.k8s.api.core.v1.ResourceClaim
elementRelationship: associative
- name: limits - name: limits
type: type:
map: map:
@ -11460,6 +11501,226 @@ var schemaYAML = typed.YAMLObject(`types:
- name: namespace - name: namespace
type: type:
scalar: string scalar: string
- name: io.k8s.api.resource.v1alpha1.AllocationResult
map:
fields:
- name: availableOnNodes
type:
namedType: io.k8s.api.core.v1.NodeSelector
- name: resourceHandle
type:
scalar: string
- name: shareable
type:
scalar: boolean
- name: io.k8s.api.resource.v1alpha1.PodScheduling
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.resource.v1alpha1.PodSchedulingSpec
default: {}
- name: status
type:
namedType: io.k8s.api.resource.v1alpha1.PodSchedulingStatus
default: {}
- name: io.k8s.api.resource.v1alpha1.PodSchedulingSpec
map:
fields:
- name: potentialNodes
type:
list:
elementType:
scalar: string
elementRelationship: associative
- name: selectedNode
type:
scalar: string
- name: io.k8s.api.resource.v1alpha1.PodSchedulingStatus
map:
fields:
- name: resourceClaims
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimSchedulingStatus
elementRelationship: associative
keys:
- name
- name: io.k8s.api.resource.v1alpha1.ResourceClaim
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimSpec
default: {}
- name: status
type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimStatus
default: {}
- name: io.k8s.api.resource.v1alpha1.ResourceClaimConsumerReference
map:
fields:
- name: apiGroup
type:
scalar: string
- name: name
type:
scalar: string
default: ""
- name: resource
type:
scalar: string
default: ""
- name: uid
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha1.ResourceClaimParametersReference
map:
fields:
- name: apiGroup
type:
scalar: string
- name: kind
type:
scalar: string
default: ""
- name: name
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha1.ResourceClaimSchedulingStatus
map:
fields:
- name: name
type:
scalar: string
- name: unsuitableNodes
type:
list:
elementType:
scalar: string
elementRelationship: associative
- name: io.k8s.api.resource.v1alpha1.ResourceClaimSpec
map:
fields:
- name: allocationMode
type:
scalar: string
- name: parametersRef
type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimParametersReference
- name: resourceClassName
type:
scalar: string
default: ""
- name: io.k8s.api.resource.v1alpha1.ResourceClaimStatus
map:
fields:
- name: allocation
type:
namedType: io.k8s.api.resource.v1alpha1.AllocationResult
- name: deallocationRequested
type:
scalar: boolean
- name: driverName
type:
scalar: string
- name: reservedFor
type:
list:
elementType:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimConsumerReference
elementRelationship: associative
- name: io.k8s.api.resource.v1alpha1.ResourceClaimTemplate
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimTemplateSpec
default: {}
- name: io.k8s.api.resource.v1alpha1.ResourceClaimTemplateSpec
map:
fields:
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimSpec
default: {}
- name: io.k8s.api.resource.v1alpha1.ResourceClass
map:
fields:
- name: apiVersion
type:
scalar: string
- name: driverName
type:
scalar: string
default: ""
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: parametersRef
type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClassParametersReference
- name: suitableNodes
type:
namedType: io.k8s.api.core.v1.NodeSelector
- name: io.k8s.api.resource.v1alpha1.ResourceClassParametersReference
map:
fields:
- name: apiGroup
type:
scalar: string
- name: kind
type:
scalar: string
default: ""
- name: name
type:
scalar: string
default: ""
- name: namespace
type:
scalar: string
- name: io.k8s.api.scheduling.v1.PriorityClass - name: io.k8s.api.scheduling.v1.PriorityClass
map: map:
fields: fields:

View File

@ -0,0 +1,61 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/client-go/applyconfigurations/core/v1"
)
// AllocationResultApplyConfiguration represents an declarative configuration of the AllocationResult type for use
// with apply.
type AllocationResultApplyConfiguration struct {
ResourceHandle *string `json:"resourceHandle,omitempty"`
AvailableOnNodes *v1.NodeSelectorApplyConfiguration `json:"availableOnNodes,omitempty"`
Shareable *bool `json:"shareable,omitempty"`
}
// AllocationResultApplyConfiguration constructs an declarative configuration of the AllocationResult type for use with
// apply.
func AllocationResult() *AllocationResultApplyConfiguration {
return &AllocationResultApplyConfiguration{}
}
// WithResourceHandle sets the ResourceHandle field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceHandle field is set to the value of the last call.
func (b *AllocationResultApplyConfiguration) WithResourceHandle(value string) *AllocationResultApplyConfiguration {
b.ResourceHandle = &value
return b
}
// WithAvailableOnNodes sets the AvailableOnNodes field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AvailableOnNodes field is set to the value of the last call.
func (b *AllocationResultApplyConfiguration) WithAvailableOnNodes(value *v1.NodeSelectorApplyConfiguration) *AllocationResultApplyConfiguration {
b.AvailableOnNodes = value
return b
}
// WithShareable sets the Shareable field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Shareable field is set to the value of the last call.
func (b *AllocationResultApplyConfiguration) WithShareable(value bool) *AllocationResultApplyConfiguration {
b.Shareable = &value
return b
}

View File

@ -0,0 +1,258 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// PodSchedulingApplyConfiguration represents an declarative configuration of the PodScheduling type for use
// with apply.
type PodSchedulingApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *PodSchedulingSpecApplyConfiguration `json:"spec,omitempty"`
Status *PodSchedulingStatusApplyConfiguration `json:"status,omitempty"`
}
// PodScheduling constructs an declarative configuration of the PodScheduling type for use with
// apply.
func PodScheduling(name, namespace string) *PodSchedulingApplyConfiguration {
b := &PodSchedulingApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("PodScheduling")
b.WithAPIVersion("resource.k8s.io/v1alpha1")
return b
}
// ExtractPodScheduling extracts the applied configuration owned by fieldManager from
// podScheduling. If no managedFields are found in podScheduling for fieldManager, a
// PodSchedulingApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// podScheduling must be a unmodified PodScheduling API object that was retrieved from the Kubernetes API.
// ExtractPodScheduling provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractPodScheduling(podScheduling *resourcev1alpha1.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) {
return extractPodScheduling(podScheduling, fieldManager, "")
}
// ExtractPodSchedulingStatus is the same as ExtractPodScheduling except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractPodSchedulingStatus(podScheduling *resourcev1alpha1.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) {
return extractPodScheduling(podScheduling, fieldManager, "status")
}
func extractPodScheduling(podScheduling *resourcev1alpha1.PodScheduling, fieldManager string, subresource string) (*PodSchedulingApplyConfiguration, error) {
b := &PodSchedulingApplyConfiguration{}
err := managedfields.ExtractInto(podScheduling, internal.Parser().Type("io.k8s.api.resource.v1alpha1.PodScheduling"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(podScheduling.Name)
b.WithNamespace(podScheduling.Namespace)
b.WithKind("PodScheduling")
b.WithAPIVersion("resource.k8s.io/v1alpha1")
return b, nil
}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithKind(value string) *PodSchedulingApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithAPIVersion(value string) *PodSchedulingApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithName(value string) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithGenerateName(value string) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithNamespace(value string) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithUID(value types.UID) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithResourceVersion(value string) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithGeneration(value int64) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *PodSchedulingApplyConfiguration) WithLabels(entries map[string]string) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *PodSchedulingApplyConfiguration) WithAnnotations(entries map[string]string) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *PodSchedulingApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *PodSchedulingApplyConfiguration) WithFinalizers(values ...string) *PodSchedulingApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *PodSchedulingApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithSpec(value *PodSchedulingSpecApplyConfiguration) *PodSchedulingApplyConfiguration {
b.Spec = value
return b
}
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
func (b *PodSchedulingApplyConfiguration) WithStatus(value *PodSchedulingStatusApplyConfiguration) *PodSchedulingApplyConfiguration {
b.Status = value
return b
}

View File

@ -0,0 +1,50 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
// PodSchedulingSpecApplyConfiguration represents an declarative configuration of the PodSchedulingSpec type for use
// with apply.
type PodSchedulingSpecApplyConfiguration struct {
SelectedNode *string `json:"selectedNode,omitempty"`
PotentialNodes []string `json:"potentialNodes,omitempty"`
}
// PodSchedulingSpecApplyConfiguration constructs an declarative configuration of the PodSchedulingSpec type for use with
// apply.
func PodSchedulingSpec() *PodSchedulingSpecApplyConfiguration {
return &PodSchedulingSpecApplyConfiguration{}
}
// WithSelectedNode sets the SelectedNode field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the SelectedNode field is set to the value of the last call.
func (b *PodSchedulingSpecApplyConfiguration) WithSelectedNode(value string) *PodSchedulingSpecApplyConfiguration {
b.SelectedNode = &value
return b
}
// WithPotentialNodes adds the given value to the PotentialNodes field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the PotentialNodes field.
func (b *PodSchedulingSpecApplyConfiguration) WithPotentialNodes(values ...string) *PodSchedulingSpecApplyConfiguration {
for i := range values {
b.PotentialNodes = append(b.PotentialNodes, values[i])
}
return b
}

View File

@ -0,0 +1,44 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
// PodSchedulingStatusApplyConfiguration represents an declarative configuration of the PodSchedulingStatus type for use
// with apply.
type PodSchedulingStatusApplyConfiguration struct {
ResourceClaims []ResourceClaimSchedulingStatusApplyConfiguration `json:"resourceClaims,omitempty"`
}
// PodSchedulingStatusApplyConfiguration constructs an declarative configuration of the PodSchedulingStatus type for use with
// apply.
func PodSchedulingStatus() *PodSchedulingStatusApplyConfiguration {
return &PodSchedulingStatusApplyConfiguration{}
}
// WithResourceClaims adds the given value to the ResourceClaims field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the ResourceClaims field.
func (b *PodSchedulingStatusApplyConfiguration) WithResourceClaims(values ...*ResourceClaimSchedulingStatusApplyConfiguration) *PodSchedulingStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithResourceClaims")
}
b.ResourceClaims = append(b.ResourceClaims, *values[i])
}
return b
}

View File

@ -0,0 +1,258 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ResourceClaimApplyConfiguration represents an declarative configuration of the ResourceClaim type for use
// with apply.
type ResourceClaimApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ResourceClaimSpecApplyConfiguration `json:"spec,omitempty"`
Status *ResourceClaimStatusApplyConfiguration `json:"status,omitempty"`
}
// ResourceClaim constructs an declarative configuration of the ResourceClaim type for use with
// apply.
func ResourceClaim(name, namespace string) *ResourceClaimApplyConfiguration {
b := &ResourceClaimApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ResourceClaim")
b.WithAPIVersion("resource.k8s.io/v1alpha1")
return b
}
// ExtractResourceClaim extracts the applied configuration owned by fieldManager from
// resourceClaim. If no managedFields are found in resourceClaim for fieldManager, a
// ResourceClaimApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// resourceClaim must be a unmodified ResourceClaim API object that was retrieved from the Kubernetes API.
// ExtractResourceClaim provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractResourceClaim(resourceClaim *resourcev1alpha1.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
return extractResourceClaim(resourceClaim, fieldManager, "")
}
// ExtractResourceClaimStatus is the same as ExtractResourceClaim except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractResourceClaimStatus(resourceClaim *resourcev1alpha1.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
return extractResourceClaim(resourceClaim, fieldManager, "status")
}
func extractResourceClaim(resourceClaim *resourcev1alpha1.ResourceClaim, fieldManager string, subresource string) (*ResourceClaimApplyConfiguration, error) {
b := &ResourceClaimApplyConfiguration{}
err := managedfields.ExtractInto(resourceClaim, internal.Parser().Type("io.k8s.api.resource.v1alpha1.ResourceClaim"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourceClaim.Name)
b.WithNamespace(resourceClaim.Namespace)
b.WithKind("ResourceClaim")
b.WithAPIVersion("resource.k8s.io/v1alpha1")
return b, nil
}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithKind(value string) *ResourceClaimApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithAPIVersion(value string) *ResourceClaimApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithName(value string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithGenerateName(value string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithNamespace(value string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithUID(value types.UID) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithResourceVersion(value string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithGeneration(value int64) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ResourceClaimApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ResourceClaimApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *ResourceClaimApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *ResourceClaimApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ResourceClaimApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithSpec(value *ResourceClaimSpecApplyConfiguration) *ResourceClaimApplyConfiguration {
b.Spec = value
return b
}
// WithStatus sets the Status field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Status field is set to the value of the last call.
func (b *ResourceClaimApplyConfiguration) WithStatus(value *ResourceClaimStatusApplyConfiguration) *ResourceClaimApplyConfiguration {
b.Status = value
return b
}

View File

@ -0,0 +1,70 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
types "k8s.io/apimachinery/pkg/types"
)
// ResourceClaimConsumerReferenceApplyConfiguration represents an declarative configuration of the ResourceClaimConsumerReference type for use
// with apply.
type ResourceClaimConsumerReferenceApplyConfiguration struct {
APIGroup *string `json:"apiGroup,omitempty"`
Resource *string `json:"resource,omitempty"`
Name *string `json:"name,omitempty"`
UID *types.UID `json:"uid,omitempty"`
}
// ResourceClaimConsumerReferenceApplyConfiguration constructs an declarative configuration of the ResourceClaimConsumerReference type for use with
// apply.
func ResourceClaimConsumerReference() *ResourceClaimConsumerReferenceApplyConfiguration {
return &ResourceClaimConsumerReferenceApplyConfiguration{}
}
// WithAPIGroup sets the APIGroup field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIGroup field is set to the value of the last call.
func (b *ResourceClaimConsumerReferenceApplyConfiguration) WithAPIGroup(value string) *ResourceClaimConsumerReferenceApplyConfiguration {
b.APIGroup = &value
return b
}
// WithResource sets the Resource field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Resource field is set to the value of the last call.
func (b *ResourceClaimConsumerReferenceApplyConfiguration) WithResource(value string) *ResourceClaimConsumerReferenceApplyConfiguration {
b.Resource = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ResourceClaimConsumerReferenceApplyConfiguration) WithName(value string) *ResourceClaimConsumerReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *ResourceClaimConsumerReferenceApplyConfiguration) WithUID(value types.UID) *ResourceClaimConsumerReferenceApplyConfiguration {
b.UID = &value
return b
}

View File

@ -0,0 +1,57 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
// ResourceClaimParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClaimParametersReference type for use
// with apply.
type ResourceClaimParametersReferenceApplyConfiguration struct {
APIGroup *string `json:"apiGroup,omitempty"`
Kind *string `json:"kind,omitempty"`
Name *string `json:"name,omitempty"`
}
// ResourceClaimParametersReferenceApplyConfiguration constructs an declarative configuration of the ResourceClaimParametersReference type for use with
// apply.
func ResourceClaimParametersReference() *ResourceClaimParametersReferenceApplyConfiguration {
return &ResourceClaimParametersReferenceApplyConfiguration{}
}
// WithAPIGroup sets the APIGroup field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIGroup field is set to the value of the last call.
func (b *ResourceClaimParametersReferenceApplyConfiguration) WithAPIGroup(value string) *ResourceClaimParametersReferenceApplyConfiguration {
b.APIGroup = &value
return b
}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *ResourceClaimParametersReferenceApplyConfiguration) WithKind(value string) *ResourceClaimParametersReferenceApplyConfiguration {
b.Kind = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ResourceClaimParametersReferenceApplyConfiguration) WithName(value string) *ResourceClaimParametersReferenceApplyConfiguration {
b.Name = &value
return b
}

View File

@ -0,0 +1,50 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
// ResourceClaimSchedulingStatusApplyConfiguration represents an declarative configuration of the ResourceClaimSchedulingStatus type for use
// with apply.
type ResourceClaimSchedulingStatusApplyConfiguration struct {
Name *string `json:"name,omitempty"`
UnsuitableNodes []string `json:"unsuitableNodes,omitempty"`
}
// ResourceClaimSchedulingStatusApplyConfiguration constructs an declarative configuration of the ResourceClaimSchedulingStatus type for use with
// apply.
func ResourceClaimSchedulingStatus() *ResourceClaimSchedulingStatusApplyConfiguration {
return &ResourceClaimSchedulingStatusApplyConfiguration{}
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ResourceClaimSchedulingStatusApplyConfiguration) WithName(value string) *ResourceClaimSchedulingStatusApplyConfiguration {
b.Name = &value
return b
}
// WithUnsuitableNodes adds the given value to the UnsuitableNodes field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the UnsuitableNodes field.
func (b *ResourceClaimSchedulingStatusApplyConfiguration) WithUnsuitableNodes(values ...string) *ResourceClaimSchedulingStatusApplyConfiguration {
for i := range values {
b.UnsuitableNodes = append(b.UnsuitableNodes, values[i])
}
return b
}

View File

@ -0,0 +1,61 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
)
// ResourceClaimSpecApplyConfiguration represents an declarative configuration of the ResourceClaimSpec type for use
// with apply.
type ResourceClaimSpecApplyConfiguration struct {
ResourceClassName *string `json:"resourceClassName,omitempty"`
ParametersRef *ResourceClaimParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"`
AllocationMode *resourcev1alpha1.AllocationMode `json:"allocationMode,omitempty"`
}
// ResourceClaimSpecApplyConfiguration constructs an declarative configuration of the ResourceClaimSpec type for use with
// apply.
func ResourceClaimSpec() *ResourceClaimSpecApplyConfiguration {
return &ResourceClaimSpecApplyConfiguration{}
}
// WithResourceClassName sets the ResourceClassName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceClassName field is set to the value of the last call.
func (b *ResourceClaimSpecApplyConfiguration) WithResourceClassName(value string) *ResourceClaimSpecApplyConfiguration {
b.ResourceClassName = &value
return b
}
// WithParametersRef sets the ParametersRef field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParametersRef field is set to the value of the last call.
func (b *ResourceClaimSpecApplyConfiguration) WithParametersRef(value *ResourceClaimParametersReferenceApplyConfiguration) *ResourceClaimSpecApplyConfiguration {
b.ParametersRef = value
return b
}
// WithAllocationMode sets the AllocationMode field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AllocationMode field is set to the value of the last call.
func (b *ResourceClaimSpecApplyConfiguration) WithAllocationMode(value resourcev1alpha1.AllocationMode) *ResourceClaimSpecApplyConfiguration {
b.AllocationMode = &value
return b
}

View File

@ -0,0 +1,71 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
// ResourceClaimStatusApplyConfiguration represents an declarative configuration of the ResourceClaimStatus type for use
// with apply.
type ResourceClaimStatusApplyConfiguration struct {
DriverName *string `json:"driverName,omitempty"`
Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"`
ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"`
DeallocationRequested *bool `json:"deallocationRequested,omitempty"`
}
// ResourceClaimStatusApplyConfiguration constructs an declarative configuration of the ResourceClaimStatus type for use with
// apply.
func ResourceClaimStatus() *ResourceClaimStatusApplyConfiguration {
return &ResourceClaimStatusApplyConfiguration{}
}
// WithDriverName sets the DriverName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DriverName field is set to the value of the last call.
func (b *ResourceClaimStatusApplyConfiguration) WithDriverName(value string) *ResourceClaimStatusApplyConfiguration {
b.DriverName = &value
return b
}
// WithAllocation sets the Allocation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Allocation field is set to the value of the last call.
func (b *ResourceClaimStatusApplyConfiguration) WithAllocation(value *AllocationResultApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
b.Allocation = value
return b
}
// WithReservedFor adds the given value to the ReservedFor field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the ReservedFor field.
func (b *ResourceClaimStatusApplyConfiguration) WithReservedFor(values ...*ResourceClaimConsumerReferenceApplyConfiguration) *ResourceClaimStatusApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithReservedFor")
}
b.ReservedFor = append(b.ReservedFor, *values[i])
}
return b
}
// WithDeallocationRequested sets the DeallocationRequested field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeallocationRequested field is set to the value of the last call.
func (b *ResourceClaimStatusApplyConfiguration) WithDeallocationRequested(value bool) *ResourceClaimStatusApplyConfiguration {
b.DeallocationRequested = &value
return b
}

View File

@ -0,0 +1,249 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ResourceClaimTemplateApplyConfiguration represents an declarative configuration of the ResourceClaimTemplate type for use
// with apply.
type ResourceClaimTemplateApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ResourceClaimTemplateSpecApplyConfiguration `json:"spec,omitempty"`
}
// ResourceClaimTemplate constructs an declarative configuration of the ResourceClaimTemplate type for use with
// apply.
func ResourceClaimTemplate(name, namespace string) *ResourceClaimTemplateApplyConfiguration {
b := &ResourceClaimTemplateApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("ResourceClaimTemplate")
b.WithAPIVersion("resource.k8s.io/v1alpha1")
return b
}
// ExtractResourceClaimTemplate extracts the applied configuration owned by fieldManager from
// resourceClaimTemplate. If no managedFields are found in resourceClaimTemplate for fieldManager, a
// ResourceClaimTemplateApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// resourceClaimTemplate must be a unmodified ResourceClaimTemplate API object that was retrieved from the Kubernetes API.
// ExtractResourceClaimTemplate provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "")
}
// ExtractResourceClaimTemplateStatus is the same as ExtractResourceClaimTemplate except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractResourceClaimTemplateStatus(resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "status")
}
func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplate, fieldManager string, subresource string) (*ResourceClaimTemplateApplyConfiguration, error) {
b := &ResourceClaimTemplateApplyConfiguration{}
err := managedfields.ExtractInto(resourceClaimTemplate, internal.Parser().Type("io.k8s.api.resource.v1alpha1.ResourceClaimTemplate"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourceClaimTemplate.Name)
b.WithNamespace(resourceClaimTemplate.Namespace)
b.WithKind("ResourceClaimTemplate")
b.WithAPIVersion("resource.k8s.io/v1alpha1")
return b, nil
}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithKind(value string) *ResourceClaimTemplateApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithAPIVersion(value string) *ResourceClaimTemplateApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithName(value string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithGenerateName(value string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithNamespace(value string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithUID(value types.UID) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithResourceVersion(value string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithGeneration(value int64) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ResourceClaimTemplateApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ResourceClaimTemplateApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *ResourceClaimTemplateApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *ResourceClaimTemplateApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimTemplateApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ResourceClaimTemplateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
func (b *ResourceClaimTemplateApplyConfiguration) WithSpec(value *ResourceClaimTemplateSpecApplyConfiguration) *ResourceClaimTemplateApplyConfiguration {
b.Spec = value
return b
}

View File

@ -0,0 +1,188 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ResourceClaimTemplateSpecApplyConfiguration represents an declarative configuration of the ResourceClaimTemplateSpec type for use
// with apply.
type ResourceClaimTemplateSpecApplyConfiguration struct {
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
Spec *ResourceClaimSpecApplyConfiguration `json:"spec,omitempty"`
}
// ResourceClaimTemplateSpecApplyConfiguration constructs an declarative configuration of the ResourceClaimTemplateSpec type for use with
// apply.
func ResourceClaimTemplateSpec() *ResourceClaimTemplateSpecApplyConfiguration {
return &ResourceClaimTemplateSpecApplyConfiguration{}
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithName(value string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithGenerateName(value string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithNamespace(value string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithUID(value types.UID) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithResourceVersion(value string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithGeneration(value int64) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimTemplateSpecApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ResourceClaimTemplateSpecApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Spec field is set to the value of the last call.
func (b *ResourceClaimTemplateSpecApplyConfiguration) WithSpec(value *ResourceClaimSpecApplyConfiguration) *ResourceClaimTemplateSpecApplyConfiguration {
b.Spec = value
return b
}

View File

@ -0,0 +1,266 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ResourceClassApplyConfiguration represents an declarative configuration of the ResourceClass type for use
// with apply.
type ResourceClassApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
DriverName *string `json:"driverName,omitempty"`
ParametersRef *ResourceClassParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"`
SuitableNodes *corev1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"`
}
// ResourceClass constructs an declarative configuration of the ResourceClass type for use with
// apply.
func ResourceClass(name string) *ResourceClassApplyConfiguration {
b := &ResourceClassApplyConfiguration{}
b.WithName(name)
b.WithKind("ResourceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha1")
return b
}
// ExtractResourceClass extracts the applied configuration owned by fieldManager from
// resourceClass. If no managedFields are found in resourceClass for fieldManager, a
// ResourceClassApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// resourceClass must be a unmodified ResourceClass API object that was retrieved from the Kubernetes API.
// ExtractResourceClass provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractResourceClass(resourceClass *resourcev1alpha1.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) {
return extractResourceClass(resourceClass, fieldManager, "")
}
// ExtractResourceClassStatus is the same as ExtractResourceClass except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractResourceClassStatus(resourceClass *resourcev1alpha1.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) {
return extractResourceClass(resourceClass, fieldManager, "status")
}
func extractResourceClass(resourceClass *resourcev1alpha1.ResourceClass, fieldManager string, subresource string) (*ResourceClassApplyConfiguration, error) {
b := &ResourceClassApplyConfiguration{}
err := managedfields.ExtractInto(resourceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha1.ResourceClass"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(resourceClass.Name)
b.WithKind("ResourceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha1")
return b, nil
}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithKind(value string) *ResourceClassApplyConfiguration {
b.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIVersion field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithAPIVersion(value string) *ResourceClassApplyConfiguration {
b.APIVersion = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithName(value string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Name = &value
return b
}
// WithGenerateName sets the GenerateName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the GenerateName field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithGenerateName(value string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.GenerateName = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithNamespace(value string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Namespace = &value
return b
}
// WithUID sets the UID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the UID field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithUID(value types.UID) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ResourceVersion field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithResourceVersion(value string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Generation field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithGeneration(value int64) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *ResourceClassApplyConfiguration) WithLabels(entries map[string]string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Labels == nil && len(entries) > 0 {
b.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *ResourceClassApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.Annotations == nil && len(entries) > 0 {
b.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *ResourceClassApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.OwnerReferences = append(b.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *ResourceClassApplyConfiguration) WithFinalizers(values ...string) *ResourceClassApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.Finalizers = append(b.Finalizers, values[i])
}
return b
}
func (b *ResourceClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithDriverName sets the DriverName field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the DriverName field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithDriverName(value string) *ResourceClassApplyConfiguration {
b.DriverName = &value
return b
}
// WithParametersRef sets the ParametersRef field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ParametersRef field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithParametersRef(value *ResourceClassParametersReferenceApplyConfiguration) *ResourceClassApplyConfiguration {
b.ParametersRef = value
return b
}
// WithSuitableNodes sets the SuitableNodes field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the SuitableNodes field is set to the value of the last call.
func (b *ResourceClassApplyConfiguration) WithSuitableNodes(value *corev1.NodeSelectorApplyConfiguration) *ResourceClassApplyConfiguration {
b.SuitableNodes = value
return b
}

View File

@ -0,0 +1,66 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
// ResourceClassParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClassParametersReference type for use
// with apply.
type ResourceClassParametersReferenceApplyConfiguration struct {
APIGroup *string `json:"apiGroup,omitempty"`
Kind *string `json:"kind,omitempty"`
Name *string `json:"name,omitempty"`
Namespace *string `json:"namespace,omitempty"`
}
// ResourceClassParametersReferenceApplyConfiguration constructs an declarative configuration of the ResourceClassParametersReference type for use with
// apply.
func ResourceClassParametersReference() *ResourceClassParametersReferenceApplyConfiguration {
return &ResourceClassParametersReferenceApplyConfiguration{}
}
// WithAPIGroup sets the APIGroup field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the APIGroup field is set to the value of the last call.
func (b *ResourceClassParametersReferenceApplyConfiguration) WithAPIGroup(value string) *ResourceClassParametersReferenceApplyConfiguration {
b.APIGroup = &value
return b
}
// WithKind sets the Kind field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Kind field is set to the value of the last call.
func (b *ResourceClassParametersReferenceApplyConfiguration) WithKind(value string) *ResourceClassParametersReferenceApplyConfiguration {
b.Kind = &value
return b
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *ResourceClassParametersReferenceApplyConfiguration) WithName(value string) *ResourceClassParametersReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithNamespace sets the Namespace field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Namespace field is set to the value of the last call.
func (b *ResourceClassParametersReferenceApplyConfiguration) WithNamespace(value string) *ResourceClassParametersReferenceApplyConfiguration {
b.Namespace = &value
return b
}

View File

@ -58,6 +58,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -106,6 +107,7 @@ import (
applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1"
applyconfigurationsrbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" applyconfigurationsrbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1"
applyconfigurationsrbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" applyconfigurationsrbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1"
applyconfigurationsresourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1" applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1"
applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1"
applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1"
@ -551,6 +553,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.CinderPersistentVolumeSourceApplyConfiguration{} return &applyconfigurationscorev1.CinderPersistentVolumeSourceApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("CinderVolumeSource"): case corev1.SchemeGroupVersion.WithKind("CinderVolumeSource"):
return &applyconfigurationscorev1.CinderVolumeSourceApplyConfiguration{} return &applyconfigurationscorev1.CinderVolumeSourceApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ClaimSource"):
return &applyconfigurationscorev1.ClaimSourceApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ClientIPConfig"): case corev1.SchemeGroupVersion.WithKind("ClientIPConfig"):
return &applyconfigurationscorev1.ClientIPConfigApplyConfiguration{} return &applyconfigurationscorev1.ClientIPConfigApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ComponentCondition"): case corev1.SchemeGroupVersion.WithKind("ComponentCondition"):
@ -759,6 +763,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.PodOSApplyConfiguration{} return &applyconfigurationscorev1.PodOSApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodReadinessGate"): case corev1.SchemeGroupVersion.WithKind("PodReadinessGate"):
return &applyconfigurationscorev1.PodReadinessGateApplyConfiguration{} return &applyconfigurationscorev1.PodReadinessGateApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodResourceClaim"):
return &applyconfigurationscorev1.PodResourceClaimApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodSchedulingGate"): case corev1.SchemeGroupVersion.WithKind("PodSchedulingGate"):
return &applyconfigurationscorev1.PodSchedulingGateApplyConfiguration{} return &applyconfigurationscorev1.PodSchedulingGateApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("PodSecurityContext"): case corev1.SchemeGroupVersion.WithKind("PodSecurityContext"):
@ -797,6 +803,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.ReplicationControllerSpecApplyConfiguration{} return &applyconfigurationscorev1.ReplicationControllerSpecApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ReplicationControllerStatus"): case corev1.SchemeGroupVersion.WithKind("ReplicationControllerStatus"):
return &applyconfigurationscorev1.ReplicationControllerStatusApplyConfiguration{} return &applyconfigurationscorev1.ReplicationControllerStatusApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ResourceClaim"):
return &applyconfigurationscorev1.ResourceClaimApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ResourceFieldSelector"): case corev1.SchemeGroupVersion.WithKind("ResourceFieldSelector"):
return &applyconfigurationscorev1.ResourceFieldSelectorApplyConfiguration{} return &applyconfigurationscorev1.ResourceFieldSelectorApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("ResourceQuota"): case corev1.SchemeGroupVersion.WithKind("ResourceQuota"):
@ -1456,6 +1464,36 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
case rbacv1beta1.SchemeGroupVersion.WithKind("Subject"): case rbacv1beta1.SchemeGroupVersion.WithKind("Subject"):
return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{} return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{}
// Group=resource.k8s.io, Version=v1alpha1
case resourcev1alpha1.SchemeGroupVersion.WithKind("AllocationResult"):
return &applyconfigurationsresourcev1alpha1.AllocationResultApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("PodScheduling"):
return &applyconfigurationsresourcev1alpha1.PodSchedulingApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("PodSchedulingSpec"):
return &applyconfigurationsresourcev1alpha1.PodSchedulingSpecApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("PodSchedulingStatus"):
return &applyconfigurationsresourcev1alpha1.PodSchedulingStatusApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaim"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimConsumerReferenceApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimParametersReferenceApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimSchedulingStatusApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimSpec"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimSpecApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimStatus"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimStatusApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimTemplate"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimTemplateApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimTemplateSpecApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClass"):
return &applyconfigurationsresourcev1alpha1.ResourceClassApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClassParametersReference"):
return &applyconfigurationsresourcev1alpha1.ResourceClassParametersReferenceApplyConfiguration{}
// Group=scheduling.k8s.io, Version=v1 // Group=scheduling.k8s.io, Version=v1
case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"): case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"):
return &applyconfigurationsschedulingv1.PriorityClassApplyConfiguration{} return &applyconfigurationsschedulingv1.PriorityClassApplyConfiguration{}

View File

@ -43,6 +43,7 @@ import (
node "k8s.io/client-go/informers/node" node "k8s.io/client-go/informers/node"
policy "k8s.io/client-go/informers/policy" policy "k8s.io/client-go/informers/policy"
rbac "k8s.io/client-go/informers/rbac" rbac "k8s.io/client-go/informers/rbac"
resource "k8s.io/client-go/informers/resource"
scheduling "k8s.io/client-go/informers/scheduling" scheduling "k8s.io/client-go/informers/scheduling"
storage "k8s.io/client-go/informers/storage" storage "k8s.io/client-go/informers/storage"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
@ -276,6 +277,7 @@ type SharedInformerFactory interface {
Node() node.Interface Node() node.Interface
Policy() policy.Interface Policy() policy.Interface
Rbac() rbac.Interface Rbac() rbac.Interface
Resource() resource.Interface
Scheduling() scheduling.Interface Scheduling() scheduling.Interface
Storage() storage.Interface Storage() storage.Interface
} }
@ -344,6 +346,10 @@ func (f *sharedInformerFactory) Rbac() rbac.Interface {
return rbac.New(f, f.namespace, f.tweakListOptions) return rbac.New(f, f.namespace, f.tweakListOptions)
} }
func (f *sharedInformerFactory) Resource() resource.Interface {
return resource.New(f, f.namespace, f.tweakListOptions)
}
func (f *sharedInformerFactory) Scheduling() scheduling.Interface { func (f *sharedInformerFactory) Scheduling() scheduling.Interface {
return scheduling.New(f, f.namespace, f.tweakListOptions) return scheduling.New(f, f.namespace, f.tweakListOptions)
} }

View File

@ -59,6 +59,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -349,6 +350,16 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"): case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
// Group=resource.k8s.io, Version=v1alpha1
case resourcev1alpha1.SchemeGroupVersion.WithResource("podschedulings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().PodSchedulings().Informer()}, nil
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclaims"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClaims().Informer()}, nil
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClaimTemplates().Informer()}, nil
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClasses().Informer()}, nil
// Group=scheduling.k8s.io, Version=v1 // Group=scheduling.k8s.io, Version=v1
case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"): case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1().PriorityClasses().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1().PriorityClasses().Informer()}, nil

View File

@ -0,0 +1,46 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package resource
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
v1alpha1 "k8s.io/client-go/informers/resource/v1alpha1"
)
// Interface provides access to each of this group's versions.
type Interface interface {
// V1alpha1 provides access to shared informers for resources in V1alpha1.
V1alpha1() v1alpha1.Interface
}
type group struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// V1alpha1 returns a new v1alpha1.Interface.
func (g *group) V1alpha1() v1alpha1.Interface {
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
}

View File

@ -0,0 +1,66 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
type Interface interface {
// PodSchedulings returns a PodSchedulingInformer.
PodSchedulings() PodSchedulingInformer
// ResourceClaims returns a ResourceClaimInformer.
ResourceClaims() ResourceClaimInformer
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
ResourceClaimTemplates() ResourceClaimTemplateInformer
// ResourceClasses returns a ResourceClassInformer.
ResourceClasses() ResourceClassInformer
}
type version struct {
factory internalinterfaces.SharedInformerFactory
namespace string
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// New returns a new Interface.
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
}
// PodSchedulings returns a PodSchedulingInformer.
func (v *version) PodSchedulings() PodSchedulingInformer {
return &podSchedulingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ResourceClaims returns a ResourceClaimInformer.
func (v *version) ResourceClaims() ResourceClaimInformer {
return &resourceClaimInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ResourceClaimTemplates returns a ResourceClaimTemplateInformer.
func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer {
return &resourceClaimTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
// ResourceClasses returns a ResourceClassInformer.
func (v *version) ResourceClasses() ResourceClassInformer {
return &resourceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}

View File

@ -0,0 +1,90 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// PodSchedulingInformer provides access to a shared informer and lister for
// PodSchedulings.
type PodSchedulingInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.PodSchedulingLister
}
type podSchedulingInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewPodSchedulingInformer constructs a new informer for PodScheduling type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewPodSchedulingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredPodSchedulingInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredPodSchedulingInformer constructs a new informer for PodScheduling type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredPodSchedulingInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha1().PodSchedulings(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha1().PodSchedulings(namespace).Watch(context.TODO(), options)
},
},
&resourcev1alpha1.PodScheduling{},
resyncPeriod,
indexers,
)
}
func (f *podSchedulingInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredPodSchedulingInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *podSchedulingInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.PodScheduling{}, f.defaultInformer)
}
func (f *podSchedulingInformer) Lister() v1alpha1.PodSchedulingLister {
return v1alpha1.NewPodSchedulingLister(f.Informer().GetIndexer())
}

View File

@ -0,0 +1,90 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// ResourceClaimInformer provides access to a shared informer and lister for
// ResourceClaims.
type ResourceClaimInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.ResourceClaimLister
}
type resourceClaimInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewResourceClaimInformer constructs a new informer for ResourceClaim type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewResourceClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredResourceClaimInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredResourceClaimInformer constructs a new informer for ResourceClaim type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredResourceClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha1().ResourceClaims(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha1().ResourceClaims(namespace).Watch(context.TODO(), options)
},
},
&resourcev1alpha1.ResourceClaim{},
resyncPeriod,
indexers,
)
}
func (f *resourceClaimInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredResourceClaimInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.ResourceClaim{}, f.defaultInformer)
}
func (f *resourceClaimInformer) Lister() v1alpha1.ResourceClaimLister {
return v1alpha1.NewResourceClaimLister(f.Informer().GetIndexer())
}

View File

@ -0,0 +1,90 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// ResourceClaimTemplateInformer provides access to a shared informer and lister for
// ResourceClaimTemplates.
type ResourceClaimTemplateInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.ResourceClaimTemplateLister
}
type resourceClaimTemplateInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewResourceClaimTemplateInformer constructs a new informer for ResourceClaimTemplate type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewResourceClaimTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredResourceClaimTemplateInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredResourceClaimTemplateInformer constructs a new informer for ResourceClaimTemplate type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredResourceClaimTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha1().ResourceClaimTemplates(namespace).List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha1().ResourceClaimTemplates(namespace).Watch(context.TODO(), options)
},
},
&resourcev1alpha1.ResourceClaimTemplate{},
resyncPeriod,
indexers,
)
}
func (f *resourceClaimTemplateInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredResourceClaimTemplateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.ResourceClaimTemplate{}, f.defaultInformer)
}
func (f *resourceClaimTemplateInformer) Lister() v1alpha1.ResourceClaimTemplateLister {
return v1alpha1.NewResourceClaimTemplateLister(f.Informer().GetIndexer())
}

View File

@ -0,0 +1,89 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by informer-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// ResourceClassInformer provides access to a shared informer and lister for
// ResourceClasses.
type ResourceClassInformer interface {
Informer() cache.SharedIndexInformer
Lister() v1alpha1.ResourceClassLister
}
type resourceClassInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
}
// NewResourceClassInformer constructs a new informer for ResourceClass type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewResourceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredResourceClassInformer(client, resyncPeriod, indexers, nil)
}
// NewFilteredResourceClassInformer constructs a new informer for ResourceClass type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredResourceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha1().ResourceClasses().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.ResourceV1alpha1().ResourceClasses().Watch(context.TODO(), options)
},
},
&resourcev1alpha1.ResourceClass{},
resyncPeriod,
indexers,
)
}
func (f *resourceClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredResourceClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *resourceClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.ResourceClass{}, f.defaultInformer)
}
func (f *resourceClassInformer) Lister() v1alpha1.ResourceClassLister {
return v1alpha1.NewResourceClassLister(f.Informer().GetIndexer())
}

View File

@ -66,6 +66,7 @@ import (
rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1"
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
resourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1"
schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1"
schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1"
@ -121,6 +122,7 @@ type Interface interface {
RbacV1() rbacv1.RbacV1Interface RbacV1() rbacv1.RbacV1Interface
RbacV1beta1() rbacv1beta1.RbacV1beta1Interface RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface
SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface
SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface
SchedulingV1() schedulingv1.SchedulingV1Interface SchedulingV1() schedulingv1.SchedulingV1Interface
@ -175,6 +177,7 @@ type Clientset struct {
rbacV1 *rbacv1.RbacV1Client rbacV1 *rbacv1.RbacV1Client
rbacV1beta1 *rbacv1beta1.RbacV1beta1Client rbacV1beta1 *rbacv1beta1.RbacV1beta1Client
rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client
resourceV1alpha1 *resourcev1alpha1.ResourceV1alpha1Client
schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client
schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client
schedulingV1 *schedulingv1.SchedulingV1Client schedulingV1 *schedulingv1.SchedulingV1Client
@ -398,6 +401,11 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return c.rbacV1alpha1 return c.rbacV1alpha1
} }
// ResourceV1alpha1 retrieves the ResourceV1alpha1Client
func (c *Clientset) ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface {
return c.resourceV1alpha1
}
// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client
func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface {
return c.schedulingV1alpha1 return c.schedulingV1alpha1
@ -644,6 +652,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
if err != nil { if err != nil {
return nil, err return nil, err
} }
cs.resourceV1alpha1, err = resourcev1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
}
cs.schedulingV1alpha1, err = schedulingv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) cs.schedulingV1alpha1, err = schedulingv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil { if err != nil {
return nil, err return nil, err
@ -732,6 +744,7 @@ func New(c rest.Interface) *Clientset {
cs.rbacV1 = rbacv1.New(c) cs.rbacV1 = rbacv1.New(c)
cs.rbacV1beta1 = rbacv1beta1.New(c) cs.rbacV1beta1 = rbacv1beta1.New(c)
cs.rbacV1alpha1 = rbacv1alpha1.New(c) cs.rbacV1alpha1 = rbacv1alpha1.New(c)
cs.resourceV1alpha1 = resourcev1alpha1.New(c)
cs.schedulingV1alpha1 = schedulingv1alpha1.New(c) cs.schedulingV1alpha1 = schedulingv1alpha1.New(c)
cs.schedulingV1beta1 = schedulingv1beta1.New(c) cs.schedulingV1beta1 = schedulingv1beta1.New(c)
cs.schedulingV1 = schedulingv1.New(c) cs.schedulingV1 = schedulingv1.New(c)

View File

@ -110,6 +110,8 @@ import (
fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake" fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake" fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake"
resourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1"
fakeresourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake"
schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1"
fakeschedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1/fake" fakeschedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1/fake"
schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
@ -390,6 +392,11 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake} return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
} }
// ResourceV1alpha1 retrieves the ResourceV1alpha1Client
func (c *Clientset) ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface {
return &fakeresourcev1alpha1.FakeResourceV1alpha1{Fake: &c.Fake}
}
// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client
func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface { func (c *Clientset) SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface {
return &fakeschedulingv1alpha1.FakeSchedulingV1alpha1{Fake: &c.Fake} return &fakeschedulingv1alpha1.FakeSchedulingV1alpha1{Fake: &c.Fake}

View File

@ -62,6 +62,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -122,6 +123,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
rbacv1.AddToScheme, rbacv1.AddToScheme,
rbacv1beta1.AddToScheme, rbacv1beta1.AddToScheme,
rbacv1alpha1.AddToScheme, rbacv1alpha1.AddToScheme,
resourcev1alpha1.AddToScheme,
schedulingv1alpha1.AddToScheme, schedulingv1alpha1.AddToScheme,
schedulingv1beta1.AddToScheme, schedulingv1beta1.AddToScheme,
schedulingv1.AddToScheme, schedulingv1.AddToScheme,

View File

@ -62,6 +62,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -122,6 +123,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
rbacv1.AddToScheme, rbacv1.AddToScheme,
rbacv1beta1.AddToScheme, rbacv1beta1.AddToScheme,
rbacv1alpha1.AddToScheme, rbacv1alpha1.AddToScheme,
resourcev1alpha1.AddToScheme,
schedulingv1alpha1.AddToScheme, schedulingv1alpha1.AddToScheme,
schedulingv1beta1.AddToScheme, schedulingv1beta1.AddToScheme,
schedulingv1.AddToScheme, schedulingv1.AddToScheme,

View File

@ -0,0 +1,20 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// This package has the automatically generated typed clients.
package v1alpha1

View File

@ -0,0 +1,20 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
// Package fake has the automatically generated clients.
package fake

View File

@ -0,0 +1,190 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
json "encoding/json"
"fmt"
v1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
testing "k8s.io/client-go/testing"
)
// FakePodSchedulings implements PodSchedulingInterface
type FakePodSchedulings struct {
Fake *FakeResourceV1alpha1
ns string
}
var podschedulingsResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha1", Resource: "podschedulings"}
var podschedulingsKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "PodScheduling"}
// Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any.
func (c *FakePodSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodScheduling, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(podschedulingsResource, c.ns, name), &v1alpha1.PodScheduling{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodScheduling), err
}
// List takes label and field selectors, and returns the list of PodSchedulings that match those selectors.
func (c *FakePodSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodSchedulingList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(podschedulingsResource, podschedulingsKind, c.ns, opts), &v1alpha1.PodSchedulingList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.PodSchedulingList{ListMeta: obj.(*v1alpha1.PodSchedulingList).ListMeta}
for _, item := range obj.(*v1alpha1.PodSchedulingList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested podSchedulings.
func (c *FakePodSchedulings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(podschedulingsResource, c.ns, opts))
}
// Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any.
func (c *FakePodSchedulings) Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (result *v1alpha1.PodScheduling, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha1.PodScheduling{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodScheduling), err
}
// Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any.
func (c *FakePodSchedulings) Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha1.PodScheduling{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodScheduling), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePodSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(podschedulingsResource, "status", c.ns, podScheduling), &v1alpha1.PodScheduling{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodScheduling), err
}
// Delete takes name of the podScheduling and deletes it. Returns an error if one occurs.
func (c *FakePodSchedulings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(podschedulingsResource, c.ns, name, opts), &v1alpha1.PodScheduling{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakePodSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(podschedulingsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.PodSchedulingList{})
return err
}
// Patch applies the patch and returns the patched podScheduling.
func (c *FakePodSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodScheduling, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.PodScheduling{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodScheduling), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling.
func (c *FakePodSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) {
if podScheduling == nil {
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
}
data, err := json.Marshal(podScheduling)
if err != nil {
return nil, err
}
name := podScheduling.Name
if name == nil {
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.PodScheduling{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodScheduling), err
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *FakePodSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) {
if podScheduling == nil {
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
}
data, err := json.Marshal(podScheduling)
if err != nil {
return nil, err
}
name := podScheduling.Name
if name == nil {
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.PodScheduling{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodScheduling), err
}

View File

@ -0,0 +1,52 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
v1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
type FakeResourceV1alpha1 struct {
*testing.Fake
}
func (c *FakeResourceV1alpha1) PodSchedulings(namespace string) v1alpha1.PodSchedulingInterface {
return &FakePodSchedulings{c, namespace}
}
func (c *FakeResourceV1alpha1) ResourceClaims(namespace string) v1alpha1.ResourceClaimInterface {
return &FakeResourceClaims{c, namespace}
}
func (c *FakeResourceV1alpha1) ResourceClaimTemplates(namespace string) v1alpha1.ResourceClaimTemplateInterface {
return &FakeResourceClaimTemplates{c, namespace}
}
func (c *FakeResourceV1alpha1) ResourceClasses() v1alpha1.ResourceClassInterface {
return &FakeResourceClasses{c}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeResourceV1alpha1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}

View File

@ -0,0 +1,190 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
json "encoding/json"
"fmt"
v1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
testing "k8s.io/client-go/testing"
)
// FakeResourceClaims implements ResourceClaimInterface
type FakeResourceClaims struct {
Fake *FakeResourceV1alpha1
ns string
}
var resourceclaimsResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha1", Resource: "resourceclaims"}
var resourceclaimsKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClaim"}
// Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any.
func (c *FakeResourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(resourceclaimsResource, c.ns, name), &v1alpha1.ResourceClaim{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaim), err
}
// List takes label and field selectors, and returns the list of ResourceClaims that match those selectors.
func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(resourceclaimsResource, resourceclaimsKind, c.ns, opts), &v1alpha1.ResourceClaimList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ResourceClaimList{ListMeta: obj.(*v1alpha1.ResourceClaimList).ListMeta}
for _, item := range obj.(*v1alpha1.ResourceClaimList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested resourceClaims.
func (c *FakeResourceClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(resourceclaimsResource, c.ns, opts))
}
// Create takes the representation of a resourceClaim and creates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *FakeResourceClaims) Create(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.CreateOptions) (result *v1alpha1.ResourceClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha1.ResourceClaim{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaim), err
}
// Update takes the representation of a resourceClaim and updates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *FakeResourceClaims) Update(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha1.ResourceClaim{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaim), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeResourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(resourceclaimsResource, "status", c.ns, resourceClaim), &v1alpha1.ResourceClaim{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaim), err
}
// Delete takes name of the resourceClaim and deletes it. Returns an error if one occurs.
func (c *FakeResourceClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(resourceclaimsResource, c.ns, name, opts), &v1alpha1.ResourceClaim{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(resourceclaimsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceClaimList{})
return err
}
// Patch applies the patch and returns the patched resourceClaim.
func (c *FakeResourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaim, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceClaim{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaim), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim.
func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) {
if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClaim)
if err != nil {
return nil, err
}
name := resourceClaim.Name
if name == nil {
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClaim{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaim), err
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) {
if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClaim)
if err != nil {
return nil, err
}
name := resourceClaim.Name
if name == nil {
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.ResourceClaim{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaim), err
}

View File

@ -0,0 +1,155 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
json "encoding/json"
"fmt"
v1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
testing "k8s.io/client-go/testing"
)
// FakeResourceClaimTemplates implements ResourceClaimTemplateInterface
type FakeResourceClaimTemplates struct {
Fake *FakeResourceV1alpha1
ns string
}
var resourceclaimtemplatesResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha1", Resource: "resourceclaimtemplates"}
var resourceclaimtemplatesKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClaimTemplate"}
// Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any.
func (c *FakeResourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewGetAction(resourceclaimtemplatesResource, c.ns, name), &v1alpha1.ResourceClaimTemplate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaimTemplate), err
}
// List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors.
func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimTemplateList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(resourceclaimtemplatesResource, resourceclaimtemplatesKind, c.ns, opts), &v1alpha1.ResourceClaimTemplateList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ResourceClaimTemplateList{ListMeta: obj.(*v1alpha1.ResourceClaimTemplateList).ListMeta}
for _, item := range obj.(*v1alpha1.ResourceClaimTemplateList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested resourceClaimTemplates.
func (c *FakeResourceClaimTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(resourceclaimtemplatesResource, c.ns, opts))
}
// Create takes the representation of a resourceClaimTemplate and creates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *FakeResourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha1.ResourceClaimTemplate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaimTemplate), err
}
// Update takes the representation of a resourceClaimTemplate and updates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *FakeResourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha1.ResourceClaimTemplate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaimTemplate), err
}
// Delete takes name of the resourceClaimTemplate and deletes it. Returns an error if one occurs.
func (c *FakeResourceClaimTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(resourceclaimtemplatesResource, c.ns, name, opts), &v1alpha1.ResourceClaimTemplate{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceClaimTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(resourceclaimtemplatesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceClaimTemplateList{})
return err
}
// Patch applies the patch and returns the patched resourceClaimTemplate.
func (c *FakeResourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaimTemplate, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceClaimTemplate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaimTemplate), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate.
func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
if resourceClaimTemplate == nil {
return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClaimTemplate)
if err != nil {
return nil, err
}
name := resourceClaimTemplate.Name
if name == nil {
return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClaimTemplate{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClaimTemplate), err
}

View File

@ -0,0 +1,146 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package fake
import (
"context"
json "encoding/json"
"fmt"
v1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
testing "k8s.io/client-go/testing"
)
// FakeResourceClasses implements ResourceClassInterface
type FakeResourceClasses struct {
Fake *FakeResourceV1alpha1
}
var resourceclassesResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha1", Resource: "resourceclasses"}
var resourceclassesKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClass"}
// Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any.
func (c *FakeResourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(resourceclassesResource, name), &v1alpha1.ResourceClass{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClass), err
}
// List takes label and field selectors, and returns the list of ResourceClasses that match those selectors.
func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClassList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(resourceclassesResource, resourceclassesKind, opts), &v1alpha1.ResourceClassList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ResourceClassList{ListMeta: obj.(*v1alpha1.ResourceClassList).ListMeta}
for _, item := range obj.(*v1alpha1.ResourceClassList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested resourceClasses.
func (c *FakeResourceClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(resourceclassesResource, opts))
}
// Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *FakeResourceClasses) Create(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.CreateOptions) (result *v1alpha1.ResourceClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(resourceclassesResource, resourceClass), &v1alpha1.ResourceClass{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClass), err
}
// Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *FakeResourceClasses) Update(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.UpdateOptions) (result *v1alpha1.ResourceClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(resourceclassesResource, resourceClass), &v1alpha1.ResourceClass{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClass), err
}
// Delete takes name of the resourceClass and deletes it. Returns an error if one occurs.
func (c *FakeResourceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(resourceclassesResource, name, opts), &v1alpha1.ResourceClass{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(resourceclassesResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceClassList{})
return err
}
// Patch applies the patch and returns the patched resourceClass.
func (c *FakeResourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClass, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, name, pt, data, subresources...), &v1alpha1.ResourceClass{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClass), err
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass.
func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err error) {
if resourceClass == nil {
return nil, fmt.Errorf("resourceClass provided to Apply must not be nil")
}
data, err := json.Marshal(resourceClass)
if err != nil {
return nil, err
}
name := resourceClass.Name
if name == nil {
return nil, fmt.Errorf("resourceClass.Name must be provided to Apply")
}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClass{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceClass), err
}

View File

@ -0,0 +1,27 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
type PodSchedulingExpansion interface{}
type ResourceClaimExpansion interface{}
type ResourceClaimTemplateExpansion interface{}
type ResourceClassExpansion interface{}

View File

@ -0,0 +1,256 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
json "encoding/json"
"fmt"
"time"
v1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// PodSchedulingsGetter has a method to return a PodSchedulingInterface.
// A group's client should implement this interface.
type PodSchedulingsGetter interface {
PodSchedulings(namespace string) PodSchedulingInterface
}
// PodSchedulingInterface has methods to work with PodScheduling resources.
type PodSchedulingInterface interface {
Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (*v1alpha1.PodScheduling, error)
Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error)
UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PodScheduling, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PodSchedulingList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodScheduling, err error)
Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error)
ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error)
PodSchedulingExpansion
}
// podSchedulings implements PodSchedulingInterface
type podSchedulings struct {
client rest.Interface
ns string
}
// newPodSchedulings returns a PodSchedulings
func newPodSchedulings(c *ResourceV1alpha1Client, namespace string) *podSchedulings {
return &podSchedulings{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any.
func (c *podSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{}
err = c.client.Get().
Namespace(c.ns).
Resource("podschedulings").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of PodSchedulings that match those selectors.
func (c *podSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodSchedulingList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.PodSchedulingList{}
err = c.client.Get().
Namespace(c.ns).
Resource("podschedulings").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested podSchedulings.
func (c *podSchedulings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("podschedulings").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any.
func (c *podSchedulings) Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (result *v1alpha1.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{}
err = c.client.Post().
Namespace(c.ns).
Resource("podschedulings").
VersionedParams(&opts, scheme.ParameterCodec).
Body(podScheduling).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any.
func (c *podSchedulings) Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{}
err = c.client.Put().
Namespace(c.ns).
Resource("podschedulings").
Name(podScheduling.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(podScheduling).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *podSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{}
err = c.client.Put().
Namespace(c.ns).
Resource("podschedulings").
Name(podScheduling.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(podScheduling).
Do(ctx).
Into(result)
return
}
// Delete takes name of the podScheduling and deletes it. Returns an error if one occurs.
func (c *podSchedulings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("podschedulings").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *podSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("podschedulings").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched podScheduling.
func (c *podSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodScheduling, err error) {
result = &v1alpha1.PodScheduling{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("podschedulings").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling.
func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) {
if podScheduling == nil {
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(podScheduling)
if err != nil {
return nil, err
}
name := podScheduling.Name
if name == nil {
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
}
result = &v1alpha1.PodScheduling{}
err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns).
Resource("podschedulings").
Name(*name).
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *podSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) {
if podScheduling == nil {
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(podScheduling)
if err != nil {
return nil, err
}
name := podScheduling.Name
if name == nil {
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
}
result = &v1alpha1.PodScheduling{}
err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns).
Resource("podschedulings").
Name(*name).
SubResource("status").
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -0,0 +1,122 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"net/http"
v1alpha1 "k8s.io/api/resource/v1alpha1"
"k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
type ResourceV1alpha1Interface interface {
RESTClient() rest.Interface
PodSchedulingsGetter
ResourceClaimsGetter
ResourceClaimTemplatesGetter
ResourceClassesGetter
}
// ResourceV1alpha1Client is used to interact with features provided by the resource.k8s.io group.
type ResourceV1alpha1Client struct {
restClient rest.Interface
}
func (c *ResourceV1alpha1Client) PodSchedulings(namespace string) PodSchedulingInterface {
return newPodSchedulings(c, namespace)
}
func (c *ResourceV1alpha1Client) ResourceClaims(namespace string) ResourceClaimInterface {
return newResourceClaims(c, namespace)
}
func (c *ResourceV1alpha1Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
return newResourceClaimTemplates(c, namespace)
}
func (c *ResourceV1alpha1Client) ResourceClasses() ResourceClassInterface {
return newResourceClasses(c)
}
// NewForConfig creates a new ResourceV1alpha1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
func NewForConfig(c *rest.Config) (*ResourceV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
httpClient, err := rest.HTTPClientFor(&config)
if err != nil {
return nil, err
}
return NewForConfigAndClient(&config, httpClient)
}
// NewForConfigAndClient creates a new ResourceV1alpha1Client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientForConfigAndClient(&config, h)
if err != nil {
return nil, err
}
return &ResourceV1alpha1Client{client}, nil
}
// NewForConfigOrDie creates a new ResourceV1alpha1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}
// New creates a new ResourceV1alpha1Client for the given RESTClient.
func New(c rest.Interface) *ResourceV1alpha1Client {
return &ResourceV1alpha1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1alpha1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *ResourceV1alpha1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}

View File

@ -0,0 +1,256 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
json "encoding/json"
"fmt"
"time"
v1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// ResourceClaimsGetter has a method to return a ResourceClaimInterface.
// A group's client should implement this interface.
type ResourceClaimsGetter interface {
ResourceClaims(namespace string) ResourceClaimInterface
}
// ResourceClaimInterface has methods to work with ResourceClaim resources.
type ResourceClaimInterface interface {
Create(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.CreateOptions) (*v1alpha1.ResourceClaim, error)
Update(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error)
UpdateStatus(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ResourceClaim, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceClaimList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaim, err error)
Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error)
ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error)
ResourceClaimExpansion
}
// resourceClaims implements ResourceClaimInterface
type resourceClaims struct {
client rest.Interface
ns string
}
// newResourceClaims returns a ResourceClaims
func newResourceClaims(c *ResourceV1alpha1Client, namespace string) *resourceClaims {
return &resourceClaims{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any.
func (c *resourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{}
err = c.client.Get().
Namespace(c.ns).
Resource("resourceclaims").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ResourceClaims that match those selectors.
func (c *resourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ResourceClaimList{}
err = c.client.Get().
Namespace(c.ns).
Resource("resourceclaims").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested resourceClaims.
func (c *resourceClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("resourceclaims").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a resourceClaim and creates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *resourceClaims) Create(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.CreateOptions) (result *v1alpha1.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{}
err = c.client.Post().
Namespace(c.ns).
Resource("resourceclaims").
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceClaim).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a resourceClaim and updates it. Returns the server's representation of the resourceClaim, and an error, if there is any.
func (c *resourceClaims) Update(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{}
err = c.client.Put().
Namespace(c.ns).
Resource("resourceclaims").
Name(resourceClaim.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceClaim).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *resourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{}
err = c.client.Put().
Namespace(c.ns).
Resource("resourceclaims").
Name(resourceClaim.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceClaim).
Do(ctx).
Into(result)
return
}
// Delete takes name of the resourceClaim and deletes it. Returns an error if one occurs.
func (c *resourceClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("resourceclaims").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *resourceClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("resourceclaims").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched resourceClaim.
func (c *resourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaim, err error) {
result = &v1alpha1.ResourceClaim{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("resourceclaims").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim.
func (c *resourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) {
if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(resourceClaim)
if err != nil {
return nil, err
}
name := resourceClaim.Name
if name == nil {
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
}
result = &v1alpha1.ResourceClaim{}
err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns).
Resource("resourceclaims").
Name(*name).
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// ApplyStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
func (c *resourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) {
if resourceClaim == nil {
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(resourceClaim)
if err != nil {
return nil, err
}
name := resourceClaim.Name
if name == nil {
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
}
result = &v1alpha1.ResourceClaim{}
err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns).
Resource("resourceclaims").
Name(*name).
SubResource("status").
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -0,0 +1,208 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
json "encoding/json"
"fmt"
"time"
v1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// ResourceClaimTemplatesGetter has a method to return a ResourceClaimTemplateInterface.
// A group's client should implement this interface.
type ResourceClaimTemplatesGetter interface {
ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface
}
// ResourceClaimTemplateInterface has methods to work with ResourceClaimTemplate resources.
type ResourceClaimTemplateInterface interface {
Create(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (*v1alpha1.ResourceClaimTemplate, error)
Update(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (*v1alpha1.ResourceClaimTemplate, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ResourceClaimTemplate, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceClaimTemplateList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaimTemplate, err error)
Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err error)
ResourceClaimTemplateExpansion
}
// resourceClaimTemplates implements ResourceClaimTemplateInterface
type resourceClaimTemplates struct {
client rest.Interface
ns string
}
// newResourceClaimTemplates returns a ResourceClaimTemplates
func newResourceClaimTemplates(c *ResourceV1alpha1Client, namespace string) *resourceClaimTemplates {
return &resourceClaimTemplates{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any.
func (c *resourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
result = &v1alpha1.ResourceClaimTemplate{}
err = c.client.Get().
Namespace(c.ns).
Resource("resourceclaimtemplates").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors.
func (c *resourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimTemplateList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ResourceClaimTemplateList{}
err = c.client.Get().
Namespace(c.ns).
Resource("resourceclaimtemplates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested resourceClaimTemplates.
func (c *resourceClaimTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("resourceclaimtemplates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a resourceClaimTemplate and creates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *resourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
result = &v1alpha1.ResourceClaimTemplate{}
err = c.client.Post().
Namespace(c.ns).
Resource("resourceclaimtemplates").
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceClaimTemplate).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a resourceClaimTemplate and updates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any.
func (c *resourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
result = &v1alpha1.ResourceClaimTemplate{}
err = c.client.Put().
Namespace(c.ns).
Resource("resourceclaimtemplates").
Name(resourceClaimTemplate.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceClaimTemplate).
Do(ctx).
Into(result)
return
}
// Delete takes name of the resourceClaimTemplate and deletes it. Returns an error if one occurs.
func (c *resourceClaimTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("resourceclaimtemplates").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *resourceClaimTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("resourceclaimtemplates").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched resourceClaimTemplate.
func (c *resourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaimTemplate, err error) {
result = &v1alpha1.ResourceClaimTemplate{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("resourceclaimtemplates").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate.
func (c *resourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
if resourceClaimTemplate == nil {
return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(resourceClaimTemplate)
if err != nil {
return nil, err
}
name := resourceClaimTemplate.Name
if name == nil {
return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply")
}
result = &v1alpha1.ResourceClaimTemplate{}
err = c.client.Patch(types.ApplyPatchType).
Namespace(c.ns).
Resource("resourceclaimtemplates").
Name(*name).
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -0,0 +1,197 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1alpha1
import (
"context"
json "encoding/json"
"fmt"
"time"
v1alpha1 "k8s.io/api/resource/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// ResourceClassesGetter has a method to return a ResourceClassInterface.
// A group's client should implement this interface.
type ResourceClassesGetter interface {
ResourceClasses() ResourceClassInterface
}
// ResourceClassInterface has methods to work with ResourceClass resources.
type ResourceClassInterface interface {
Create(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.CreateOptions) (*v1alpha1.ResourceClass, error)
Update(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.UpdateOptions) (*v1alpha1.ResourceClass, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ResourceClass, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceClassList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClass, err error)
Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err error)
ResourceClassExpansion
}
// resourceClasses implements ResourceClassInterface
type resourceClasses struct {
client rest.Interface
}
// newResourceClasses returns a ResourceClasses
func newResourceClasses(c *ResourceV1alpha1Client) *resourceClasses {
return &resourceClasses{
client: c.RESTClient(),
}
}
// Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any.
func (c *resourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClass, err error) {
result = &v1alpha1.ResourceClass{}
err = c.client.Get().
Resource("resourceclasses").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ResourceClasses that match those selectors.
func (c *resourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClassList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ResourceClassList{}
err = c.client.Get().
Resource("resourceclasses").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested resourceClasses.
func (c *resourceClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("resourceclasses").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *resourceClasses) Create(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.CreateOptions) (result *v1alpha1.ResourceClass, err error) {
result = &v1alpha1.ResourceClass{}
err = c.client.Post().
Resource("resourceclasses").
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceClass).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any.
func (c *resourceClasses) Update(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.UpdateOptions) (result *v1alpha1.ResourceClass, err error) {
result = &v1alpha1.ResourceClass{}
err = c.client.Put().
Resource("resourceclasses").
Name(resourceClass.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceClass).
Do(ctx).
Into(result)
return
}
// Delete takes name of the resourceClass and deletes it. Returns an error if one occurs.
func (c *resourceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("resourceclasses").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *resourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("resourceclasses").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched resourceClass.
func (c *resourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClass, err error) {
result = &v1alpha1.ResourceClass{}
err = c.client.Patch(pt).
Resource("resourceclasses").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass.
func (c *resourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err error) {
if resourceClass == nil {
return nil, fmt.Errorf("resourceClass provided to Apply must not be nil")
}
patchOpts := opts.ToPatchOptions()
data, err := json.Marshal(resourceClass)
if err != nil {
return nil, err
}
name := resourceClass.Name
if name == nil {
return nil, fmt.Errorf("resourceClass.Name must be provided to Apply")
}
result = &v1alpha1.ResourceClass{}
err = c.client.Patch(types.ApplyPatchType).
Resource("resourceclasses").
Name(*name).
VersionedParams(&patchOpts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -0,0 +1,47 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v1alpha1
// PodSchedulingListerExpansion allows custom methods to be added to
// PodSchedulingLister.
type PodSchedulingListerExpansion interface{}
// PodSchedulingNamespaceListerExpansion allows custom methods to be added to
// PodSchedulingNamespaceLister.
type PodSchedulingNamespaceListerExpansion interface{}
// ResourceClaimListerExpansion allows custom methods to be added to
// ResourceClaimLister.
type ResourceClaimListerExpansion interface{}
// ResourceClaimNamespaceListerExpansion allows custom methods to be added to
// ResourceClaimNamespaceLister.
type ResourceClaimNamespaceListerExpansion interface{}
// ResourceClaimTemplateListerExpansion allows custom methods to be added to
// ResourceClaimTemplateLister.
type ResourceClaimTemplateListerExpansion interface{}
// ResourceClaimTemplateNamespaceListerExpansion allows custom methods to be added to
// ResourceClaimTemplateNamespaceLister.
type ResourceClaimTemplateNamespaceListerExpansion interface{}
// ResourceClassListerExpansion allows custom methods to be added to
// ResourceClassLister.
type ResourceClassListerExpansion interface{}

View File

@ -0,0 +1,99 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "k8s.io/api/resource/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// PodSchedulingLister helps list PodSchedulings.
// All objects returned here must be treated as read-only.
type PodSchedulingLister interface {
// List lists all PodSchedulings in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.PodScheduling, err error)
// PodSchedulings returns an object that can list and get PodSchedulings.
PodSchedulings(namespace string) PodSchedulingNamespaceLister
PodSchedulingListerExpansion
}
// podSchedulingLister implements the PodSchedulingLister interface.
type podSchedulingLister struct {
indexer cache.Indexer
}
// NewPodSchedulingLister returns a new PodSchedulingLister.
func NewPodSchedulingLister(indexer cache.Indexer) PodSchedulingLister {
return &podSchedulingLister{indexer: indexer}
}
// List lists all PodSchedulings in the indexer.
func (s *podSchedulingLister) List(selector labels.Selector) (ret []*v1alpha1.PodScheduling, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.PodScheduling))
})
return ret, err
}
// PodSchedulings returns an object that can list and get PodSchedulings.
func (s *podSchedulingLister) PodSchedulings(namespace string) PodSchedulingNamespaceLister {
return podSchedulingNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// PodSchedulingNamespaceLister helps list and get PodSchedulings.
// All objects returned here must be treated as read-only.
type PodSchedulingNamespaceLister interface {
// List lists all PodSchedulings in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.PodScheduling, err error)
// Get retrieves the PodScheduling from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.PodScheduling, error)
PodSchedulingNamespaceListerExpansion
}
// podSchedulingNamespaceLister implements the PodSchedulingNamespaceLister
// interface.
type podSchedulingNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all PodSchedulings in the indexer for a given namespace.
func (s podSchedulingNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.PodScheduling, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.PodScheduling))
})
return ret, err
}
// Get retrieves the PodScheduling from the indexer for a given namespace and name.
func (s podSchedulingNamespaceLister) Get(name string) (*v1alpha1.PodScheduling, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("podscheduling"), name)
}
return obj.(*v1alpha1.PodScheduling), nil
}

View File

@ -0,0 +1,99 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "k8s.io/api/resource/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// ResourceClaimLister helps list ResourceClaims.
// All objects returned here must be treated as read-only.
type ResourceClaimLister interface {
// List lists all ResourceClaims in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClaim, err error)
// ResourceClaims returns an object that can list and get ResourceClaims.
ResourceClaims(namespace string) ResourceClaimNamespaceLister
ResourceClaimListerExpansion
}
// resourceClaimLister implements the ResourceClaimLister interface.
type resourceClaimLister struct {
indexer cache.Indexer
}
// NewResourceClaimLister returns a new ResourceClaimLister.
func NewResourceClaimLister(indexer cache.Indexer) ResourceClaimLister {
return &resourceClaimLister{indexer: indexer}
}
// List lists all ResourceClaims in the indexer.
func (s *resourceClaimLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClaim, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClaim))
})
return ret, err
}
// ResourceClaims returns an object that can list and get ResourceClaims.
func (s *resourceClaimLister) ResourceClaims(namespace string) ResourceClaimNamespaceLister {
return resourceClaimNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// ResourceClaimNamespaceLister helps list and get ResourceClaims.
// All objects returned here must be treated as read-only.
type ResourceClaimNamespaceLister interface {
// List lists all ResourceClaims in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClaim, err error)
// Get retrieves the ResourceClaim from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ResourceClaim, error)
ResourceClaimNamespaceListerExpansion
}
// resourceClaimNamespaceLister implements the ResourceClaimNamespaceLister
// interface.
type resourceClaimNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ResourceClaims in the indexer for a given namespace.
func (s resourceClaimNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClaim, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClaim))
})
return ret, err
}
// Get retrieves the ResourceClaim from the indexer for a given namespace and name.
func (s resourceClaimNamespaceLister) Get(name string) (*v1alpha1.ResourceClaim, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("resourceclaim"), name)
}
return obj.(*v1alpha1.ResourceClaim), nil
}

View File

@ -0,0 +1,99 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "k8s.io/api/resource/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// ResourceClaimTemplateLister helps list ResourceClaimTemplates.
// All objects returned here must be treated as read-only.
type ResourceClaimTemplateLister interface {
// List lists all ResourceClaimTemplates in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClaimTemplate, err error)
// ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates.
ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister
ResourceClaimTemplateListerExpansion
}
// resourceClaimTemplateLister implements the ResourceClaimTemplateLister interface.
type resourceClaimTemplateLister struct {
indexer cache.Indexer
}
// NewResourceClaimTemplateLister returns a new ResourceClaimTemplateLister.
func NewResourceClaimTemplateLister(indexer cache.Indexer) ResourceClaimTemplateLister {
return &resourceClaimTemplateLister{indexer: indexer}
}
// List lists all ResourceClaimTemplates in the indexer.
func (s *resourceClaimTemplateLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClaimTemplate, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClaimTemplate))
})
return ret, err
}
// ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates.
func (s *resourceClaimTemplateLister) ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister {
return resourceClaimTemplateNamespaceLister{indexer: s.indexer, namespace: namespace}
}
// ResourceClaimTemplateNamespaceLister helps list and get ResourceClaimTemplates.
// All objects returned here must be treated as read-only.
type ResourceClaimTemplateNamespaceLister interface {
// List lists all ResourceClaimTemplates in the indexer for a given namespace.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClaimTemplate, err error)
// Get retrieves the ResourceClaimTemplate from the indexer for a given namespace and name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ResourceClaimTemplate, error)
ResourceClaimTemplateNamespaceListerExpansion
}
// resourceClaimTemplateNamespaceLister implements the ResourceClaimTemplateNamespaceLister
// interface.
type resourceClaimTemplateNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ResourceClaimTemplates in the indexer for a given namespace.
func (s resourceClaimTemplateNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClaimTemplate, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClaimTemplate))
})
return ret, err
}
// Get retrieves the ResourceClaimTemplate from the indexer for a given namespace and name.
func (s resourceClaimTemplateNamespaceLister) Get(name string) (*v1alpha1.ResourceClaimTemplate, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("resourceclaimtemplate"), name)
}
return obj.(*v1alpha1.ResourceClaimTemplate), nil
}

View File

@ -0,0 +1,68 @@
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by lister-gen. DO NOT EDIT.
package v1alpha1
import (
v1alpha1 "k8s.io/api/resource/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
)
// ResourceClassLister helps list ResourceClasses.
// All objects returned here must be treated as read-only.
type ResourceClassLister interface {
// List lists all ResourceClasses in the indexer.
// Objects returned here must be treated as read-only.
List(selector labels.Selector) (ret []*v1alpha1.ResourceClass, err error)
// Get retrieves the ResourceClass from the index for a given name.
// Objects returned here must be treated as read-only.
Get(name string) (*v1alpha1.ResourceClass, error)
ResourceClassListerExpansion
}
// resourceClassLister implements the ResourceClassLister interface.
type resourceClassLister struct {
indexer cache.Indexer
}
// NewResourceClassLister returns a new ResourceClassLister.
func NewResourceClassLister(indexer cache.Indexer) ResourceClassLister {
return &resourceClassLister{indexer: indexer}
}
// List lists all ResourceClasses in the indexer.
func (s *resourceClassLister) List(selector labels.Selector) (ret []*v1alpha1.ResourceClass, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ResourceClass))
})
return ret, err
}
// Get retrieves the ResourceClass from the index for a given name.
func (s *resourceClassLister) Get(name string) (*v1alpha1.ResourceClass, error) {
obj, exists, err := s.indexer.GetByKey(name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("resourceclass"), name)
}
return obj.(*v1alpha1.ResourceClass), nil
}