Skip to content

Commit

Permalink
generate unique helmchartproxy names (#295)
Browse files Browse the repository at this point in the history
Co-authored-by: Rahul Sharma <[email protected]>
  • Loading branch information
rahulait and rahulait authored Apr 29, 2024
1 parent 15ca83b commit 2ca0f3f
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions docs/src/topics/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ In order for pod networking to work properly, a Container Network Interface (CNI
Installed by default
```

To install [Cilium](https://cilium.io/) on a self-managed cluster, simply apply the `cni: cilium`
To install [Cilium](https://cilium.io/) on a self-managed cluster, simply apply the `cni: <cluster-name>-cilium`
label on the `Cluster` resource if not already present.

```bash
kubectl label cluster $CLUSTER_NAME cni=cilium --overwrite
kubectl label cluster $CLUSTER_NAME cni=$CLUSTER_NAME-cilium --overwrite
```

Cilium will then be automatically installed via CAAPH into the labeled cluster.
Expand All @@ -71,11 +71,11 @@ Installed by default
```

To install the [linode-cloud-controller-manager (linode-ccm)](https://github.com/linode/linode-cloud-controller-manager)
on a self-managed cluster, simply apply the `ccm: linode`
on a self-managed cluster, simply apply the `ccm: <cluster-name>-linode`
label on the `Cluster` resource if not already present.

```bash
kubectl label cluster $CLUSTER_NAME ccm=linode --overwrite
kubectl label cluster $CLUSTER_NAME ccm=$CLUSTER_NAME-linode --overwrite
```

The linode-ccm will then be automatically installed via CAAPH into the labeled cluster.
Expand All @@ -91,11 +91,11 @@ Installed by default
```

To install the [csi-driver-linode](https://github.com/linode/linode-blockstorage-csi-driver)
on a self-managed cluster, simply apply the `csi: linode`
on a self-managed cluster, simply apply the `csi: <cluster-name>-linode`
label on the `Cluster` resource if not already present.

```bash
kubectl label cluster $CLUSTER_NAME csi=linode --overwrite
kubectl label cluster $CLUSTER_NAME csi=$CLUSTER_NAME-linode --overwrite
```

The csi-driver-linode will then be automatically installed via CAAPH into the labeled cluster.
4 changes: 2 additions & 2 deletions docs/src/topics/flavors/clusterclass-kubeadm.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
kind: Cluster
metadata:
labels:
ccm: linode
cni: cilium
ccm: test-cluster-2-linode
cni: test-cluster-2-cilium
crs: test-cluster-2-crs
name: test-cluster-2
namespace: default
Expand Down
2 changes: 1 addition & 1 deletion docs/src/topics/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Otherwise, [ensure that the linode-ccm is installed on your workload cluster via
Make sure [a CNI is installed on the workload cluster](../topics/addons.md#cni)
and that all the pods on the workload cluster are in running state.

If the Cluster is labeled with `cni: cilium`, check that the cilium `HelmChartProxy` is installed in
If the Cluster is labeled with `cni: <cluster-name>-cilium`, check that the \<cluster-name\>-cilium `HelmChartProxy` is installed in
the management cluster and that the `HelmChartProxy` is in a `Ready` state:

```bash
Expand Down
4 changes: 2 additions & 2 deletions templates/addons/cilium/cilium-ipv6.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: cilium-ipv6
name: ${CLUSTER_NAME}-cilium-ipv6
spec:
clusterSelector:
matchExpressions:
- {key: ipv6, operator: In, values: ['true']}
- {key: cni, operator: In, values: ['cilium']}
- {key: cni, operator: In, values: ["${CLUSTER_NAME}-cilium"]}
- {key: vxlan, operator: DoesNotExist}
repoURL: https://helm.cilium.io/
chartName: cilium
Expand Down
4 changes: 2 additions & 2 deletions templates/addons/cilium/cilium-vxlan.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: cilium-vxlan
name: ${CLUSTER_NAME}-cilium-vxlan
spec:
clusterSelector:
matchExpressions:
- {key: vxlan, operator: In, values: ['true']}
- {key: cni, operator: In, values: ['cilium']}
- {key: cni, operator: In, values: ["${CLUSTER_NAME}-cilium"]}
- {key: ipv6, operator: DoesNotExist}
repoURL: https://helm.cilium.io/
chartName: cilium
Expand Down
4 changes: 2 additions & 2 deletions templates/addons/cilium/cilium.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: cilium
name: ${CLUSTER_NAME}-cilium
spec:
clusterSelector:
matchExpressions:
- {key: ipv6, operator: DoesNotExist}
- {key: vxlan, operator: DoesNotExist}
- {key: cni, operator: In, values: ['cilium']}
- {key: cni, operator: In, values: ["${CLUSTER_NAME}-cilium"]}
repoURL: https://helm.cilium.io/
chartName: cilium
namespace: kube-system
Expand Down
4 changes: 2 additions & 2 deletions templates/addons/csi-driver-linode/linode-csi.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: csi-driver-linode
name: ${CLUSTER_NAME}-csi-driver-linode
spec:
clusterSelector:
matchLabels:
csi: linode
csi: ${CLUSTER_NAME}-linode
repoURL: https://linode.github.io/linode-blockstorage-csi-driver/
chartName: linode-blockstorage-csi-driver
namespace: kube-system
Expand Down
4 changes: 2 additions & 2 deletions templates/addons/provider-linode/linode-ccm-vpcless.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: linode-cloud-controller-manager-vpcless
name: ${CLUSTER_NAME}-linode-cloud-controller-manager-vpcless
spec:
clusterSelector:
matchLabels:
ccm: linode
ccm: "${CLUSTER_NAME}-linode"
vpcless: "true"
repoURL: https://linode.github.io/linode-cloud-controller-manager/
chartName: ccm-linode
Expand Down
4 changes: 2 additions & 2 deletions templates/addons/provider-linode/linode-ccm.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: linode-cloud-controller-manager
name: ${CLUSTER_NAME}-linode-cloud-controller-manager
spec:
clusterSelector:
matchExpressions:
- {key: vpcless, operator: DoesNotExist}
- {key: ccm, operator: In, values: ['linode']}
- {key: ccm, operator: In, values: ["${CLUSTER_NAME}-linode"]}
repoURL: https://linode.github.io/linode-cloud-controller-manager/
chartName: ccm-linode
namespace: kube-system
Expand Down
4 changes: 2 additions & 2 deletions templates/flavors/clusterclass-kubeadm/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ kind: Cluster
metadata:
name: ${CLUSTER_NAME}
labels:
cni: cilium
ccm: linode
cni: ${CLUSTER_NAME}-cilium
ccm: ${CLUSTER_NAME}-linode
crs: ${CLUSTER_NAME}-crs
spec:
clusterNetwork:
Expand Down
6 changes: 3 additions & 3 deletions templates/flavors/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ patches:
metadata:
name: ${CLUSTER_NAME}
labels:
cni: cilium
ccm: linode
csi: linode
cni: ${CLUSTER_NAME}-cilium
ccm: ${CLUSTER_NAME}-linode
csi: ${CLUSTER_NAME}-linode
crs: ${CLUSTER_NAME}-crs
- target:
group: cluster.x-k8s.io
Expand Down
2 changes: 1 addition & 1 deletion templates/flavors/rke2/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ patches:
metadata:
name: ${CLUSTER_NAME}
labels:
cni: cilium
cni: ${CLUSTER_NAME}-cilium
- target:
group: cluster.x-k8s.io
version: v1beta1
Expand Down

0 comments on commit 2ca0f3f

Please sign in to comment.