From 4a847e594e01c4fbeff1301aa3c3006706a0e2c0 Mon Sep 17 00:00:00 2001 From: Wahab Ali Date: Wed, 5 Feb 2025 19:54:00 +0500 Subject: [PATCH] Small fixes to some names and YAMLs --- docs/admin-creating-clusters.md | 2 +- docs/admin-service-templates.md | 22 +++++++++--------- docs/appendix-dryrun.md | 4 ++-- docs/template-byo.md | 4 ++-- docs/template-intro.md | 6 ++--- docs/user-create-cluster.md | 2 +- docs/user-create-service.md | 40 ++++++++++++++++----------------- 7 files changed, 39 insertions(+), 41 deletions(-) diff --git a/docs/admin-creating-clusters.md b/docs/admin-creating-clusters.md index ecb9d26..3130767 100644 --- a/docs/admin-creating-clusters.md +++ b/docs/admin-creating-clusters.md @@ -96,7 +96,7 @@ Follow these steps to deploy a standalone Kubernetes cluster tailored to your sp apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ClusterDeployment metadata: - name: my-managed-cluster + name: my-cluster-deployment namespace: kcm-system spec: template: aws-standalone-cp-0-1-0 diff --git a/docs/admin-service-templates.md b/docs/admin-service-templates.md index fed9464..d938eea 100644 --- a/docs/admin-service-templates.md +++ b/docs/admin-service-templates.md @@ -46,12 +46,12 @@ The basic sequence looks like this: interval: 10m0s sourceRef: kind: HelmRepository - name: k0rdent-templates + name: k0rdent-catalog ``` In this case, we're creating a `ServiceTemplate` called `ingress-nginx-4.11.3` in the `my-target-namespace` namespace. It references version 4.11.3 of the `ingress-nginx` chart - located in the `k0rdent-templates` Helm repository. + located in the `k0rdent-catalog` Helm repository. For more information on creating templates, see the [Template Guide](template-intro.md). @@ -93,26 +93,26 @@ The basic sequence looks like this: apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ClusterDeployment metadata: - name: my-managed-cluster + name: my-cluster-deployment namespace: tenant42 spec: config: clusterLabels: {} template: aws-standalone-cp-0-1-0 credential: aws-credential - services: - - template: project-ingress-nginx-4.11.3 - name: ingress-nginx - namespace: my-target-namespace - servicesPriority: 100 - stopOnConflict: false + serviceSpec: + services: + - template: project-ingress-nginx-4.11.3 + name: ingress-nginx + namespace: my-target-namespace + priority: 100 ``` - As you can see, you're simply referencing the template in the `.spec.services.template` field of the `ClusterDeployment` + As you can see, you're simply referencing the template in the `.spec.serviceSpec.services[].template` field of the `ClusterDeployment` to tell k0rdent that you want this service to be part of this cluster. If you wanted to add this service to an existing cluster, you would simply patch the definition of the `ClusterDeployment`, as in: ```shell - kubectl patch clusterdeployment my-managed-cluster -n my-target-namespace --type='merge' -p '{"spec":{"services":[{"template":"project-ingress-nginx-4.11.3","name":"ingress-nginx","namespace":"my-target-namespace"}]}}' + kubectl patch clusterdeployment my-cluster-deployment -n my-target-namespace --type='merge' -p '{"spec":{"services":[{"template":"project-ingress-nginx-4.11.3","name":"ingress-nginx","namespace":"my-target-namespace"}]}}' ``` For more information on creating and using `ServiceTemplate` objects, see the [User Guide](user-create-service.md). diff --git a/docs/appendix-dryrun.md b/docs/appendix-dryrun.md index d5520c9..887aa53 100644 --- a/docs/appendix-dryrun.md +++ b/docs/appendix-dryrun.md @@ -10,7 +10,7 @@ Note that if no configuration (`.spec.config`) is provided, default values from apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ClusterDeployment metadata: - name: my-managed-cluster + name: my-cluster-deployment namespace: kcm-system spec: template: aws-standalone-cp-0-0-3 @@ -26,7 +26,7 @@ After validation (this is, you see `TemplateReady` as a condition in `.status.co apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ClusterDeployment metadata: - name: my-managed-cluster + name: my-cluster-deployment namespace: kcm-system spec: template: aws-standalone-cp-0-0-3 diff --git a/docs/template-byo.md b/docs/template-byo.md index 65b143b..8b982e0 100644 --- a/docs/template-byo.md +++ b/docs/template-byo.md @@ -27,7 +27,7 @@ For example, this YAML describes a custom `Source` object of `kind` `HelmReposit apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: - name: k0rdent-templates + name: k0rdent-catalog namespace: kcm-system labels: k0rdent.mirantis.com/managed: "true" @@ -101,7 +101,7 @@ spec: chart: os-k0sproject-k0smotron sourceRef: kind: HelmRepository - name: k0rdent-templates + name: k0rdent-catalog ``` > EXAMPLE: diff --git a/docs/template-intro.md b/docs/template-intro.md index 3339b0c..aa4f1d5 100644 --- a/docs/template-intro.md +++ b/docs/template-intro.md @@ -31,7 +31,7 @@ spec: reconcileStrategy: ChartVersion sourceRef: kind: HelmRepository - name: k0rdent-templates + name: k0rdent-catalog version: 0.0.4 status: capiContracts: @@ -69,7 +69,7 @@ spec: reconcileStrategy: ChartVersion sourceRef: kind: HelmRepository - name: k0rdent-templates + name: k0rdent-catalog version: 0.0.3 status: chartRef: @@ -150,7 +150,7 @@ spec: reconcileStrategy: ChartVersion sourceRef: kind: HelmRepository - name: k0rdent-templates + name: k0rdent-catalog version: 3.2.6 status: chartRef: diff --git a/docs/user-create-cluster.md b/docs/user-create-cluster.md index 7c44abe..c6be0c7 100644 --- a/docs/user-create-cluster.md +++ b/docs/user-create-cluster.md @@ -113,7 +113,7 @@ Follow these steps to deploy a standalone Kubernetes cluster: apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ClusterDeployment metadata: - name: my-managed-cluster + name: my-cluster-deployment namespace: kcm-system spec: template: aws-standalone-cp-0-0-3 diff --git a/docs/user-create-service.md b/docs/user-create-service.md index e8902d4..e7756d1 100644 --- a/docs/user-create-service.md +++ b/docs/user-create-service.md @@ -56,32 +56,33 @@ when you create it, as in: apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ClusterDeployment metadata: - name: my-managed-cluster + name: my-cluster-deployment namespace: tenant42 spec: config: clusterLabels: {} template: aws-standalone-cp-0-0-3 credential: aws-credential - services: - - template: project-ingress-nginx-4.11.0 - name: ingress-nginx - namespace: tenant42 - servicesPriority: 100 - stopOnConflict: false + serviceSpec: + services: + - template: project-ingress-nginx-4.11.0 + name: ingress-nginx + namespace: tenant42 + priority: 100 ``` -As you can see, you're simply referencing the template in the `.spec.services.template` field of the `ClusterDeployment` +As you can see, you're simply referencing the template in the `.spec.serviceSpec.services[].template` field of the `ClusterDeployment` to tell k0rdent that you want this service to be part of this cluster. -If you wanted to add this serice to an existing cluster, you would simply patch the definition of the `ClusterDeployment`, as in: +If you wanted to add this service to an existing cluster, you would simply patch the definition of the `ClusterDeployment`, as in: ```yaml -kubectl patch clusterdeployment my-managed-cluster -n tenant42 --type='merge' -p ' +kubectl patch clusterdeployment my-cluster-deployment -n tenant42 --type='merge' -p ' spec: - services: - - template: project-ingress-nginx-4.11.0 - name: ingress-nginx - namespace: tenant42 + serviceSpec: + services: + - template: project-ingress-nginx-4.11.0 + name: ingress-nginx + namespace: tenant42 ``` Let's look at a more complex case, involving deploying beach-head services on a single cluster. @@ -94,7 +95,7 @@ Beach-head services can be installed on a cluster deployment (that is, a target apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ClusterDeployment metadata: - name: my-managed-cluster + name: my-cluster-deployment namespace: kcm-system spec: config: @@ -148,15 +149,12 @@ spec: chart: kyverno version: 3.2.6 interval: 10m0s - reconcileStrategy: ChartVersion sourceRef: kind: HelmRepository - name: kcm-templates - version: 3.2.6 - name: k0rdent-templates + name: k0rdent-catalog ``` -The `k0rdent-templates` helm repository hosts the actual kyverno chart version 3.2.6. +The `k0rdent-catalog` helm repository hosts the actual kyverno chart version 3.2.6. For more details see the [Bring your own Templates](template-byo.md) guide. ### Configuring Custom Values @@ -266,7 +264,7 @@ status: . . . observedGeneration: 1 services: - - clusterName: my-managed-cluster + - clusterName: my-cluster-deployment clusterNamespace: kcm-system conditions: - lastTransitionTime: "2024-12-11T23:03:05Z"