Skip to content

Commit

Permalink
[feat] add HelmChartProxies for linode-ccm and linode-csi-driver, ins…
Browse files Browse the repository at this point in the history
…tall ccm and cilium for default template (#116)

* add HelmChartProxies for linode-ccm and linode-csi-driver

* install CCM and cilium by default
  • Loading branch information
AshleyDumaine authored Feb 16, 2024
1 parent 25095f5 commit 0cb43a0
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 34 deletions.
13 changes: 1 addition & 12 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ docker_build("controller", ".", only=("Dockerfile", "Makefile", "vendor","go.mod

local_resource(
'capi-controller-manager',
cmd='clusterctl init --addon helm',
cmd='EXP_CLUSTER_RESOURCE_SET=true clusterctl init --addon helm',
)

k8s_yaml(kustomize('config/default'))
Expand All @@ -29,14 +29,3 @@ k8s_resource(
"%s:secret" % token_secret_name
]
)

k8s_attach("caaph-controller-manager", "deployment.apps/caaph-controller-manager", namespace="caaph-system")

k8s_yaml("./templates/addons/cilium-helm.yaml")
k8s_resource(
new_name="addon-cilium-helm",
objects=[
"cilium:helmchartproxy"
],
resource_deps=["capi-controller-manager", "cluster-api-provider-linode-controller-manager", "caaph-controller-manager"]
)
22 changes: 0 additions & 22 deletions templates/addons/cilium-helm.yaml

This file was deleted.

19 changes: 19 additions & 0 deletions templates/addons/linode-blockstorage-csi-driver-helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: linode-blockstorage-csi-driver
spec:
clusterSelector:
matchLabels:
csi-driver: linode
repoURL: https://linode.github.io/linode-blockstorage-csi-driver/
chartName: linode-blockstorage-csi-driver
namespace: kube-system
version: v0.6.3
options:
waitForJobs: true
wait: true
timeout: 5m
valuesTemplate: |
secretRef:
name: "linode-token-region"
74 changes: 74 additions & 0 deletions templates/cluster-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
labels:
cni: cilium
ccm: linode
crs: ${CLUSTER_NAME}-crs
spec:
clusterNetwork:
pods:
Expand Down Expand Up @@ -209,3 +210,76 @@ stringData:
sysctl --system
sed -i '/swap/d' /etc/fstab
swapoff -a
---
apiVersion: v1
kind: Secret
type: addons.cluster.x-k8s.io/resource-set
metadata:
name: linode-${CLUSTER_NAME}-crs-0
stringData:
linode-token-region.yaml: |-
kind: Secret
apiVersion: v1
metadata:
name: linode-token-region
namespace: kube-system
stringData:
apiToken: ${LINODE_TOKEN}
region: ${LINODE_REGION}
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
metadata:
name: ${CLUSTER_NAME}-crs-0
spec:
clusterSelector:
matchLabels:
crs: ${CLUSTER_NAME}-crs
resources:
- kind: Secret
name: linode-${CLUSTER_NAME}-crs-0
strategy: ApplyOnce
---
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: cilium
spec:
clusterSelector:
matchLabels:
cni: cilium
repoURL: https://helm.cilium.io/
chartName: cilium
version: 1.15.0
options:
waitForJobs: true
wait: true
timeout: 5m
valuesTemplate: |
hubble:
relay:
enabled: true
ui:
enabled: true
---
apiVersion: addons.cluster.x-k8s.io/v1alpha1
kind: HelmChartProxy
metadata:
name: linode-cloud-controller-manager
spec:
clusterSelector:
matchLabels:
ccm: linode
repoURL: https://linode.github.io/linode-cloud-controller-manager/
chartName: ccm-linode
namespace: kube-system
version: v0.3.24
options:
waitForJobs: true
wait: true
timeout: 5m
valuesTemplate: |
secretRef:
name: "linode-token-region"
image:
pullPolicy: IfNotPresent

0 comments on commit 0cb43a0

Please sign in to comment.