Skip to content

Commit

Permalink
Add openstack kamaji cluster stack (#104)
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Hros <roman.hros@dnation.cloud>
Co-authored-by: Malte Münch <muench@b1-systems.de>
  • Loading branch information
chess-knight and mxmxchere authored Jul 3, 2024
1 parent 70600fb commit 295a365
Show file tree
Hide file tree
Showing 20 changed files with 757 additions and 0 deletions.
5 changes: 5 additions & 0 deletions providers/openstack/kamaji/1-30/cluster-addon-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
values: |
metrics-server:
commonLabels:
domain: "{{ .Cluster.spec.controlPlaneEndpoint.host }}"
clusterAddonVersion: "v1"
23 changes: 23 additions & 0 deletions providers/openstack/kamaji/1-30/cluster-addon/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
15 changes: 15 additions & 0 deletions providers/openstack/kamaji/1-30/cluster-addon/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dependencies:
- name: metrics-server
repository: https://kubernetes-sigs.github.io/metrics-server/
version: 3.12.0
- name: cilium
repository: https://helm.cilium.io/
version: 1.15.2
- name: openstack-cloud-controller-manager
repository: https://kubernetes.github.io/cloud-provider-openstack
version: 2.30.0
- name: openstack-cinder-csi
repository: https://kubernetes.github.io/cloud-provider-openstack
version: 2.30.0
digest: sha256:8d0f42e7a6b58afda62cbf2842168aead0eadabd698d27ab086800d080d091b8
generated: "2024-05-21T05:57:51.234735433+02:00"
21 changes: 21 additions & 0 deletions providers/openstack/kamaji/1-30/cluster-addon/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v2
dependencies:
- alias: metrics-server
name: metrics-server
repository: https://kubernetes-sigs.github.io/metrics-server/
version: 3.12.0
- alias: cilium
name: cilium
repository: https://helm.cilium.io/
version: 1.15.2
- alias: openstack-cloud-controller-manager
name: openstack-cloud-controller-manager
repository: https://kubernetes.github.io/cloud-provider-openstack
version: 2.30.0
- alias: openstack-cinder-csi
name: openstack-cinder-csi
repository: https://kubernetes.github.io/cloud-provider-openstack
version: 2.30.0
name: openstack-kamaji-1-30-cluster-addon
type: application
version: v1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38 changes: 38 additions & 0 deletions providers/openstack/kamaji/1-30/cluster-addon/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
metrics-server:
fullnameOverride: metrics-server
replicas: 1
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1

service:
labels:
kubernetes.io/cluster-service: "true"
kubernetes.io/name: "Metrics-server"

defaultArgs:
- --cert-dir=/tmp
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --metric-resolution=15s

args:
- --kubelet-insecure-tls
openstack-cloud-controller-manager:
secret:
enabled: true
name: cloud-config
create: false
nodeSelector:
tolerations:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
effect: NoSchedule

openstack-cinder-csi:
secret:
enabled: true
name: cloud-config
create: false
23 changes: 23 additions & 0 deletions providers/openstack/kamaji/1-30/cluster-class/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
7 changes: 7 additions & 0 deletions providers/openstack/kamaji/1-30/cluster-class/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v2
description: |
This chart installs and configures:
* Openstack Kamaji Cluster Class
name: openstack-kamaji-1-30-cluster-class
type: application
version: v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "cluster-class.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 "cluster-class.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 "cluster-class.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "cluster-class.labels" -}}
helm.sh/chart: {{ include "cluster-class.chart" . }}
{{ include "cluster-class.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "cluster-class.selectorLabels" -}}
app.kubernetes.io/name: {{ include "cluster-class.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "cluster-class.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "cluster-class.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Loading

0 comments on commit 295a365

Please sign in to comment.