diff --git a/Makefile b/Makefile index bf44d39af..d5cc8f0cb 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,6 @@ IMG ?= ${STAGING_REGISTRY}/${IMAGE_NAME}:${TAG} BYOH_BASE_IMG = byoh/node:e2e BYOH_BASE_IMG_DEV = byoh/node:dev # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) -CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" REPO_ROOT := $(shell pwd) GINKGO_FOCUS ?= @@ -74,8 +73,17 @@ help: ## Display this help. ##@ Development -manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases +manifests: controller-gen yq ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. + $(CONTROLLER_GEN) crd:crdVersions=v1 rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases + $(YQ) -i eval 'del(.metadata.creationTimestamp)' config/crd/bases/infrastructure.cluster.x-k8s.io_bootstrapkubeconfigs.yaml + $(YQ) -i eval 'del(.metadata.creationTimestamp)' config/crd/bases/infrastructure.cluster.x-k8s.io_byoclusters.yaml + $(YQ) -i eval 'del(.metadata.creationTimestamp)' config/crd/bases/infrastructure.cluster.x-k8s.io_byoclustertemplates.yaml + $(YQ) -i eval 'del(.metadata.creationTimestamp)' config/crd/bases/infrastructure.cluster.x-k8s.io_byohosts.yaml + $(YQ) -i eval 'del(.metadata.creationTimestamp)' config/crd/bases/infrastructure.cluster.x-k8s.io_byomachines.yaml + $(YQ) -i eval 'del(.metadata.creationTimestamp)' config/crd/bases/infrastructure.cluster.x-k8s.io_byomachinetemplates.yaml + $(YQ) -i eval 'del(.metadata.creationTimestamp)' config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigs.yaml + $(YQ) -i eval 'del(.metadata.creationTimestamp)' config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigtemplates.yaml + generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." @@ -196,12 +204,16 @@ publish-infra-yaml:kustomize # Generate infrastructure-components.yaml for the p CONTROLLER_GEN = $(shell pwd)/bin/controller-gen controller-gen: ## Download controller-gen locally if necessary. - $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1) + $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0) KUSTOMIZE = $(shell pwd)/bin/kustomize kustomize: ## Download kustomize locally if necessary. $(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.2) +YQ = $(shell pwd)/bin/yq +yq: ## Download kustomize locally if necessary. + $(call go-get-tool,$(YQ),github.com/mikefarah/yq/v4@v4.31.1) + host-agent-binaries: ## Builds the binaries for the host-agent RELEASE_BINARY=./byoh-hostagent GOOS=linux GOARCH=amd64 GOLDFLAGS="$(LDFLAGS) $(STATIC)" \ HOST_AGENT_DIR=./$(HOST_AGENT_DIR) $(MAKE) host-agent-binary diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_bootstrapkubeconfigs.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_bootstrapkubeconfigs.yaml index 763cbc728..e5cfd0ceb 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_bootstrapkubeconfigs.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_bootstrapkubeconfigs.yaml @@ -1,11 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.10.0 name: bootstrapkubeconfigs.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -16,59 +14,45 @@ spec: singular: bootstrapkubeconfig scope: Namespaced versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: BootstrapKubeconfig is the Schema for the bootstrapkubeconfigs - API - 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 - metadata: - type: object - spec: - description: BootstrapKubeconfigSpec defines the desired state of BootstrapKubeconfig - properties: - apiserver: - description: APIServer is the address of the kubernetes cluster (https://hostname:port). - type: string - certificate-authority-data: - description: CertificateAuthorityData contains PEM-encoded certificate - authority certificates. - type: string - insecure-skip-tls-verify: - default: false - description: InsecureSkipTLSVerify skips the validity check for the - server's certificate. This will make your HTTPS connections insecure. - type: boolean - required: - - apiserver - - certificate-authority-data - type: object - status: - description: BootstrapKubeconfigStatus defines the observed state of BootstrapKubeconfig - properties: - bootstrapKubeconfigData: - description: BootstrapKubeconfigData is an optional reference to a - bootstrap kubeconfig info for starting the host registration process - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] + - name: v1beta1 + schema: + openAPIV3Schema: + description: BootstrapKubeconfig is the Schema for the bootstrapkubeconfigs API + 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 + metadata: + type: object + spec: + description: BootstrapKubeconfigSpec defines the desired state of BootstrapKubeconfig + properties: + apiserver: + description: APIServer is the address of the kubernetes cluster (https://hostname:port). + type: string + certificate-authority-data: + description: CertificateAuthorityData contains PEM-encoded certificate authority certificates. + type: string + insecure-skip-tls-verify: + default: false + description: InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. + type: boolean + required: + - apiserver + - certificate-authority-data + type: object + status: + description: BootstrapKubeconfigStatus defines the observed state of BootstrapKubeconfig + properties: + bootstrapKubeconfigData: + description: BootstrapKubeconfigData is an optional reference to a bootstrap kubeconfig info for starting the host registration process + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_byoclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_byoclusters.yaml index 13cf36fef..ecdce5843 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_byoclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_byoclusters.yaml @@ -1,11 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.10.0 name: byoclusters.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -14,130 +12,97 @@ spec: listKind: ByoClusterList plural: byoclusters shortNames: - - byoc + - byoc singular: byocluster scope: Namespaced versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: ByoCluster is the Schema for the byoclusters API - 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 - metadata: - type: object - spec: - description: ByoClusterSpec defines the desired state of ByoCluster - properties: - bundleLookupBaseRegistry: - description: BundleLookupBaseRegistry is the base Registry URL that - is used for pulling byoh bundle images, if not set, the default - will be set to https://projects.registry.vmware.com/cluster_api_provider_bringyourownhost - type: string - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint used to - communicate with the control plane. - properties: - host: - description: Host is the hostname on which the API server is serving. - type: string - port: - description: Port is the port on which the API server is serving. - format: int32 - type: integer - required: - - host - - port - type: object - type: object - status: - description: ByoClusterStatus defines the observed state of ByoCluster - properties: - conditions: - description: Conditions defines current service state of the ByoCluster. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + - name: v1beta1 + schema: + openAPIV3Schema: + description: ByoCluster is the Schema for the byoclusters API + 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 + metadata: + type: object + spec: + description: ByoClusterSpec defines the desired state of ByoCluster + properties: + bundleLookupBaseRegistry: + description: BundleLookupBaseRegistry is the base Registry URL that is used for pulling byoh bundle images, if not set, the default will be set to https://projects.registry.vmware.com/cluster_api_provider_bringyourownhost + type: string + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time - type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. - type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. - type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. - type: string - status: - description: Status of the condition, one of True, False, Unknown. - type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. + host: + description: Host is the hostname on which the API server is serving. type: string + port: + description: Port is the port on which the API server is serving. + format: int32 + type: integer required: - - lastTransitionTime - - status - - type + - host + - port type: object - type: array - failureDomains: - additionalProperties: - description: FailureDomainSpec is the Schema for Cluster API failure - domains. It allows controllers to understand how many failure - domains a cluster can optionally span across. - properties: - attributes: - additionalProperties: + type: object + status: + description: ByoClusterStatus defines the observed state of ByoCluster + properties: + conditions: + description: Conditions defines current service state of the ByoCluster. + items: + description: Condition defines an observation of a Cluster API resource operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may not be empty. + type: string + severity: + description: Severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. type: string - description: Attributes is a free form map of attributes an - infrastructure provider might use or require. - type: object - controlPlane: - description: ControlPlane determines if this failure domain - is suitable for use by control plane machines. - type: boolean + required: + - lastTransitionTime + - status + - type + type: object + type: array + failureDomains: + additionalProperties: + description: FailureDomainSpec is the Schema for Cluster API failure domains. It allows controllers to understand how many failure domains a cluster can optionally span across. + properties: + attributes: + additionalProperties: + type: string + description: Attributes is a free form map of attributes an infrastructure provider might use or require. + type: object + controlPlane: + description: ControlPlane determines if this failure domain is suitable for use by control plane machines. + type: boolean + type: object + description: FailureDomains is a list of failure domain objects synced from the infrastructure provider. type: object - description: FailureDomains is a list of failure domain objects synced - from the infrastructure provider. - type: object - ready: - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] + ready: + type: boolean + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_byoclustertemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_byoclustertemplates.yaml index 49ec68863..20551e02b 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_byoclustertemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_byoclustertemplates.yaml @@ -1,115 +1,89 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.10.0 name: byoclustertemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io names: categories: - - cluster-api + - cluster-api kind: ByoClusterTemplate listKind: ByoClusterTemplateList plural: byoclustertemplates shortNames: - - byoct + - byoct singular: byoclustertemplate scope: Namespaced versions: - - additionalPrinterColumns: - - description: Time duration since creation of ByoClusterTemplate - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: ByoClusterTemplate is the Schema for the byoclustertemplates - API. - 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 - metadata: - type: object - spec: - description: ByoClusterTemplateSpec defines the desired state of ByoClusterTemplate. - properties: - template: - description: ByoClusterTemplateResource describes the data needed - to create a ByoCluster from a template. - properties: - metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - type: object - spec: - description: ByoClusterSpec defines the desired state of ByoCluster - properties: - bundleLookupBaseRegistry: - description: BundleLookupBaseRegistry is the base Registry - URL that is used for pulling byoh bundle images, if not - set, the default will be set to https://projects.registry.vmware.com/cluster_api_provider_bringyourownhost - type: string - controlPlaneEndpoint: - description: ControlPlaneEndpoint represents the endpoint - used to communicate with the control plane. - properties: - host: - description: Host is the hostname on which the API server - is serving. + - additionalPrinterColumns: + - description: Time duration since creation of ByoClusterTemplate + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + description: ByoClusterTemplate is the Schema for the byoclustertemplates API. + 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 + metadata: + type: object + spec: + description: ByoClusterTemplateSpec defines the desired state of ByoClusterTemplate. + properties: + template: + description: ByoClusterTemplateResource describes the data needed to create a ByoCluster from a template. + properties: + metadata: + description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + properties: + annotations: + additionalProperties: type: string - port: - description: Port is the port on which the API server - is serving. - format: int32 - type: integer - required: - - host - - port - type: object - type: object - required: - - spec - type: object - required: - - template - type: object - type: object - served: true - storage: true - subresources: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] + description: 'Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + type: object + spec: + description: ByoClusterSpec defines the desired state of ByoCluster + properties: + bundleLookupBaseRegistry: + description: BundleLookupBaseRegistry is the base Registry URL that is used for pulling byoh bundle images, if not set, the default will be set to https://projects.registry.vmware.com/cluster_api_provider_bringyourownhost + type: string + controlPlaneEndpoint: + description: ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. + properties: + host: + description: Host is the hostname on which the API server is serving. + type: string + port: + description: Port is the port on which the API server is serving. + format: int32 + type: integer + required: + - host + - port + type: object + type: object + required: + - spec + type: object + required: + - template + type: object + type: object + served: true + storage: true + subresources: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_byohosts.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_byohosts.yaml index f9399ca8e..7e88729e9 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_byohosts.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_byohosts.yaml @@ -1,11 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.10.0 name: byohosts.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -14,258 +12,193 @@ spec: listKind: ByoHostList plural: byohosts shortNames: - - byoh + - byoh singular: byohost scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .status.hostinfo.osname - name: OSName - type: string - - jsonPath: .status.hostinfo.osimage - name: OSImage - type: string - - jsonPath: .status.hostinfo.architecture - name: Arch - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: ByoHost is the Schema for the byohosts API - 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 - metadata: - type: object - spec: - description: ByoHostSpec defines the desired state of ByoHost - properties: - bootstrapSecret: - description: BootstrapSecret is an optional reference to a Cluster - API Secret for bootstrap purpose - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - installationSecret: - description: InstallationSecret is an optional reference to InstallationSecret - generated by InstallerController for K8s installation - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - uninstallationScript: - description: UninstallationScript is an optional field to store uninstall - script generated by InstallerController - type: string - type: object - status: - description: ByoHostStatus defines the observed state of ByoHost - properties: - conditions: - description: Conditions defines current service state of the BYOMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + - additionalPrinterColumns: + - jsonPath: .status.hostinfo.osname + name: OSName + type: string + - jsonPath: .status.hostinfo.osimage + name: OSImage + type: string + - jsonPath: .status.hostinfo.architecture + name: Arch + type: string + name: v1beta1 + schema: + openAPIV3Schema: + description: ByoHost is the Schema for the byohosts API + 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 + metadata: + type: object + spec: + description: ByoHostSpec defines the desired state of ByoHost + properties: + bootstrapSecret: + description: BootstrapSecret is an optional reference to a Cluster API Secret for bootstrap purpose properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time + apiVersion: + description: API version of the referent. type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string - status: - description: Status of the condition, one of True, False, Unknown. + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' type: string - required: - - lastTransitionTime - - status - - type type: object - type: array - hostinfo: - description: HostDetails returns the platform details of the host. - properties: - architecture: - description: The Architecture reported by the host. - type: string - osimage: - description: OS Image reported by the host. - type: string - osname: - description: The Operating System reported by the host. - type: string - type: object - machineRef: - description: MachineRef is an optional reference to a Cluster API - Machine using this host. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - network: - description: Network returns the network status for each of the host's - configured network interfaces. - items: - description: NetworkStatus provides information about one of a VM's - networks. + x-kubernetes-map-type: atomic + installationSecret: + description: InstallationSecret is an optional reference to InstallationSecret generated by InstallerController for K8s installation properties: - connected: - description: Connected is a flag that indicates whether this - network is currently connected to the VM. - type: boolean - ipAddrs: - description: IPAddrs is one or more IP addresses reported by - vm-tools. - items: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + uninstallationScript: + description: UninstallationScript is an optional field to store uninstall script generated by InstallerController + type: string + type: object + status: + description: ByoHostStatus defines the observed state of ByoHost + properties: + conditions: + description: Conditions defines current service state of the BYOMachine. + items: + description: Condition defines an observation of a Cluster API resource operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may not be empty. + type: string + severity: + description: Severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. type: string - type: array - isDefault: - description: IsDefault is a flag that indicates whether this - interface name is where the default gateway sit on. - type: boolean - macAddr: - description: MACAddr is the MAC address of the network device. + required: + - lastTransitionTime + - status + - type + type: object + type: array + hostinfo: + description: HostDetails returns the platform details of the host. + properties: + architecture: + description: The Architecture reported by the host. + type: string + osimage: + description: OS Image reported by the host. type: string - networkInterfaceName: - description: NetworkInterfaceName is the name of the network - interface. + osname: + description: The Operating System reported by the host. type: string - required: - - macAddr type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] + machineRef: + description: MachineRef is an optional reference to a Cluster API Machine using this host. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + network: + description: Network returns the network status for each of the host's configured network interfaces. + items: + description: NetworkStatus provides information about one of a VM's networks. + properties: + connected: + description: Connected is a flag that indicates whether this network is currently connected to the VM. + type: boolean + ipAddrs: + description: IPAddrs is one or more IP addresses reported by vm-tools. + items: + type: string + type: array + isDefault: + description: IsDefault is a flag that indicates whether this interface name is where the default gateway sit on. + type: boolean + macAddr: + description: MACAddr is the MAC address of the network device. + type: string + networkInterfaceName: + description: NetworkInterfaceName is the name of the network interface. + type: string + required: + - macAddr + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_byomachines.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_byomachines.yaml index 8b32a3cf1..b399a6b1b 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_byomachines.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_byomachines.yaml @@ -1,11 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.10.0 name: byomachines.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -14,187 +12,137 @@ spec: listKind: ByoMachineList plural: byomachines shortNames: - - byom + - byom singular: byomachine scope: Namespaced versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: ByoMachine is the Schema for the byomachines API - 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 - metadata: - type: object - spec: - description: ByoMachineSpec defines the desired state of ByoMachine - properties: - installerRef: - description: InstallerRef is an optional reference to a installer-specific - resource that holds the details of InstallationSecret to be used - to install BYOH Bundle. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - providerID: - type: string - selector: - description: Label Selector to choose the byohost - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator - is "In", and the values array contains only "value". The requirements - are ANDed. - type: object - type: object - type: object - status: - description: ByoMachineStatus defines the observed state of ByoMachine - properties: - conditions: - description: Conditions defines current service state of the BYOMachine. - items: - description: Condition defines an observation of a Cluster API resource - operational state. + - name: v1beta1 + schema: + openAPIV3Schema: + description: ByoMachine is the Schema for the byomachines API + 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 + metadata: + type: object + spec: + description: ByoMachineSpec defines the desired state of ByoMachine + properties: + installerRef: + description: InstallerRef is an optional reference to a installer-specific resource that holds the details of InstallationSecret to be used to install BYOH Bundle. properties: - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. This should be when the underlying condition changed. - If that is not known, then using the time when the API field - changed is acceptable. - format: date-time + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' type: string - message: - description: A human readable message indicating details about - the transition. This field may be empty. + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' type: string - reason: - description: The reason for the condition's last transition - in CamelCase. The specific API may choose whether or not this - field is considered a guaranteed API. This field may not be - empty. + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' type: string - severity: - description: Severity provides an explicit classification of - Reason code, so the users or machines can immediately understand - the current situation and act accordingly. The Severity field - MUST be set only when Status=False. + type: object + x-kubernetes-map-type: atomic + providerID: + type: string + selector: + description: Label Selector to choose the byohost + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + type: object + status: + description: ByoMachineStatus defines the observed state of ByoMachine + properties: + conditions: + description: Conditions defines current service state of the BYOMachine. + items: + description: Condition defines an observation of a Cluster API resource operational state. + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: A human readable message indicating details about the transition. This field may be empty. + type: string + reason: + description: The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may not be empty. + type: string + severity: + description: Severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. + type: string + status: + description: Status of the condition, one of True, False, Unknown. + type: string + type: + description: Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. + type: string + required: + - lastTransitionTime + - status + - type + type: object + type: array + hostinfo: + description: HostInfo has the attached host platform details. + properties: + architecture: + description: The Architecture reported by the host. type: string - status: - description: Status of the condition, one of True, False, Unknown. + osimage: + description: OS Image reported by the host. type: string - type: - description: Type of condition in CamelCase or in foo.example.com/CamelCase. - Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. + osname: + description: The Operating System reported by the host. type: string - required: - - lastTransitionTime - - status - - type type: object - type: array - hostinfo: - description: HostInfo has the attached host platform details. - properties: - architecture: - description: The Architecture reported by the host. - type: string - osimage: - description: OS Image reported by the host. - type: string - osname: - description: The Operating System reported by the host. - type: string - type: object - ready: - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] + ready: + type: boolean + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_byomachinetemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_byomachinetemplates.yaml index 9b746c9ad..68fc176b9 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_byomachinetemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_byomachinetemplates.yaml @@ -1,11 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.10.0 name: byomachinetemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -16,139 +14,99 @@ spec: singular: byomachinetemplate scope: Namespaced versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: ByoMachineTemplate is the Schema for the byomachinetemplates - API - 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 - metadata: - type: object - spec: - description: ByoMachineTemplateSpec defines the desired state of ByoMachineTemplate - properties: - template: - description: ByoMachineTemplateResource defines the desired state - of ByoMachineTemplateResource - properties: - spec: - description: Spec is the specification of the desired behavior - of the machine. - properties: - installerRef: - description: InstallerRef is an optional reference to a installer-specific - resource that holds the details of InstallationSecret to - be used to install BYOH Bundle. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead - of an entire object, this string should contain a valid - JSON/Go field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container - within a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that - triggered the event) or if no container name is specified - "spec.containers[2]" (container with index 2 in this - pod). This syntax is chosen only to have some well-defined - way of referencing a part of an object. TODO: this design - is not final and this field is subject to change in - the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - providerID: - type: string - selector: - description: Label Selector to choose the byohost - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: + - name: v1beta1 + schema: + openAPIV3Schema: + description: ByoMachineTemplate is the Schema for the byomachinetemplates API + 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 + metadata: + type: object + spec: + description: ByoMachineTemplateSpec defines the desired state of ByoMachineTemplate + properties: + template: + description: ByoMachineTemplateResource defines the desired state of ByoMachineTemplateResource + properties: + spec: + description: Spec is the specification of the desired behavior of the machine. + properties: + installerRef: + description: InstallerRef is an optional reference to a installer-specific resource that holds the details of InstallationSecret to be used to install BYOH Bundle. + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + providerID: + type: string + selector: + description: Label Selector to choose the byohost + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. type: string - type: array - required: - - key - - operator + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - type: object - required: - - spec - type: object - required: - - template - type: object - status: - description: ByoMachineTemplateStatus defines the observed state of ByoMachineTemplate - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] + type: object + x-kubernetes-map-type: atomic + type: object + required: + - spec + type: object + required: + - template + type: object + status: + description: ByoMachineTemplateStatus defines the observed state of ByoMachineTemplate + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigs.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigs.yaml index d3d3ae5a0..40657793b 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigs.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigs.yaml @@ -1,11 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.10.0 name: k8sinstallerconfigs.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -16,92 +14,67 @@ spec: singular: k8sinstallerconfig scope: Namespaced versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: K8sInstallerConfig is the Schema for the k8sinstallerconfigs - API - 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 - metadata: - type: object - spec: - description: K8sInstallerConfigSpec defines the desired state of K8sInstallerConfig - properties: - bundleRepo: - description: BundleRepo is the OCI registry from which the carvel - imgpkg bundle will be downloaded - type: string - bundleType: - description: BundleType is the type of bundle (e.g. k8s) that needs - to be downloaded - type: string - required: - - bundleRepo - - bundleType - type: object - status: - description: K8sInstallerConfigStatus defines the observed state of K8sInstallerConfig - properties: - installationSecret: - description: InstallationSecret is an optional reference to a generated - installation secret by K8sInstallerConfig controller - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of - an entire object, this string should contain a valid JSON/Go - field access statement, such as desiredState.manifest.containers[2]. - For example, if the object reference is to a container within - a pod, this would take on a value like: "spec.containers{name}" - (where "name" refers to the name of the container that triggered - the event) or if no container name is specified "spec.containers[2]" - (container with index 2 in this pod). This syntax is chosen - only to have some well-defined way of referencing a part of - an object. TODO: this design is not final and this field is - subject to change in the future.' - type: string - kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - resourceVersion: - description: 'Specific resourceVersion to which this reference - is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' - type: string - uid: - description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' - type: string - type: object - ready: - description: Ready indicates the InstallationSecret field is ready - to be consumed - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] + - name: v1beta1 + schema: + openAPIV3Schema: + description: K8sInstallerConfig is the Schema for the k8sinstallerconfigs API + 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 + metadata: + type: object + spec: + description: K8sInstallerConfigSpec defines the desired state of K8sInstallerConfig + properties: + bundleRepo: + description: BundleRepo is the OCI registry from which the carvel imgpkg bundle will be downloaded + type: string + bundleType: + description: BundleType is the type of bundle (e.g. k8s) that needs to be downloaded + type: string + required: + - bundleRepo + - bundleType + type: object + status: + description: K8sInstallerConfigStatus defines the observed state of K8sInstallerConfig + properties: + installationSecret: + description: InstallationSecret is an optional reference to a generated installation secret by K8sInstallerConfig controller + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + ready: + description: Ready indicates the InstallationSecret field is ready to be consumed + type: boolean + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigtemplates.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigtemplates.yaml index cc322715e..2272c155b 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigtemplates.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_k8sinstallerconfigtemplates.yaml @@ -1,11 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.1 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.10.0 name: k8sinstallerconfigtemplates.infrastructure.cluster.x-k8s.io spec: group: infrastructure.cluster.x-k8s.io @@ -16,64 +14,48 @@ spec: singular: k8sinstallerconfigtemplate scope: Namespaced versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: K8sInstallerConfigTemplate is the Schema for the k8sinstallerconfigtemplates - API - 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 - metadata: - type: object - spec: - description: K8sInstallerConfigTemplateSpec defines the desired state - of K8sInstallerConfigTemplate - properties: - template: - properties: - spec: - description: Spec is the specification of the desired behavior - of the installer config. - properties: - bundleRepo: - description: BundleRepo is the OCI registry from which the - carvel imgpkg bundle will be downloaded - type: string - bundleType: - description: BundleType is the type of bundle (e.g. k8s) that - needs to be downloaded - type: string - required: - - bundleRepo - - bundleType - type: object - required: - - spec - type: object - required: - - template - type: object - status: - description: K8sInstallerConfigTemplateStatus defines the observed state - of K8sInstallerConfigTemplate - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] + - name: v1beta1 + schema: + openAPIV3Schema: + description: K8sInstallerConfigTemplate is the Schema for the k8sinstallerconfigtemplates API + 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 + metadata: + type: object + spec: + description: K8sInstallerConfigTemplateSpec defines the desired state of K8sInstallerConfigTemplate + properties: + template: + properties: + spec: + description: Spec is the specification of the desired behavior of the installer config. + properties: + bundleRepo: + description: BundleRepo is the OCI registry from which the carvel imgpkg bundle will be downloaded + type: string + bundleType: + description: BundleType is the type of bundle (e.g. k8s) that needs to be downloaded + type: string + required: + - bundleRepo + - bundleType + type: object + required: + - spec + type: object + required: + - template + type: object + status: + description: K8sInstallerConfigTemplateStatus defines the observed state of K8sInstallerConfigTemplate + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 79439c37f..8301409fe 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -1,4 +1,3 @@ - --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index 2639078b8..42e22911d 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -1,4 +1,3 @@ - --- apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration diff --git a/test/e2e/config/provider.yaml b/test/e2e/config/provider.yaml index 713c1ff2f..82a03c8d4 100644 --- a/test/e2e/config/provider.yaml +++ b/test/e2e/config/provider.yaml @@ -6,20 +6,19 @@ # - docker images: - # Use local dev images built source tree; - - name: gcr.io/k8s-staging-cluster-api/cluster-api-controller-amd64:dev + - name: registry.k8s.io/cluster-api/cluster-api-controller:v1.3.0 loadBehavior: tryLoad - - name: gcr.io/k8s-staging-cluster-api/kubeadm-bootstrap-controller-amd64:dev + - name: registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:v1.3.0 loadBehavior: tryLoad - - name: gcr.io/k8s-staging-cluster-api/kubeadm-control-plane-controller-amd64:dev + - name: registry.k8s.io/cluster-api/kubeadm-control-plane-controller:v1.3.0 loadBehavior: tryLoad - name: gcr.io/k8s-staging-cluster-api/cluster-api-byoh-controller:dev + loadBehavior: mustLoad + - name: quay.io/jetstack/cert-manager-cainjector:v1.10.0 loadBehavior: tryLoad - - name: quay.io/jetstack/cert-manager-cainjector:v1.1.0 + - name: quay.io/jetstack/cert-manager-webhook:v1.10.0 loadBehavior: tryLoad - - name: quay.io/jetstack/cert-manager-webhook:v1.1.0 - loadBehavior: tryLoad - - name: quay.io/jetstack/cert-manager-controller:v1.1.0 + - name: quay.io/jetstack/cert-manager-controller:v1.10.0 loadBehavior: tryLoad providers: