From 9d07ba817e3c3d69afdb97d0595c271622afa825 Mon Sep 17 00:00:00 2001 From: kranurag7 Date: Tue, 6 Feb 2024 14:40:26 +0530 Subject: [PATCH 1/9] use local_mode with cspo Signed-off-by: kranurag7 --- Tiltfile | 71 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 23 deletions(-) diff --git a/Tiltfile b/Tiltfile index 39b2f9e9..e0142fa4 100644 --- a/Tiltfile +++ b/Tiltfile @@ -17,10 +17,11 @@ settings = { "allowed_contexts": [ "kind-cspo", ], + "local_mode": True, "deploy_cert_manager": True, "preload_images_for_kind": True, "kind_cluster_name": "cspo", - "capi_version": "v1.5.2", + "capi_version": "v1.6.0", "cso_version": "v0.1.0-alpha.2", "capo_version": "v0.8.0", "cert_manager_version": "v1.13.1", @@ -29,8 +30,8 @@ settings = { } # global settings -settings.update(read_json( - "tilt-settings.json", +settings.update(read_yaml( + "tilt-settings.yaml", default = {}, )) @@ -124,14 +125,25 @@ def fixup_yaml_empty_arrays(yaml_str): return yaml_str.replace("storedVersions: null", "storedVersions: []") ## This should have the same versions as the Dockerfile -tilt_dockerfile_header_cspo = """ -FROM docker.io/alpine/helm:3.12.2 as helm - -FROM docker.io/library/alpine:3.18.0 as tilt -WORKDIR / -COPY --from=helm --chown=root:root --chmod=755 /usr/bin/helm /usr/local/bin/helm -COPY manager . -""" +if settings.get("local_mode"): + tilt_dockerfile_header_cspo = """ + FROM docker.io/alpine/helm:3.12.2 as helm + + FROM docker.io/library/alpine:3.18.0 as tilt + WORKDIR / + COPY --from=helm --chown=root:root --chmod=755 /usr/bin/helm /usr/local/bin/helm + COPY .tiltbuild/manager . + COPY .release/ /tmp/cluster-stacks/ + """ +else: + tilt_dockerfile_header_cspo = """ + FROM docker.io/alpine/helm:3.12.2 as helm + + FROM docker.io/library/alpine:3.18.0 as tilt + WORKDIR / + COPY --from=helm --chown=root:root --chmod=755 /usr/bin/helm /usr/local/bin/helm + COPY manager . + """ # Build cspo and add feature gates @@ -166,18 +178,31 @@ def deploy_cspo(): # Set up an image build for the provider. The live update configuration syncs the output from the local_resource # build into the container. - docker_build_with_restart( - ref = "ghcr.io/sovereigncloudstack/cspo-staging", - context = "./.tiltbuild/", - dockerfile_contents = tilt_dockerfile_header_cspo, - target = "tilt", - entrypoint = entrypoint, - only = "manager", - live_update = [ - sync(".tiltbuild/manager", "/manager"), - ], - ignore = ["templates"], - ) + if settings.get("local_mode"): + docker_build_with_restart( + ref = "ghcr.io/sovereigncloudstack/cspo-staging", + context = ".", + dockerfile_contents = tilt_dockerfile_header_cspo, + target = "tilt", + entrypoint = entrypoint, + live_update = [ + sync(".tiltbuild/manager", "/manager"), + sync(".release", "/tmp/cluster-stacks"), + ], + ignore = ["templates"], + ) + else: + docker_build_with_restart( + ref = "ghcr.io/sovereigncloudstack/cspo-staging", + context = "./.tiltbuild/", + dockerfile_contents = tilt_dockerfile_header_cspo, + target = "tilt", + entrypoint = entrypoint, + live_update = [ + sync(".tiltbuild/manager", "/manager"), + ], + ignore = ["templates"], + ) k8s_yaml(blob(yaml)) k8s_resource(workload = "cspo-controller-manager", labels = ["cspo"]) k8s_resource( From f6f9d7a032de3d639ccf566bddead87f797dd57b Mon Sep 17 00:00:00 2001 From: kranurag7 Date: Tue, 6 Feb 2024 14:51:42 +0530 Subject: [PATCH 2/9] change copy target to /tmp/downloads Signed-off-by: kranurag7 --- Tiltfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tiltfile b/Tiltfile index e0142fa4..89087049 100644 --- a/Tiltfile +++ b/Tiltfile @@ -133,7 +133,7 @@ if settings.get("local_mode"): WORKDIR / COPY --from=helm --chown=root:root --chmod=755 /usr/bin/helm /usr/local/bin/helm COPY .tiltbuild/manager . - COPY .release/ /tmp/cluster-stacks/ + COPY .release/ /tmp/downloads/cluster-stacks/ """ else: tilt_dockerfile_header_cspo = """ From 5606f6ec698f26af1c25a4a974761e051d9eb33b Mon Sep 17 00:00:00 2001 From: kranurag7 <81210977+kranurag7@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:00:01 +0530 Subject: [PATCH 3/9] Update Tiltfile Co-authored-by: Roman Hros Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com> --- Tiltfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tiltfile b/Tiltfile index 89087049..547a018d 100644 --- a/Tiltfile +++ b/Tiltfile @@ -187,7 +187,7 @@ def deploy_cspo(): entrypoint = entrypoint, live_update = [ sync(".tiltbuild/manager", "/manager"), - sync(".release", "/tmp/cluster-stacks"), + sync(".release", "/tmp/downloads/cluster-stacks"), ], ignore = ["templates"], ) From f2bdaf3ac72ac51e5079f78fa08231ece2472007 Mon Sep 17 00:00:00 2001 From: kranurag7 Date: Tue, 6 Feb 2024 17:18:15 +0530 Subject: [PATCH 4/9] add docs and update gitignore Signed-off-by: kranurag7 --- .gitignore | 7 ++++++- docs/develop.md | 39 ++++++++++++++++++++++++++++++++++++++ tilt-settings.yaml.example | 11 +++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 tilt-settings.yaml.example diff --git a/.gitignore b/.gitignore index 9908a07d..697782a7 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,7 @@ temp # Tilt files. .tiltbuild /tilt.d -tilt-settings.json +tilt-settings.yaml tilt_config.json baremetalhosts.yaml @@ -70,3 +70,8 @@ __pycache__/ /_output tmp_* +.cluster.yaml +.clusterstack.yaml +.cspotemplate.yaml +.secret.yaml +.release \ No newline at end of file diff --git a/docs/develop.md b/docs/develop.md index 2dd3218f..9bfcee3b 100644 --- a/docs/develop.md +++ b/docs/develop.md @@ -50,3 +50,42 @@ make delete-bootstrap-cluster ``` If you have any trouble finding the right command, then you can use `make help` to get a list of all available make targets. + +## Toggle between local_mode and remote mode +We can retrieve cluster-stacks in two modes. One way is to let the controller fetch it from GitHub which is remote mode and other is we mount the cluster-stacks inside the container and start the controller with appropriate flag. + +> [!NOTE] +> Using remote mode is the default behavior. + +Switching between both modes is relatively simple if you're using Tilt. There is a file at the root of the repo `tilt-settings.yaml.example` +Make a copy of that file with the name of `tilt-settings.yaml` +```bash +cp tilt-settings.yaml.example tilt-settings.yaml +``` +Now, open the file and set the `local_mode` to `true` to use cluster-stacks in local_mode. It should look the following content wise. +```yaml +local_mode: true +``` + +> [!NOTE] +> In this mode you need to have cluster-stacks present locally. + +Downloading cluster-stacks can be achieved by many ways but below is a simple way to download it quickly. +```bash +mkdir -p .release/openstack-scs-1-27-v1/ +cd .release/openstack-scs-1-27-v1 +gh release download --repo sovereigncloudstack/cluster-stacks openstack-scs-1-27-v1 +``` +Change the repo and tag as per the requirement. You can also download it directly from browser and move it to `.release` directory. + +Please make sure the directory structure remains the same otherwise you'll not be able to start the tilt setup. Here's an example of structuring `openstack-scs-1-27-v1` cluster-stack. +```bash +$ tree .release/openstack-scs-1-27-v1/ +.release/openstack-scs-1-27-v1/ +├── clusterstack.yaml +├── metadata.yaml +└── openstack-scs-1-27-cluster-class-v1.tgz +``` + +> [!IMPORTANT] +There's an alternative way to get clusterstacks using [csmctl](https://github.com/sovereigncloudstack/csmctl). You can follow the README of csmctl for specific instructions and a good quickstart. diff --git a/tilt-settings.yaml.example b/tilt-settings.yaml.example new file mode 100644 index 00000000..1ca36e89 --- /dev/null +++ b/tilt-settings.yaml.example @@ -0,0 +1,11 @@ +--- +allowed_contexts: +- kind-cspo +local_mode: false +deploy_cert_manager: true +preload_images_for_kind: true +kind_cluster_name: cspo +capi_version: v1.6.0 +cso_version: v0.1.0-alpha.2 +capo_version: v0.8.0 +cert_manager_version: v1.13.1 \ No newline at end of file From b7f50e19d0a032b3c28519388f74ee912086d04a Mon Sep 17 00:00:00 2001 From: kranurag7 Date: Tue, 6 Feb 2024 19:10:07 +0530 Subject: [PATCH 5/9] implement docs feedback Signed-off-by: kranurag7 --- docs/develop.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/develop.md b/docs/develop.md index 9bfcee3b..56aa1799 100644 --- a/docs/develop.md +++ b/docs/develop.md @@ -52,7 +52,7 @@ make delete-bootstrap-cluster If you have any trouble finding the right command, then you can use `make help` to get a list of all available make targets. ## Toggle between local_mode and remote mode -We can retrieve cluster-stacks in two modes. One way is to let the controller fetch it from GitHub which is remote mode and other is we mount the cluster-stacks inside the container and start the controller with appropriate flag. +We can retrieve cluster-stacks in two modes. One way is to let the controller fetch it from GitHub which is remote mode and other is we mount the cluster-stacks inside the container at `/tmp/downloads/cluster-stacks` directory. > [!NOTE] > Using remote mode is the default behavior. @@ -89,3 +89,5 @@ $ tree .release/openstack-scs-1-27-v1/ > [!IMPORTANT] There's an alternative way to get clusterstacks using [csmctl](https://github.com/sovereigncloudstack/csmctl). You can follow the README of csmctl for specific instructions and a good quickstart. + +You can use `csmctl create` subcommand to create clusterstack locally. You'll need a csmctl.yaml file in the cluster-stack configuration directory. Please read more about creating configuration file for csmctl in the csmctl docs. From c236395dbe3e2f617c2064e4d7617697b7990bda Mon Sep 17 00:00:00 2001 From: kranurag7 Date: Wed, 7 Feb 2024 16:40:33 +0530 Subject: [PATCH 6/9] mark local_mode to false in Tiltfile Signed-off-by: kranurag7 --- Tiltfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tiltfile b/Tiltfile index 547a018d..1a0a1622 100644 --- a/Tiltfile +++ b/Tiltfile @@ -17,7 +17,7 @@ settings = { "allowed_contexts": [ "kind-cspo", ], - "local_mode": True, + "local_mode": False, "deploy_cert_manager": True, "preload_images_for_kind": True, "kind_cluster_name": "cspo", From 807ffa7f9b555a96b1cb150f580ef89be28f1e9b Mon Sep 17 00:00:00 2001 From: kranurag7 Date: Fri, 9 Feb 2024 13:36:24 +0530 Subject: [PATCH 7/9] move cso deployment along with cspo in the repo Signed-off-by: kranurag7 --- Tiltfile | 86 +++- cso-components.yaml | 1095 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1177 insertions(+), 4 deletions(-) create mode 100644 cso-components.yaml diff --git a/Tiltfile b/Tiltfile index 1a0a1622..c2c1afea 100644 --- a/Tiltfile +++ b/Tiltfile @@ -62,11 +62,89 @@ def deploy_capi(): if kb_extra_args: patch_args_with_extra_args("capi-kubeadm-bootstrap-system", "capi-kubeadm-bootstrap-controller-manager", kb_extra_args) +## This should have the same versions as the Dockerfile +if settings.get("local_mode"): + tilt_dockerfile_header_cso = """ + FROM ghcr.io/sovereigncloudstack/cso:v0.1.0-alpha.2 as builder + + FROM docker.io/library/alpine:3.18.0 as tilt + WORKDIR / + COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm + COPY --from=builder /manager /manager + COPY .release/ /tmp/downloads/cluster-stacks/ + """ +else: + tilt_dockerfile_header_cso = """ + FROM ghcr.io/sovereigncloudstack/cso:v0.1.0-alpha.2 as builder + + FROM docker.io/library/alpine:3.18.0 as tilt + WORKDIR / + COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm + COPY --from=builder /manager /manager + """ + + def deploy_cso(): - version = settings.get("cso_version") - cso_uri = "https://github.com/sovereignCloudStack/cluster-stack-operator/releases/download/{}/cso-infrastructure-components.yaml".format(version) - cmd = "curl -sSL {} | {} | kubectl apply -f -".format(cso_uri, envsubst_cmd) - local(cmd, quiet = True) + # yaml = str(kustomizesub("./hack/observability")) # build an observable kind deployment by default + yaml_cso = './cso-components.yaml' + local_resource( + name = "cso-components", + cmd = ["sh", "-ec", sed_cmd, yaml_cso, "|", envsubst_cmd], + labels = ["CSO"], + ) + + entrypoint = ["/manager"] + extra_args = settings.get("extra_args") + if extra_args: + entrypoint.extend(extra_args) + + # Set up an image build for the provider. The live update configuration syncs the output from the local_resource + # build into the container. + if settings.get("local_mode"): + docker_build_with_restart( + ref = "ghcr.io/sovereigncloudstack/cso-staging", + context = ".", + dockerfile_contents = tilt_dockerfile_header_cso, + target = "tilt", + entrypoint = entrypoint, + live_update = [ + sync(".release", "/tmp/downloads/cluster-stacks"), + ], + ignore = ["templates"], + ) + else: + docker_build_with_restart( + ref = "ghcr.io/sovereigncloudstack/cso-staging", + context = ".", + dockerfile_contents = tilt_dockerfile_header_cso, + target = "tilt", + entrypoint = entrypoint, + live_update = [ + sync("cso-components.yaml", "/cso-components.yaml"), + ], + ignore = ["templates"], + ) + + k8s_yaml(yaml_cso) + k8s_resource(workload = "cso-controller-manager", labels = ["CSO"]) + k8s_resource( + objects = [ + "cso-system:namespace", + "clusteraddons.clusterstack.x-k8s.io:customresourcedefinition", + "clusterstackreleases.clusterstack.x-k8s.io:customresourcedefinition", + "clusterstacks.clusterstack.x-k8s.io:customresourcedefinition", + "cso-controller-manager:serviceaccount", + "cso-leader-election-role:role", + "cso-manager-role:clusterrole", + "cso-leader-election-rolebinding:rolebinding", + "cso-manager-rolebinding:clusterrolebinding", + "cso-serving-cert:certificate", + "cso-selfsigned-issuer:issuer", + "cso-validating-webhook-configuration:validatingwebhookconfiguration", + ], + new_name = "cso-misc", + labels = ["CSO"], + ) def deploy_capo(): version = settings.get("capo_version") diff --git a/cso-components.yaml b/cso-components.yaml new file mode 100644 index 00000000..075987af --- /dev/null +++ b/cso-components.yaml @@ -0,0 +1,1095 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + control-plane: cso-controller-manager + name: cso-system +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + cluster.x-k8s.io/v1beta1: v1beta1 + name: clusteraddons.clusterstack.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: cso-webhook-service + namespace: cso-system + path: /convert + conversionReviewVersions: + - v1 + group: clusterstack.x-k8s.io + names: + kind: ClusterAddon + listKind: ClusterAddonList + plural: clusteraddons + singular: clusteraddon + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.ownerReferences[?(@.kind=="Cluster")].name + name: Cluster + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + - description: Time duration since creation of Cluster Addon + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Reason + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterAddon is the schema for the clusteraddons 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: ClusterAddonSpec defines the desired state of a ClusterAddon + object. + properties: + clusterRef: + description: ClusterRef is the reference to the clusterv1.Cluster + object that corresponds to the workload cluster where this controller + applies the cluster addons. + 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 + clusterStack: + description: ClusterStack is the full string --- that will be filled with the cluster stack that + the respective cluster uses currently. It always matches cluster.spec.topology.class + if the work of this controller is done. + type: string + version: + description: Version is the version of the cluster addons that have + been applied in the workload cluster. + type: string + required: + - clusterRef + type: object + status: + description: ClusterAddonStatus defines the observed state of ClusterAddon. + properties: + conditions: + description: Conditions define the current service state of the ClusterAddon. + 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 + ready: + default: false + type: boolean + resources: + description: Resources specifies the status of the resources that + this object administrates. + items: + description: Resource defines the status of a resource. + properties: + error: + description: Error specifies the error of the last time this + object has been applied. + type: string + group: + description: Group specifies the group of the object. + type: string + kind: + description: Kind specifies the kind of the object. + type: string + name: + description: Name specifies the name of the object. + type: string + namespace: + description: Namespace specifies the namespace of the object. + type: string + status: + description: Status specifies the status of the object being + applied. + type: string + version: + description: Version specifies the version of the object. + type: string + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + cluster.x-k8s.io/v1beta1: v1beta1 + name: clusterstackreleases.clusterstack.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: cso-webhook-service + namespace: cso-system + path: /convert + conversionReviewVersions: + - v1 + group: clusterstack.x-k8s.io + names: + kind: ClusterStackRelease + listKind: ClusterStackReleaseList + plural: clusterstackreleases + singular: clusterstackrelease + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.kubernetesVersion + name: K8s Version + type: string + - jsonPath: .status.ready + name: Ready + type: boolean + - description: Time duration since creation of ClusterStackRelease + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Reason + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterStackRelease is the Schema for the clusterstackreleases + 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: ClusterStackReleaseSpec defines the desired state of ClusterStackRelease. + properties: + providerRef: + description: ProviderRef specifies the reference to the ProviderClusterStackRelease + object. It has to be set only if the object exists, i.e. if the + noProvider mode is turned off. + 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 + type: object + status: + description: ClusterStackReleaseStatus defines the observed state of ClusterStackRelease. + properties: + conditions: + description: Conditions defines current service state of the ClusterAddon. + 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 + kubernetesVersion: + description: KubernetesVersion is the Kubernetes version incl. patch + version, e.g. 1.26.6. The controller fetches the version from the + release assets of the cluster stack. + type: string + ready: + default: false + type: boolean + resources: + description: Resources specifies the status of the resources that + this object administrates. + items: + description: Resource defines the status of a resource. + properties: + error: + description: Error specifies the error of the last time this + object has been applied. + type: string + group: + description: Group specifies the group of the object. + type: string + kind: + description: Kind specifies the kind of the object. + type: string + name: + description: Name specifies the name of the object. + type: string + namespace: + description: Namespace specifies the namespace of the object. + type: string + status: + description: Status specifies the status of the object being + applied. + type: string + version: + description: Version specifies the version of the object. + type: string + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME + controller-gen.kubebuilder.io/version: v0.12.0 + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + cluster.x-k8s.io/v1beta1: v1beta1 + name: clusterstacks.clusterstack.x-k8s.io +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + name: cso-webhook-service + namespace: cso-system + path: /convert + conversionReviewVersions: + - v1 + group: clusterstack.x-k8s.io + names: + kind: ClusterStack + listKind: ClusterStackList + plural: clusterstacks + singular: clusterstack + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.provider + name: Provider + type: string + - jsonPath: .spec.name + name: ClusterStack + type: string + - jsonPath: .spec.kubernetesVersion + name: K8s + type: string + - jsonPath: .spec.channel + name: Channel + type: string + - jsonPath: .spec.autoSubscribe + name: Autosubscribe + type: string + - jsonPath: .status.usableVersions + name: Usable + type: string + - jsonPath: .status.latestRelease + name: Latest + type: string + - description: Time duration since creation of ClusterStack + jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Reason + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].message + name: Message + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterStack is the Schema for the clusterstacks 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: ClusterStackSpec defines the desired state of ClusterStack. + properties: + autoSubscribe: + default: true + description: AutoSubscribe is a feature where the operator checks + automatically if there are new versions of this cluster stack available. + type: boolean + channel: + default: stable + description: Channel specifies the release channel of the cluster + stack. Defaults to 'stable'. + type: string + kubernetesVersion: + description: KubernetesVersion is the Kubernetes version in the format + '.', e.g. 1.26. + pattern: ^\d\.\d+$ + type: string + name: + description: Name is the name of the cluster stack. + minLength: 1 + type: string + noProvider: + default: false + description: NoProvider indicates if set on true that there is no + provider-specific implementation and operator. + type: boolean + provider: + description: Provider is the name of the cluster stack provider. + minLength: 1 + type: string + providerRef: + description: ProviderRef has to reference the ProviderClusterStackReleaseTemplate + that contains all provider-specific information. + 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 + versions: + description: Versions is a list of version of the cluster stack that + should be available in the management cluster. A version has to + have the format 'v', e.g. v1 for stable channel or, + v1-alpha.1 for alpha channel. The versions have to correspond to + the channel property. + items: + type: string + type: array + required: + - kubernetesVersion + - name + - provider + type: object + status: + description: ClusterStackStatus defines the observed state of ClusterStack. + properties: + conditions: + description: Conditions provide observations of the operational state + of a Cluster API resource. + 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 + latestRelease: + type: string + summary: + items: + description: ClusterStackReleaseSummary gives the summary of the + status of a ClusterStackRelease object. + properties: + message: + type: string + name: + type: string + phase: + description: ClusterStackReleasePhase is the phase of a ClusterStackRelease + object. + type: string + ready: + type: boolean + required: + - name + - phase + - ready + type: object + type: array + usableVersions: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + name: cso-controller-manager + namespace: cso-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + name: cso-leader-election-role + namespace: cso-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + name: cso-manager-role +rules: +- apiGroups: + - "" + resources: + - events + verbs: + - create + - get + - list + - patch + - update + - watch +- apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - update + - watch +- apiGroups: + - bootstrap.cluster.x-k8s.io + - cluster.x-k8s.io + - controlplane.cluster.x-k8s.io + - infrastructure.cluster.x-k8s.io + resources: + - '*' + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - cluster.x-k8s.io + resources: + - clusters + verbs: + - get +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusteraddons + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusteraddons/finalizers + verbs: + - update +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusteraddons/status + verbs: + - get + - patch + - update +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusterreconcilers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusterreconcilers/finalizers + verbs: + - update +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusterreconcilers/status + verbs: + - get + - patch + - update +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusterstackreleases + verbs: + - create + - delete + - get + - list + - patch + - watch +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusterstackreleases/finalizers + verbs: + - update +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusterstackreleases/status + verbs: + - get + - patch + - update +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusterstacks + verbs: + - get + - list + - patch + - update + - watch +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusterstacks/finalizers + verbs: + - delete + - update +- apiGroups: + - clusterstack.x-k8s.io + resources: + - clusterstacks/status + verbs: + - get + - patch + - update +- apiGroups: + - infrastructure.clusterstack.x-k8s.io + resources: + - '*' + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + name: cso-leader-election-rolebinding + namespace: cso-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: cso-leader-election-role +subjects: +- kind: ServiceAccount + name: cso-controller-manager + namespace: cso-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + name: cso-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cso-manager-role +subjects: +- kind: ServiceAccount + name: cso-controller-manager + namespace: cso-system +--- +apiVersion: v1 +kind: Service +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + name: cso-webhook-service + namespace: cso-system +spec: + ports: + - port: 443 + targetPort: 9443 + selector: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + control-plane: cso-controller-manager +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + control-plane: cso-controller-manager + name: cso-controller-manager + namespace: cso-system +spec: + replicas: 1 + selector: + matchLabels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + control-plane: cso-controller-manager + template: + metadata: + annotations: + kubectl.kubernetes.io/default-container: manager + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + control-plane: cso-controller-manager + spec: + containers: + - args: + - --leader-elect=true + command: + - /manager + env: + image: ghcr.io/sovereigncloudstack/cso-staging:dev + imagePullPolicy: Always + livenessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: healthz + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + name: manager + ports: + - containerPort: 9443 + name: webhook-server + protocol: TCP + - containerPort: 9440 + name: healthz + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: /readyz + port: healthz + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + cpu: 450m + memory: 350Mi + requests: + cpu: 200m + memory: 250Mi + volumeMounts: + - mountPath: /tmp/k8s-webhook-server/serving-certs + name: cert + readOnly: true + serviceAccountName: cso-controller-manager + terminationGracePeriodSeconds: 10 + tolerations: + - effect: NoSchedule + key: node-role.kubernetes.io/control-plane + volumes: + - name: cert + secret: + defaultMode: 420 + secretName: cso-webhook-server-cert +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + name: cso-serving-cert + namespace: cso-system +spec: + dnsNames: + - cso-webhook-service.cso-system.svc + - cso-webhook-service.cso-system.svc.cluster.local + issuerRef: + kind: Issuer + name: cso-selfsigned-issuer + secretName: cso-webhook-server-cert + subject: + organizations: + - k8s-sig-cluster-lifecycle +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + name: cso-selfsigned-issuer + namespace: cso-system +spec: + selfSigned: {} +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingWebhookConfiguration +metadata: + annotations: + cert-manager.io/inject-ca-from: cso-system/cso-serving-cert + labels: + cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator + name: cso-validating-webhook-configuration +webhooks: +- admissionReviewVersions: + - v1 + - v1beta1 + clientConfig: + service: + name: cso-webhook-service + namespace: cso-system + path: /validate-cluster-x-k8s-io-v1beta1-cluster + failurePolicy: Fail + name: validation.cluster.cluster.x-k8s.io + rules: + - apiGroups: + - cluster.x-k8s.io + apiVersions: + - v1beta1 + operations: + - CREATE + - UPDATE + resources: + - clusters + sideEffects: None +- admissionReviewVersions: + - v1 + - v1alpha1 + clientConfig: + service: + name: cso-webhook-service + namespace: cso-system + path: /validate-clusterstack-x-k8s-io-v1alpha1-clusteraddon + failurePolicy: Fail + name: validation.clusteraddon.clusterstack.x-k8s.io + rules: + - apiGroups: + - clusterstack.x-k8s.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - clusteraddons + sideEffects: None +- admissionReviewVersions: + - v1 + - v1alpha1 + clientConfig: + service: + name: cso-webhook-service + namespace: cso-system + path: /validate-clusterstack-x-k8s-io-v1alpha1-clusterstack + failurePolicy: Fail + name: validation.clusterstack.clusterstack.x-k8s.io + rules: + - apiGroups: + - clusterstack.x-k8s.io + apiVersions: + - v1alpha1 + operations: + - CREATE + - UPDATE + resources: + - clusterstacks + sideEffects: None From a5b406da9d1e79bc520d89b3faeb240b3832b382 Mon Sep 17 00:00:00 2001 From: kranurag7 Date: Sat, 10 Feb 2024 04:37:10 +0530 Subject: [PATCH 8/9] address requested changes and more Signed-off-by: kranurag7 --- .envrc.sample | 2 +- Tiltfile | 45 +- config/cspo/cluster.yaml | 2 +- config/cspo/clusterstack.yaml | 4 +- cso-components.yaml | 1095 --------------------------------- 5 files changed, 9 insertions(+), 1139 deletions(-) delete mode 100644 cso-components.yaml diff --git a/.envrc.sample b/.envrc.sample index 8e66c3aa..8a45adb0 100644 --- a/.envrc.sample +++ b/.envrc.sample @@ -11,4 +11,4 @@ export EXP_MACHINE_SET_PREFLIGHT_CHECKS=true export CLUSTER_NAME=test-dfkhje export SECRET_NAME=supersecret export CLOUD_NAME=test -export ENCODED_CLOUDS_YAML=mybase64encodedcloudsyamlfile +export ENCODED_CLOUDS_YAML=bXliYXNlNjRlbmNvZGVkY2xvdWRzeWFtbGZpbGUK \ No newline at end of file diff --git a/Tiltfile b/Tiltfile index c2c1afea..256c7200 100644 --- a/Tiltfile +++ b/Tiltfile @@ -86,12 +86,10 @@ else: def deploy_cso(): # yaml = str(kustomizesub("./hack/observability")) # build an observable kind deployment by default - yaml_cso = './cso-components.yaml' - local_resource( - name = "cso-components", - cmd = ["sh", "-ec", sed_cmd, yaml_cso, "|", envsubst_cmd], - labels = ["CSO"], - ) + version = settings.get("cso_version") + cso_uri = "https://github.com/sovereignCloudStack/cluster-stack-operator/releases/download/{}/cso-infrastructure-components.yaml".format(version) + cmd = "curl -sSL {} | {} | kubectl apply -f -".format(cso_uri, envsubst_cmd) + yaml_cso = str(local(cmd, quiet = True)) entrypoint = ["/manager"] extra_args = settings.get("extra_args") @@ -102,7 +100,7 @@ def deploy_cso(): # build into the container. if settings.get("local_mode"): docker_build_with_restart( - ref = "ghcr.io/sovereigncloudstack/cso-staging", + ref = "ghcr.io/sovereigncloudstack/cso", context = ".", dockerfile_contents = tilt_dockerfile_header_cso, target = "tilt", @@ -112,39 +110,6 @@ def deploy_cso(): ], ignore = ["templates"], ) - else: - docker_build_with_restart( - ref = "ghcr.io/sovereigncloudstack/cso-staging", - context = ".", - dockerfile_contents = tilt_dockerfile_header_cso, - target = "tilt", - entrypoint = entrypoint, - live_update = [ - sync("cso-components.yaml", "/cso-components.yaml"), - ], - ignore = ["templates"], - ) - - k8s_yaml(yaml_cso) - k8s_resource(workload = "cso-controller-manager", labels = ["CSO"]) - k8s_resource( - objects = [ - "cso-system:namespace", - "clusteraddons.clusterstack.x-k8s.io:customresourcedefinition", - "clusterstackreleases.clusterstack.x-k8s.io:customresourcedefinition", - "clusterstacks.clusterstack.x-k8s.io:customresourcedefinition", - "cso-controller-manager:serviceaccount", - "cso-leader-election-role:role", - "cso-manager-role:clusterrole", - "cso-leader-election-rolebinding:rolebinding", - "cso-manager-rolebinding:clusterrolebinding", - "cso-serving-cert:certificate", - "cso-selfsigned-issuer:issuer", - "cso-validating-webhook-configuration:validatingwebhookconfiguration", - ], - new_name = "cso-misc", - labels = ["CSO"], - ) def deploy_capo(): version = settings.get("capo_version") diff --git a/config/cspo/cluster.yaml b/config/cspo/cluster.yaml index d58f6d7e..93ebe35e 100644 --- a/config/cspo/cluster.yaml +++ b/config/cspo/cluster.yaml @@ -11,7 +11,7 @@ spec: cidrBlocks: ["192.168.0.0/16"] serviceDomain: "cluster.local" topology: - class: openstack-ferrol-1-27-v1 + class: openstack-scs-1-27-v2 controlPlane: metadata: {} replicas: 1 diff --git a/config/cspo/clusterstack.yaml b/config/cspo/clusterstack.yaml index 96a584bc..91879fa9 100644 --- a/config/cspo/clusterstack.yaml +++ b/config/cspo/clusterstack.yaml @@ -5,7 +5,7 @@ metadata: namespace: cluster spec: provider: openstack - name: ferrol + name: scs kubernetesVersion: "1.27" channel: stable autoSubscribe: false @@ -14,4 +14,4 @@ spec: kind: OpenStackClusterStackReleaseTemplate name: cspotemplate versions: - - v1 + - v2 \ No newline at end of file diff --git a/cso-components.yaml b/cso-components.yaml deleted file mode 100644 index 075987af..00000000 --- a/cso-components.yaml +++ /dev/null @@ -1,1095 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - control-plane: cso-controller-manager - name: cso-system ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - cluster.x-k8s.io/v1beta1: v1beta1 - name: clusteraddons.clusterstack.x-k8s.io -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: cso-webhook-service - namespace: cso-system - path: /convert - conversionReviewVersions: - - v1 - group: clusterstack.x-k8s.io - names: - kind: ClusterAddon - listKind: ClusterAddonList - plural: clusteraddons - singular: clusteraddon - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.ownerReferences[?(@.kind=="Cluster")].name - name: Cluster - type: string - - jsonPath: .status.ready - name: Ready - type: boolean - - description: Time duration since creation of Cluster Addon - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.conditions[?(@.type=='Ready')].reason - name: Reason - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].message - name: Message - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterAddon is the schema for the clusteraddons 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: ClusterAddonSpec defines the desired state of a ClusterAddon - object. - properties: - clusterRef: - description: ClusterRef is the reference to the clusterv1.Cluster - object that corresponds to the workload cluster where this controller - applies the cluster addons. - 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 - clusterStack: - description: ClusterStack is the full string --- that will be filled with the cluster stack that - the respective cluster uses currently. It always matches cluster.spec.topology.class - if the work of this controller is done. - type: string - version: - description: Version is the version of the cluster addons that have - been applied in the workload cluster. - type: string - required: - - clusterRef - type: object - status: - description: ClusterAddonStatus defines the observed state of ClusterAddon. - properties: - conditions: - description: Conditions define the current service state of the ClusterAddon. - 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 - ready: - default: false - type: boolean - resources: - description: Resources specifies the status of the resources that - this object administrates. - items: - description: Resource defines the status of a resource. - properties: - error: - description: Error specifies the error of the last time this - object has been applied. - type: string - group: - description: Group specifies the group of the object. - type: string - kind: - description: Kind specifies the kind of the object. - type: string - name: - description: Name specifies the name of the object. - type: string - namespace: - description: Namespace specifies the namespace of the object. - type: string - status: - description: Status specifies the status of the object being - applied. - type: string - version: - description: Version specifies the version of the object. - type: string - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - cluster.x-k8s.io/v1beta1: v1beta1 - name: clusterstackreleases.clusterstack.x-k8s.io -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: cso-webhook-service - namespace: cso-system - path: /convert - conversionReviewVersions: - - v1 - group: clusterstack.x-k8s.io - names: - kind: ClusterStackRelease - listKind: ClusterStackReleaseList - plural: clusterstackreleases - singular: clusterstackrelease - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.kubernetesVersion - name: K8s Version - type: string - - jsonPath: .status.ready - name: Ready - type: boolean - - description: Time duration since creation of ClusterStackRelease - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.conditions[?(@.type=='Ready')].reason - name: Reason - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].message - name: Message - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterStackRelease is the Schema for the clusterstackreleases - 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: ClusterStackReleaseSpec defines the desired state of ClusterStackRelease. - properties: - providerRef: - description: ProviderRef specifies the reference to the ProviderClusterStackRelease - object. It has to be set only if the object exists, i.e. if the - noProvider mode is turned off. - 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 - type: object - status: - description: ClusterStackReleaseStatus defines the observed state of ClusterStackRelease. - properties: - conditions: - description: Conditions defines current service state of the ClusterAddon. - 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 - kubernetesVersion: - description: KubernetesVersion is the Kubernetes version incl. patch - version, e.g. 1.26.6. The controller fetches the version from the - release assets of the cluster stack. - type: string - ready: - default: false - type: boolean - resources: - description: Resources specifies the status of the resources that - this object administrates. - items: - description: Resource defines the status of a resource. - properties: - error: - description: Error specifies the error of the last time this - object has been applied. - type: string - group: - description: Group specifies the group of the object. - type: string - kind: - description: Kind specifies the kind of the object. - type: string - name: - description: Name specifies the name of the object. - type: string - namespace: - description: Namespace specifies the namespace of the object. - type: string - status: - description: Status specifies the status of the object being - applied. - type: string - version: - description: Version specifies the version of the object. - type: string - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - controller-gen.kubebuilder.io/version: v0.12.0 - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - cluster.x-k8s.io/v1beta1: v1beta1 - name: clusterstacks.clusterstack.x-k8s.io -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: cso-webhook-service - namespace: cso-system - path: /convert - conversionReviewVersions: - - v1 - group: clusterstack.x-k8s.io - names: - kind: ClusterStack - listKind: ClusterStackList - plural: clusterstacks - singular: clusterstack - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .spec.provider - name: Provider - type: string - - jsonPath: .spec.name - name: ClusterStack - type: string - - jsonPath: .spec.kubernetesVersion - name: K8s - type: string - - jsonPath: .spec.channel - name: Channel - type: string - - jsonPath: .spec.autoSubscribe - name: Autosubscribe - type: string - - jsonPath: .status.usableVersions - name: Usable - type: string - - jsonPath: .status.latestRelease - name: Latest - type: string - - description: Time duration since creation of ClusterStack - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.conditions[?(@.type=='Ready')].reason - name: Reason - type: string - - jsonPath: .status.conditions[?(@.type=='Ready')].message - name: Message - type: string - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterStack is the Schema for the clusterstacks 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: ClusterStackSpec defines the desired state of ClusterStack. - properties: - autoSubscribe: - default: true - description: AutoSubscribe is a feature where the operator checks - automatically if there are new versions of this cluster stack available. - type: boolean - channel: - default: stable - description: Channel specifies the release channel of the cluster - stack. Defaults to 'stable'. - type: string - kubernetesVersion: - description: KubernetesVersion is the Kubernetes version in the format - '.', e.g. 1.26. - pattern: ^\d\.\d+$ - type: string - name: - description: Name is the name of the cluster stack. - minLength: 1 - type: string - noProvider: - default: false - description: NoProvider indicates if set on true that there is no - provider-specific implementation and operator. - type: boolean - provider: - description: Provider is the name of the cluster stack provider. - minLength: 1 - type: string - providerRef: - description: ProviderRef has to reference the ProviderClusterStackReleaseTemplate - that contains all provider-specific information. - 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 - versions: - description: Versions is a list of version of the cluster stack that - should be available in the management cluster. A version has to - have the format 'v', e.g. v1 for stable channel or, - v1-alpha.1 for alpha channel. The versions have to correspond to - the channel property. - items: - type: string - type: array - required: - - kubernetesVersion - - name - - provider - type: object - status: - description: ClusterStackStatus defines the observed state of ClusterStack. - properties: - conditions: - description: Conditions provide observations of the operational state - of a Cluster API resource. - 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 - latestRelease: - type: string - summary: - items: - description: ClusterStackReleaseSummary gives the summary of the - status of a ClusterStackRelease object. - properties: - message: - type: string - name: - type: string - phase: - description: ClusterStackReleasePhase is the phase of a ClusterStackRelease - object. - type: string - ready: - type: boolean - required: - - name - - phase - - ready - type: object - type: array - usableVersions: - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - name: cso-controller-manager - namespace: cso-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - name: cso-leader-election-role - namespace: cso-system -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - name: cso-manager-role -rules: -- apiGroups: - - "" - resources: - - events - verbs: - - create - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - secrets - verbs: - - get - - list - - update - - watch -- apiGroups: - - bootstrap.cluster.x-k8s.io - - cluster.x-k8s.io - - controlplane.cluster.x-k8s.io - - infrastructure.cluster.x-k8s.io - resources: - - '*' - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - cluster.x-k8s.io - resources: - - clusters - verbs: - - get -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusteraddons - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusteraddons/finalizers - verbs: - - update -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusteraddons/status - verbs: - - get - - patch - - update -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusterreconcilers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusterreconcilers/finalizers - verbs: - - update -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusterreconcilers/status - verbs: - - get - - patch - - update -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusterstackreleases - verbs: - - create - - delete - - get - - list - - patch - - watch -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusterstackreleases/finalizers - verbs: - - update -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusterstackreleases/status - verbs: - - get - - patch - - update -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusterstacks - verbs: - - get - - list - - patch - - update - - watch -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusterstacks/finalizers - verbs: - - delete - - update -- apiGroups: - - clusterstack.x-k8s.io - resources: - - clusterstacks/status - verbs: - - get - - patch - - update -- apiGroups: - - infrastructure.clusterstack.x-k8s.io - resources: - - '*' - verbs: - - create - - delete - - get - - list - - patch - - update - - watch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - name: cso-leader-election-rolebinding - namespace: cso-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: cso-leader-election-role -subjects: -- kind: ServiceAccount - name: cso-controller-manager - namespace: cso-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - name: cso-manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cso-manager-role -subjects: -- kind: ServiceAccount - name: cso-controller-manager - namespace: cso-system ---- -apiVersion: v1 -kind: Service -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - name: cso-webhook-service - namespace: cso-system -spec: - ports: - - port: 443 - targetPort: 9443 - selector: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - control-plane: cso-controller-manager ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - control-plane: cso-controller-manager - name: cso-controller-manager - namespace: cso-system -spec: - replicas: 1 - selector: - matchLabels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - control-plane: cso-controller-manager - template: - metadata: - annotations: - kubectl.kubernetes.io/default-container: manager - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - control-plane: cso-controller-manager - spec: - containers: - - args: - - --leader-elect=true - command: - - /manager - env: - image: ghcr.io/sovereigncloudstack/cso-staging:dev - imagePullPolicy: Always - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: healthz - scheme: HTTP - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 - name: manager - ports: - - containerPort: 9443 - name: webhook-server - protocol: TCP - - containerPort: 9440 - name: healthz - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /readyz - port: healthz - scheme: HTTP - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 - resources: - limits: - cpu: 450m - memory: 350Mi - requests: - cpu: 200m - memory: 250Mi - volumeMounts: - - mountPath: /tmp/k8s-webhook-server/serving-certs - name: cert - readOnly: true - serviceAccountName: cso-controller-manager - terminationGracePeriodSeconds: 10 - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/control-plane - volumes: - - name: cert - secret: - defaultMode: 420 - secretName: cso-webhook-server-cert ---- -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - name: cso-serving-cert - namespace: cso-system -spec: - dnsNames: - - cso-webhook-service.cso-system.svc - - cso-webhook-service.cso-system.svc.cluster.local - issuerRef: - kind: Issuer - name: cso-selfsigned-issuer - secretName: cso-webhook-server-cert - subject: - organizations: - - k8s-sig-cluster-lifecycle ---- -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - name: cso-selfsigned-issuer - namespace: cso-system -spec: - selfSigned: {} ---- -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - annotations: - cert-manager.io/inject-ca-from: cso-system/cso-serving-cert - labels: - cluster.x-k8s.io/provider: infrastructure-cluster-stack-operator - name: cso-validating-webhook-configuration -webhooks: -- admissionReviewVersions: - - v1 - - v1beta1 - clientConfig: - service: - name: cso-webhook-service - namespace: cso-system - path: /validate-cluster-x-k8s-io-v1beta1-cluster - failurePolicy: Fail - name: validation.cluster.cluster.x-k8s.io - rules: - - apiGroups: - - cluster.x-k8s.io - apiVersions: - - v1beta1 - operations: - - CREATE - - UPDATE - resources: - - clusters - sideEffects: None -- admissionReviewVersions: - - v1 - - v1alpha1 - clientConfig: - service: - name: cso-webhook-service - namespace: cso-system - path: /validate-clusterstack-x-k8s-io-v1alpha1-clusteraddon - failurePolicy: Fail - name: validation.clusteraddon.clusterstack.x-k8s.io - rules: - - apiGroups: - - clusterstack.x-k8s.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - clusteraddons - sideEffects: None -- admissionReviewVersions: - - v1 - - v1alpha1 - clientConfig: - service: - name: cso-webhook-service - namespace: cso-system - path: /validate-clusterstack-x-k8s-io-v1alpha1-clusterstack - failurePolicy: Fail - name: validation.clusterstack.clusterstack.x-k8s.io - rules: - - apiGroups: - - clusterstack.x-k8s.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - clusterstacks - sideEffects: None From 5bf34a8d3f4000b0f5092d0d874fc7e427327ce5 Mon Sep 17 00:00:00 2001 From: kranurag7 <81210977+kranurag7@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:34:46 +0530 Subject: [PATCH 9/9] Update Tiltfile Co-authored-by: Michal Gubricky Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com> --- Tiltfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tiltfile b/Tiltfile index 256c7200..6e087951 100644 --- a/Tiltfile +++ b/Tiltfile @@ -89,7 +89,7 @@ def deploy_cso(): version = settings.get("cso_version") cso_uri = "https://github.com/sovereignCloudStack/cluster-stack-operator/releases/download/{}/cso-infrastructure-components.yaml".format(version) cmd = "curl -sSL {} | {} | kubectl apply -f -".format(cso_uri, envsubst_cmd) - yaml_cso = str(local(cmd, quiet = True)) + local(cmd, quiet = True) entrypoint = ["/manager"] extra_args = settings.get("extra_args")