Skip to content

Commit 19aaa3d

Browse files
author
Rahul Sharma
committed
allow CCM to work with different environments
1 parent 3147756 commit 19aaa3d

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

templates/addons/ccm-linode/ccm-linode.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,19 @@ spec:
2323
name: "linode-token-region"
2424
image:
2525
pullPolicy: IfNotPresent
26+
env:
27+
- name: LINODE_EXTERNAL_SUBNET
28+
value: ${LINODE_EXTERNAL_SUBNET:=""}
29+
- name: LINODE_URL
30+
value: ${LINODE_URL:="https://api.linode.com"}
31+
- name: SSL_CERT_DIR
32+
value: "/tls"
33+
volumeMounts:
34+
- name: cacert
35+
mountPath: /tls
36+
readOnly: true
37+
volumes:
38+
- name: cacert
39+
secret:
40+
secretName: linode-ca
41+
defaultMode: 420

templates/addons/cluster-resource-set/secret.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ stringData:
1414
apiToken: ${LINODE_TOKEN}
1515
region: ${LINODE_REGION}
1616
---
17+
apiVersion: v1
18+
kind: Secret
19+
type: addons.cluster.x-k8s.io/resource-set
20+
metadata:
21+
name: linode-${CLUSTER_NAME}-crs-1
22+
stringData:
23+
linode-ca.yaml: |-
24+
kind: Secret
25+
apiVersion: v1
26+
metadata:
27+
name: linode-ca
28+
namespace: kube-system
29+
data:
30+
cacert.pem: ${LINODE_CA_BASE64:=""}
31+
---
1732
apiVersion: addons.cluster.x-k8s.io/v1beta1
1833
kind: ClusterResourceSet
1934
metadata:
@@ -25,5 +40,6 @@ spec:
2540
resources:
2641
- kind: Secret
2742
name: linode-${CLUSTER_NAME}-crs-0
43+
- kind: Secret
44+
name: linode-${CLUSTER_NAME}-crs-1
2845
strategy: Reconcile
29-
---

0 commit comments

Comments
 (0)