From 169a4dd285415b860cc56d6eeb6185ef8e7d22a8 Mon Sep 17 00:00:00 2001 From: Christoph Mewes Date: Mon, 18 Mar 2024 13:09:15 +0100 Subject: [PATCH] update CRDs, fix containerizing --- ...manager.k8c.io_operatingsystemconfigs.yaml | 43 +++++----- ...anager.k8c.io_operatingsystemprofiles.yaml | 81 ++++++++++--------- ....k8c.io_customoperatingsystemprofiles.yaml | 53 +++++++++--- hack/lib.sh | 5 +- hack/update-codegen.sh | 2 +- hack/update-crds-openapi.sh | 2 +- hack/verify-licenses.sh | 2 +- 7 files changed, 113 insertions(+), 75 deletions(-) diff --git a/deploy/crd/operatingsystemmanager.k8c.io_operatingsystemconfigs.yaml b/deploy/crd/operatingsystemmanager.k8c.io_operatingsystemconfigs.yaml index 16a17b73..8f2d8ad4 100644 --- a/deploy/crd/operatingsystemmanager.k8c.io_operatingsystemconfigs.yaml +++ b/deploy/crd/operatingsystemmanager.k8c.io_operatingsystemconfigs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: operatingsystemconfigs.operatingsystemmanager.k8c.io spec: group: operatingsystemmanager.k8c.io @@ -22,14 +22,19 @@ spec: description: OperatingSystemConfig is the object that represents the OperatingSystemConfig 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' + 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' + 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 @@ -46,9 +51,9 @@ spec: description: Files is a list of files that should exist in the instance items: - description: File is a file that should get written to the host's - file system. The content can either be inlined or referenced - from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -74,9 +79,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions - the file should get written to the file system. Should - be in decimal base and without any leading zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: @@ -225,9 +230,9 @@ spec: description: Files is a list of files that should exist in the instance items: - description: File is a file that should get written to the host's - file system. The content can either be inlined or referenced - from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -253,9 +258,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions - the file should get written to the file system. Should - be in decimal base and without any leading zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: diff --git a/deploy/crd/operatingsystemmanager.k8c.io_operatingsystemprofiles.yaml b/deploy/crd/operatingsystemmanager.k8c.io_operatingsystemprofiles.yaml index fb4641e2..2cc52c09 100644 --- a/deploy/crd/operatingsystemmanager.k8c.io_operatingsystemprofiles.yaml +++ b/deploy/crd/operatingsystemmanager.k8c.io_operatingsystemprofiles.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.13.0 + controller-gen.kubebuilder.io/version: v0.14.0 name: operatingsystemprofiles.operatingsystemmanager.k8c.io spec: group: operatingsystemmanager.k8c.io @@ -22,14 +22,19 @@ spec: description: OperatingSystemProfile is the object that represents the OperatingSystemProfile 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' + 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' + 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 @@ -46,9 +51,9 @@ spec: description: Files is a list of files that should exist in the instance items: - description: File is a file that should get written to the host's - file system. The content can either be inlined or referenced - from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -74,9 +79,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions - the file should get written to the file system. Should - be in decimal base and without any leading zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: @@ -121,9 +126,9 @@ spec: type: object type: object supportedContainerRuntimes: - description: SupportedContainerRuntimes represents the container - runtimes supported by the given OS. Docker has been deprecated - and is no-op. + description: |- + SupportedContainerRuntimes represents the container runtimes supported by the given OS. + Docker has been deprecated and is no-op. items: description: ContainerRuntimeSpec aggregates information about a specific container runtime @@ -132,9 +137,9 @@ spec: description: Files to add to the main files list when the containerRuntime is selected items: - description: File is a file that should get written to - the host's file system. The content can either be inlined - or referenced from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -160,10 +165,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions - the file should get written to the file system. - Should be in decimal base and without any leading - zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: @@ -257,9 +261,9 @@ spec: description: Files is a list of files that should exist in the instance items: - description: File is a file that should get written to the host's - file system. The content can either be inlined or referenced - from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -285,9 +289,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions - the file should get written to the file system. Should - be in decimal base and without any leading zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: @@ -332,9 +336,9 @@ spec: type: object type: object supportedContainerRuntimes: - description: SupportedContainerRuntimes represents the container - runtimes supported by the given OS. Docker has been deprecated - and is no-op. + description: |- + SupportedContainerRuntimes represents the container runtimes supported by the given OS. + Docker has been deprecated and is no-op. items: description: ContainerRuntimeSpec aggregates information about a specific container runtime @@ -343,9 +347,9 @@ spec: description: Files to add to the main files list when the containerRuntime is selected items: - description: File is a file that should get written to - the host's file system. The content can either be inlined - or referenced from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -371,10 +375,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions - the file should get written to the file system. - Should be in decimal base and without any leading - zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: diff --git a/hack/kkp/operatingsystemmanager.k8c.io_customoperatingsystemprofiles.yaml b/hack/kkp/operatingsystemmanager.k8c.io_customoperatingsystemprofiles.yaml index 0c43e268..55468ae1 100644 --- a/hack/kkp/operatingsystemmanager.k8c.io_customoperatingsystemprofiles.yaml +++ b/hack/kkp/operatingsystemmanager.k8c.io_customoperatingsystemprofiles.yaml @@ -37,10 +37,19 @@ spec: description: OperatingSystemProfile is the object that represents the OperatingSystemProfile 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' + 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' + 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 @@ -53,7 +62,9 @@ spec: files: description: Files is a list of files that should exist in the instance items: - description: File is a file that should get written to the host's file system. The content can either be inlined or referenced from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -76,7 +87,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions the file should get written to the file system. Should be in decimal base and without any leading zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: @@ -114,14 +127,18 @@ spec: type: object type: object supportedContainerRuntimes: - description: SupportedContainerRuntimes represents the container runtimes supported by the given OS. Docker has been deprecated and is no-op. + description: |- + SupportedContainerRuntimes represents the container runtimes supported by the given OS. + Docker has been deprecated and is no-op. items: description: ContainerRuntimeSpec aggregates information about a specific container runtime properties: files: description: Files to add to the main files list when the containerRuntime is selected items: - description: File is a file that should get written to the host's file system. The content can either be inlined or referenced from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -144,7 +161,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions the file should get written to the file system. Should be in decimal base and without any leading zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: @@ -230,7 +249,9 @@ spec: files: description: Files is a list of files that should exist in the instance items: - description: File is a file that should get written to the host's file system. The content can either be inlined or referenced from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -253,7 +274,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions the file should get written to the file system. Should be in decimal base and without any leading zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: @@ -291,14 +314,18 @@ spec: type: object type: object supportedContainerRuntimes: - description: SupportedContainerRuntimes represents the container runtimes supported by the given OS. Docker has been deprecated and is no-op. + description: |- + SupportedContainerRuntimes represents the container runtimes supported by the given OS. + Docker has been deprecated and is no-op. items: description: ContainerRuntimeSpec aggregates information about a specific container runtime properties: files: description: Files to add to the main files list when the containerRuntime is selected items: - description: File is a file that should get written to the host's file system. The content can either be inlined or referenced from a secret in the same namespace. + description: |- + File is a file that should get written to the host's file system. The content can either be inlined or + referenced from a secret in the same namespace. properties: content: description: Content describe the file's content. @@ -321,7 +348,9 @@ spec: type: string permissions: default: 644 - description: Permissions describes with which permissions the file should get written to the file system. Should be in decimal base and without any leading zeroes. + description: |- + Permissions describes with which permissions the file should get written to the file system. + Should be in decimal base and without any leading zeroes. format: int32 type: integer required: diff --git a/hack/lib.sh b/hack/lib.sh index d7c10862..647d51fd 100755 --- a/hack/lib.sh +++ b/hack/lib.sh @@ -123,12 +123,13 @@ containerize() { mkdir -p "$gomodcache" exec docker run \ - -v "$PWD":/go/src/k8c.io/kubermatic \ + -v "$PWD":/go/src/k8c.io/operating-system-manager \ -v "$gocache":"$gocache" \ -v "$gomodcache":"$gomodcache" \ - -w /go/src/k8c.io/kubermatic \ + -w /go/src/k8c.io/operating-system-manager \ -e "GOCACHE=$gocache" \ -e "GOMODCACHE=$gomodcache" \ + -e "CONTAINERIZED=1" \ -u "$(id -u):$(id -g)" \ --entrypoint="$cmd" \ --rm \ diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index a06b0bca..fecfece5 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -19,7 +19,7 @@ set -euo pipefail cd $(dirname $0)/.. source hack/lib.sh -CONTAINERIZE_IMAGE=golang:1.22.1 containerize ./hack/update-codegen.sh +CONTAINERIZE_IMAGE=quay.io/kubermatic/build:go-1.22-node-18-5 containerize ./hack/update-codegen.sh SCRIPT_ROOT=$(dirname "${BASH_SOURCE}") sed="sed" diff --git a/hack/update-crds-openapi.sh b/hack/update-crds-openapi.sh index 358f164c..ae7639a2 100755 --- a/hack/update-crds-openapi.sh +++ b/hack/update-crds-openapi.sh @@ -19,7 +19,7 @@ set -euo pipefail cd $(dirname $0)/.. source hack/lib.sh -CONTAINERIZE_IMAGE=golang:1.22.1 containerize ./hack/update-crds-openapi.sh +CONTAINERIZE_IMAGE=quay.io/kubermatic/build:go-1.22-node-18-5 containerize ./hack/update-crds-openapi.sh SCRIPT_ROOT=$(dirname "${BASH_SOURCE}") echodate "Creating vendor directory" diff --git a/hack/verify-licenses.sh b/hack/verify-licenses.sh index 7d8091aa..73d43bdd 100755 --- a/hack/verify-licenses.sh +++ b/hack/verify-licenses.sh @@ -19,7 +19,7 @@ set -euo pipefail cd $(dirname $0)/.. source hack/lib.sh -CONTAINERIZE_IMAGE=quay.io/kubermatic/build:go-1.22-node-18-kind-0.22-5 containerize ./hack/verify-licenses.sh +CONTAINERIZE_IMAGE=quay.io/kubermatic/build:go-1.22-node-18-5 containerize ./hack/verify-licenses.sh go mod vendor