Skip to content

Commit

Permalink
Rename hmc to k0rdent
Browse files Browse the repository at this point in the history
  • Loading branch information
gmlexx committed Jan 14, 2025
1 parent b09f517 commit 7a55465
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 40 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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; \
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion charts/kof-mothership/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions charts/kof-mothership/templates/kcm/cert-manager/flux-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ 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
---
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
Expand All @@ -25,4 +25,4 @@ spec:
kind: HelmRepository
name: jetstack
version: 1.16.1
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/kof-mothership/templates/kcm/cert-manager/svctmpl.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 2 additions & 2 deletions charts/kof-mothership/templates/kcm/kof/flux-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/kof-mothership/templates/kcm/kof/flux-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/kof-mothership/templates/kcm/kof/svctmpl.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand All @@ -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 }}
1 change: 1 addition & 0 deletions charts/kof-mothership/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ global:
random_password_length: 12
kcm:
installTemplates: false
namespace: kcm-system
kof:
repo:
name: kof
Expand Down
2 changes: 1 addition & 1 deletion charts/kof-storage/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/kof-storage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion demo/cluster/aws-credentials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions demo/cluster/aws-managed.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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:
credential: aws-cluster-identity-cred
config:
clusterIdentity:
name: aws-cluster-identity
namespace: hmc-system
namespace: kcm-system
controlPlane:
instanceType: t3.large
controlPlaneNumber: 1
Expand Down
6 changes: 3 additions & 3 deletions demo/cluster/aws-storage.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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:
credential: aws-cluster-identity-cred
config:
clusterIdentity:
name: aws-cluster-identity
namespace: hmc-system
namespace: kcm-system
controlPlane:
instanceType: t3.large
controlPlaneNumber: 1
Expand Down
8 changes: 4 additions & 4 deletions demo/demo-mothership-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions docs/DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/otel.canvas
Original file line number Diff line number Diff line change
@@ -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"},
Expand Down Expand Up @@ -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"}
]
}
}

0 comments on commit 7a55465

Please sign in to comment.