-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: unify env vars names across all products - terraform provider - ccm - csi * feat(helm): add helm chart for cloud provider
- Loading branch information
1 parent
123eb6c
commit 0a32026
Showing
12 changed files
with
254 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
################################# | ||
# Git & GitHub files # | ||
################################# | ||
.git/ | ||
.github/ | ||
.gitignore | ||
|
||
################################# | ||
# IDE generated files # | ||
################################# | ||
.idea/ | ||
.vscode/ | ||
.project | ||
*.iml | ||
|
||
################################# | ||
# Logs and temp files # | ||
################################# | ||
*.bak | ||
*.log | ||
*.orig | ||
*.swp | ||
*~ | ||
|
||
################################# | ||
# OS generated files # | ||
################################# | ||
Thumbs.db | ||
.directory | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v2 | ||
name: xelon-cloud-controller-manager | ||
version: 0.1.0 | ||
description: A Helm Chart for the Cloud Controller Manager on Xelon HQ | ||
type: application | ||
|
||
appVersion: "1.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Xelon Cloud Provider {{ .Chart.AppVersion }} was deployed in namespace {{ .Release.Namespace }}. | ||
|
||
To verify that xelon-cloud-controller-manager has successfully started, run: | ||
kubectl -n kube-system logs --selector app=xelon-cloud-controller-manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "xelon-ccm.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "xelon-ccm.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "xelon-ccm.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "xelon-ccm.labels" -}} | ||
helm.sh/chart: {{ include "xelon-ccm.chart" . }} | ||
{{ include "xelon-ccm.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "xelon-ccm.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "xelon-ccm.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: xelon-cloud-controller-manager | ||
namespace: kube-system | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 2 | ||
selector: | ||
matchLabels: | ||
app: xelon-cloud-controller-manager | ||
template: | ||
metadata: | ||
labels: | ||
app: xelon-cloud-controller-manager | ||
spec: | ||
dnsPolicy: Default | ||
hostNetwork: true | ||
priorityClassName: "" | ||
serviceAccountName: xelon-cloud-controller-manager | ||
tolerations: | ||
- key: "CriticalAddonsOnly" | ||
operator: "Exists" | ||
- key: "node.cloudprovider.kubernetes.io/uninitialized" | ||
value: "true" | ||
effect: NoSchedule | ||
- key: "node-role.kubernetes.io/master" | ||
effect: NoSchedule | ||
- key: "node.kubernetes.io/not-ready" | ||
operator: Exists | ||
effect: NoSchedule | ||
- key: "node.kubernetes.io/unreachable" | ||
operator: Exists | ||
effect: NoSchedule | ||
containers: | ||
- name: xelon-cloud-controller-manager | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
args: | ||
- "--leader-elect=false" | ||
- "--v=2" | ||
env: | ||
- name: XELON_BASE_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: xelon-ccm-credentials | ||
key: baseUrl | ||
- name: XELON_CLIENT_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: xelon-ccm-credentials | ||
key: clientId | ||
- name: XELON_CLOUD_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: xelon-ccm-credentials | ||
key: cloudId | ||
- name: XELON_KUBERNETES_CLUSTER_ID | ||
valueFrom: | ||
secretKeyRef: | ||
name: xelon-ccm-credentials | ||
key: kubernetesClusterId | ||
- name: XELON_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: xelon-ccm-credentials | ||
key: token | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 50Mi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
annotations: | ||
rbac.authorization.kubernetes.io/autoupdate: "true" | ||
name: system:xelon-cloud-controller-manager | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["endpoints"] | ||
verbs: ["create", "get", "list", "update", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["create", "patch", "update"] | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["*"] | ||
- apiGroups: [""] | ||
resources: ["nodes/status"] | ||
verbs: ["patch"] | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["services"] | ||
verbs: ["list", "patch", "update", "watch"] | ||
- apiGroups: [""] | ||
resources: ["services/status"] | ||
verbs: ["list", "patch", "update", "watch"] | ||
- apiGroups: [""] | ||
resources: ["serviceaccounts"] | ||
verbs: ["create"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "update", "watch"] | ||
- apiGroups: ["coordination.k8s.io"] | ||
resources: ["leases"] | ||
verbs: ["create", "get", "list", "update", "watch"] | ||
|
||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: system:xelon-cloud-controller-manager | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: system:xelon-cloud-controller-manager | ||
subjects: | ||
- kind: ServiceAccount | ||
name: xelon-cloud-controller-manager | ||
namespace: kube-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: xelon-ccm-credentials | ||
namespace: kube-system | ||
type: Opaque | ||
stringData: | ||
baseUrl: {{ .Values.xelon.baseUrl | quote }} | ||
clientId: {{ .Values.xelon.clientId | quote }} | ||
cloudId: {{ .Values.xelon.cloudId | quote }} | ||
kubernetesClusterId: {{ .Values.xelon.kubernetesClusterId | quote }} | ||
token: {{ .Values.xelon.token | quote }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: xelon-cloud-controller-manager | ||
namespace: kube-system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
image: | ||
repository: xelonag/xelon-cloud-controller-manager | ||
tag: "dev" | ||
pullPolicy: Always | ||
|
||
replicaCount: 1 | ||
|
||
imagePullSecrets: [] | ||
nameOverride: "" | ||
fullnameOverride: "" | ||
|
||
xelon: | ||
baseUrl: "https://vdc.xelon.ch/api/service/" | ||
clientId: "" | ||
cloudId: "" | ||
kubernetesClusterId: "" | ||
token: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters