diff --git a/Makefile b/Makefile index e312c31..380d605 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ $(CHARTS_PACKAGE_DIR): | $(LOCALBIN) rm -rf $(CHARTS_PACKAGE_DIR) mkdir -p $(CHARTS_PACKAGE_DIR) -REGISTRY_NAME ?= hmc-local-registry +REGISTRY_NAME ?= kcm-local-registry REGISTRY_PORT ?= 5001 REGISTRY_REPO ?= oci://127.0.0.1:$(REGISTRY_PORT)/charts REGISTRY_IS_OCI = $(shell echo $(REGISTRY_REPO) | grep -q oci && echo true || echo false) @@ -72,7 +72,7 @@ helm-push: helm-package echo "REGISTRY_USERNAME and REGISTRY_PASSWORD must be populated to push the chart to an HTTPS repository"; \ exit 1; \ else \ - $(HELM) repo add hmc $(REGISTRY_REPO); \ + $(HELM) repo add kcm $(REGISTRY_REPO); \ echo "Pushing $$chart to $(REGISTRY_REPO)"; \ $(HELM) cm-push "$$chart" $(REGISTRY_REPO) --username $$REGISTRY_USERNAME --password $$REGISTRY_PASSWORD; \ fi; \ diff --git a/README.md b/README.md index 85a4d29..3ec0ac7 100644 --- a/README.md +++ b/README.md @@ -47,13 +47,13 @@ To deploy storage `clusterdeployment` configure desired ingress names for vmauth ```bash kubectl apply -f demo/cluster/aws-storage.yaml # you can check helm chart deployment status using ClusterSummary object: -kubectl get clustersummaries.config.projectsveltos.io -n hmc-system +kubectl get clustersummaries.config.projectsveltos.io -n kcm-system ``` Once the storage clusterdeploymet is ready - retrieve its kubeconfig and get loadbalancer IP/DNS name for your ingress-nginx service. ```bash -kubectl get secret -n hmc-system aws-storage-kubeconfig -o jsonpath={.data.value} | base64 -d > /tmp/hmc-aws-storage-kubeconfig.yaml -export KUBECONFIG=/tmp/hmc-aws-storage-kubeconfig.yaml +kubectl get secret -n kcm-system aws-storage-kubeconfig -o jsonpath={.data.value} | base64 -d > /tmp/kcm-aws-storage-kubeconfig.yaml +export KUBECONFIG=/tmp/kcm-aws-storage-kubeconfig.yaml kubectl get svc -n ingress-nginx ingress-nginx-controller ``` @@ -78,7 +78,7 @@ To deploy operators and collectors to a `clusterdeployment` configure ingress na ``` kubectl apply -f demo/cluster/aws-managed.yaml # you can check helm chart deployment status using ClusterSummary object: -kubectl get clustersummaries.config.projectsveltos.io -n hmc-system +kubectl get clustersummaries.config.projectsveltos.io -n kcm-system ``` Once your managed clusters are up, create secrets for storage cluster authentication, it should start pushing metrics and logs to your storage one, through ingress domain you've configured. diff --git a/charts/kof-mothership/Chart.yaml b/charts/kof-mothership/Chart.yaml index 96845bf..fd37018 100644 --- a/charts/kof-mothership/Chart.yaml +++ b/charts/kof-mothership/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: kof-mothership description: A Helm chart that deploys Grafana, Promxy, and VictoriaMetrics. -version: 0.1.6 +version: 0.1.8 appVersion: "1.0" dependencies: - name: grafana-operator diff --git a/charts/kof-mothership/templates/kcm/cert-manager/flux-helm.yaml b/charts/kof-mothership/templates/kcm/cert-manager/flux-helm.yaml index a816b73..4eabfeb 100644 --- a/charts/kof-mothership/templates/kcm/cert-manager/flux-helm.yaml +++ b/charts/kof-mothership/templates/kcm/cert-manager/flux-helm.yaml @@ -4,9 +4,9 @@ apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: name: jetstack - namespace: hmc-system + namespace: {{ .Values.kcm.namespace }} labels: - hmc.mirantis.com/managed: "true" + k0rdent.mirantis.com/managed: "true" spec: url: https://charts.jetstack.io --- @@ -14,9 +14,9 @@ apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmChart metadata: name: cert-manager - namespace: hmc-system + namespace: {{ .Values.kcm.namespace }} labels: - hmc.mirantis.com/managed: "true" + k0rdent.mirantis.com/managed: "true" spec: chart: cert-manager interval: 10m0s @@ -25,4 +25,4 @@ spec: kind: HelmRepository name: jetstack version: 1.16.1 -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/kof-mothership/templates/kcm/cert-manager/svctmpl.yaml b/charts/kof-mothership/templates/kcm/cert-manager/svctmpl.yaml index 514a5f8..123eb21 100644 --- a/charts/kof-mothership/templates/kcm/cert-manager/svctmpl.yaml +++ b/charts/kof-mothership/templates/kcm/cert-manager/svctmpl.yaml @@ -1,15 +1,15 @@ {{- if .Values.kcm.installTemplates }} -apiVersion: hmc.mirantis.com/v1alpha1 +apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ServiceTemplate metadata: name: cert-manager - namespace: hmc-system + namespace: {{ .Values.kcm.namespace }} spec: helm: chartRef: apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmChart name: cert-manager - namespace: hmc-system + namespace: {{ .Values.kcm.namespace }} providers: [] {{- end }} diff --git a/charts/kof-mothership/templates/kcm/kof/flux-helm.yaml b/charts/kof-mothership/templates/kcm/kof/flux-helm.yaml index 9f66545..d176e56 100644 --- a/charts/kof-mothership/templates/kcm/kof/flux-helm.yaml +++ b/charts/kof-mothership/templates/kcm/kof/flux-helm.yaml @@ -5,9 +5,9 @@ apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmChart metadata: name: kof-{{ $name }} - namespace: hmc-system + namespace: {{ $.Values.kcm.namespace }} labels: - hmc.mirantis.com/managed: "true" + k0rdent.mirantis.com/managed: "true" spec: chart: kof-{{ $name }} interval: 10m0s diff --git a/charts/kof-mothership/templates/kcm/kof/flux-repo.yaml b/charts/kof-mothership/templates/kcm/kof/flux-repo.yaml index d90b9bb..19c9e83 100644 --- a/charts/kof-mothership/templates/kcm/kof/flux-repo.yaml +++ b/charts/kof-mothership/templates/kcm/kof/flux-repo.yaml @@ -4,9 +4,9 @@ apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: name: {{ .Values.kcm.kof.repo.name }} - namespace: hmc-system + namespace: {{ .Values.kcm.namespace }} labels: - hmc.mirantis.com/managed: "true" + k0rdent.mirantis.com/managed: "true" spec: url: {{ .Values.kcm.kof.repo.url }} insecure: {{ .Values.kcm.kof.repo.insecure }} diff --git a/charts/kof-mothership/templates/kcm/kof/svctmpl.yaml b/charts/kof-mothership/templates/kcm/kof/svctmpl.yaml index 310ff16..8d733b6 100644 --- a/charts/kof-mothership/templates/kcm/kof/svctmpl.yaml +++ b/charts/kof-mothership/templates/kcm/kof/svctmpl.yaml @@ -1,7 +1,7 @@ {{- if .Values.kcm.installTemplates }} {{- range $name, $values := .Values.kcm.kof.charts }} --- -apiVersion: hmc.mirantis.com/v1alpha1 +apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ServiceTemplate metadata: name: kof-{{ $name }} @@ -12,7 +12,7 @@ spec: apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmChart name: kof-{{ $name }} - namespace: hmc-system + namespace: {{ $.Values.kcm.namespace }} providers: [] {{- end }} {{- end }} diff --git a/charts/kof-mothership/values.yaml b/charts/kof-mothership/values.yaml index 56156f1..87655e7 100644 --- a/charts/kof-mothership/values.yaml +++ b/charts/kof-mothership/values.yaml @@ -6,6 +6,7 @@ global: random_password_length: 12 kcm: installTemplates: false + namespace: kcm-system kof: repo: name: kof diff --git a/charts/kof-storage/Chart.yaml b/charts/kof-storage/Chart.yaml index 21298d8..0ac7f96 100644 --- a/charts/kof-storage/Chart.yaml +++ b/charts/kof-storage/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: kof-storage description: A Helm chart that deploys Grafana, and VictoriaMetrics. -version: 0.1.2 +version: 0.1.4 appVersion: "1.0" dependencies: - name: grafana-operator diff --git a/charts/kof-storage/values.yaml b/charts/kof-storage/values.yaml index 6cb5e7b..2fd6e71 100644 --- a/charts/kof-storage/values.yaml +++ b/charts/kof-storage/values.yaml @@ -31,7 +31,7 @@ victoriametrics: password_key: password credentials_secret_name: storage-vmuser-credentials ingress: - host: vmauth.hmc0.example.net + host: vmauth.kcm0.example.net vmcluster: enabled: true vmalert: @@ -54,7 +54,7 @@ grafana: create_secret: true ingress: enabled: true - host: grafana.hmc0.example.net + host: grafana.kcm0.example.net autoinstrumentation: enabled: true victoria-metrics-operator: diff --git a/demo/cluster/aws-credentials.yaml b/demo/cluster/aws-credentials.yaml index c85d6c8..d681d2e 100644 --- a/demo/cluster/aws-credentials.yaml +++ b/demo/cluster/aws-credentials.yaml @@ -21,7 +21,7 @@ stringData: SecretAccessKey: ${AWS_SECRET_ACCESS_KEY} SessionToken: ${AWS_SESSION_TOKEN} --- -apiVersion: hmc.mirantis.com/v1alpha1 +apiVersion: k0rdent.mirantis.com/v1alpha1 kind: Credential metadata: name: aws-cluster-identity-cred diff --git a/demo/cluster/aws-managed.yaml b/demo/cluster/aws-managed.yaml index 988b0a4..eef71eb 100644 --- a/demo/cluster/aws-managed.yaml +++ b/demo/cluster/aws-managed.yaml @@ -1,8 +1,8 @@ -apiVersion: hmc.mirantis.com/v1alpha1 +apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ClusterDeployment metadata: name: aws-managed0 - namespace: hmc-system + namespace: kcm-system labels: kof: "collector" spec: @@ -10,7 +10,7 @@ spec: config: clusterIdentity: name: aws-cluster-identity - namespace: hmc-system + namespace: kcm-system controlPlane: instanceType: t3.large controlPlaneNumber: 1 diff --git a/demo/cluster/aws-storage.yaml b/demo/cluster/aws-storage.yaml index 2c0fe85..5ca1c12 100644 --- a/demo/cluster/aws-storage.yaml +++ b/demo/cluster/aws-storage.yaml @@ -1,8 +1,8 @@ -apiVersion: hmc.mirantis.com/v1alpha1 +apiVersion: k0rdent.mirantis.com/v1alpha1 kind: ClusterDeployment metadata: name: aws-storage0 - namespace: hmc-system + namespace: kcm-system labels: kof: "storage" spec: @@ -10,7 +10,7 @@ spec: config: clusterIdentity: name: aws-cluster-identity - namespace: hmc-system + namespace: kcm-system controlPlane: instanceType: t3.large controlPlaneNumber: 1 diff --git a/demo/demo-mothership-values.yaml b/demo/demo-mothership-values.yaml index cac782d..7a95dee 100644 --- a/demo/demo-mothership-values.yaml +++ b/demo/demo-mothership-values.yaml @@ -21,8 +21,8 @@ grafana: alerts: enabled: true logSources: - - name: hmc0-logs - url: https://vmauth.hmc0.example.net/vls + - name: storage0-logs + url: https://vmauth.kcm0.example.net/vls type: victorialogs-datasource auth: credentials_secret_name: storage-vmuser-credentials @@ -80,9 +80,9 @@ promxy: config: remoteWriteUrl: http://vminsert-cluster:8480/insert/0/prometheus/api/v1/write serverGroups: - - clusterName: hmc0 + - clusterName: kcm0 targets: - - vmauth.hmc0.example.net:443 + - vmauth.kcm0.example.net:443 auth: credentials_secret_name: storage-vmuser-credentials username_key: "username" diff --git a/docs/DEV.md b/docs/DEV.md index 9576623..f99a3b8 100644 --- a/docs/DEV.md +++ b/docs/DEV.md @@ -50,13 +50,13 @@ Install "mothership" helm chart into your "mothership" cluster make dev-ms-deploy-aws ``` -Create "storage" managed cluster using HMC +Create "storage" managed cluster using KCM ```bash make dev-storage-deploy-aws ``` -Create "managed" managed cluster using HMC +Create "managed" managed cluster using KCM ```bash make dev-managed-deploy-aws diff --git a/docs/otel.canvas b/docs/otel.canvas index b1e4ac4..b141500 100644 --- a/docs/otel.canvas +++ b/docs/otel.canvas @@ -1,13 +1,13 @@ { "nodes":[ {"id":"bfb5b9ca6d6173a2","type":"group","x":-2300,"y":-480,"width":1194,"height":1232,"label":"Azure - West Europe - Netherlands"}, - {"id":"8e43733fc60f6285","type":"group","x":-960,"y":-996,"width":920,"height":1234,"label":"HMC Management Cluster"}, + {"id":"8e43733fc60f6285","type":"group","x":-960,"y":-996,"width":920,"height":1234,"label":"KCM Management Cluster"}, {"id":"c90038fee416518d","type":"group","x":-2300,"y":-1139,"width":1194,"height":617,"label":"AWS eu-central"}, {"id":"c6eb697ae5a678d0","type":"group","x":-918,"y":-299,"width":858,"height":512,"label":"Mothership stack"}, {"id":"bea4f3a4119c09db","type":"group","x":-2274,"y":-422,"width":571,"height":552,"label":"ManagedCluster - azure-nl-0"}, {"id":"cffd281f4d05978c","type":"group","x":-2274,"y":171,"width":571,"height":552,"label":"ManagedCluster - azure-nl-1"}, {"id":"327c8d02308940c7","type":"group","x":-2274,"y":-1089,"width":571,"height":552,"label":"ManagedCluster - aws-eu-central-0"}, - {"id":"4201a84061be9489","type":"group","x":-918,"y":-927,"width":571,"height":552,"label":"HMC CAPI stack"}, + {"id":"4201a84061be9489","type":"group","x":-918,"y":-927,"width":571,"height":552,"label":"KCM CAPI stack"}, {"id":"6ad3921b1970c1b2","type":"group","x":-1614,"y":-73,"width":437,"height":371,"label":"k0s azure-nl-0-storage"}, {"id":"782718b4a48faebe","type":"group","x":-1622,"y":-984,"width":437,"height":342,"label":"k0s aws-eu-central-0-storage"}, {"id":"d3a6a85b665e3a5b","type":"group","x":-1606,"y":-16,"width":421,"height":310,"label":"Metrics + Logs + Traces"}, @@ -112,4 +112,4 @@ {"id":"2b53eb80984fb5b1","fromNode":"82a9870d78bfde09","fromSide":"right","toNode":"fe85ebb84757f2d6","toSide":"top"}, {"id":"be91a9edd5321fe0","fromNode":"fe85ebb84757f2d6","fromSide":"left","toNode":"f3574dc5e8bd1c15","toSide":"right","color":"4"} ] -} +} \ No newline at end of file