From 85f6176d451ceddfa769c043407828ba92096f59 Mon Sep 17 00:00:00 2001 From: bsctl Date: Mon, 19 Jun 2023 14:52:54 +0200 Subject: [PATCH] chart ci --- assets/clastix/kamaji-console-0.0.4.tgz | Bin 0 -> 6513 bytes charts/clastix/kamaji-console/.helmignore | 23 ++++ charts/clastix/kamaji-console/Chart.yaml | 22 ++++ charts/clastix/kamaji-console/Makefile | 12 ++ charts/clastix/kamaji-console/README.md | 108 ++++++++++++++++++ .../clastix/kamaji-console/README.md.gotmpl | 62 ++++++++++ charts/clastix/kamaji-console/app-readme.md | 13 +++ charts/clastix/kamaji-console/questions.yml | 70 ++++++++++++ .../kamaji-console/templates/NOTES.txt | 22 ++++ .../kamaji-console/templates/_helpers.tpl | 62 ++++++++++ .../kamaji-console/templates/deployment.yaml | 64 +++++++++++ .../clastix/kamaji-console/templates/hpa.yaml | 28 +++++ .../kamaji-console/templates/ingress.yaml | 44 +++++++ .../kamaji-console/templates/rbac.yaml | 44 +++++++ .../kamaji-console/templates/secret.yaml | 15 +++ .../kamaji-console/templates/service.yaml | 15 +++ .../templates/serviceaccount.yaml | 12 ++ .../templates/tests/test-connection.yaml | 15 +++ charts/clastix/kamaji-console/values.yaml | 100 ++++++++++++++++ index.yaml | 53 +++++++++ 20 files changed, 784 insertions(+) create mode 100644 assets/clastix/kamaji-console-0.0.4.tgz create mode 100644 charts/clastix/kamaji-console/.helmignore create mode 100644 charts/clastix/kamaji-console/Chart.yaml create mode 100644 charts/clastix/kamaji-console/Makefile create mode 100644 charts/clastix/kamaji-console/README.md create mode 100644 charts/clastix/kamaji-console/README.md.gotmpl create mode 100644 charts/clastix/kamaji-console/app-readme.md create mode 100644 charts/clastix/kamaji-console/questions.yml create mode 100644 charts/clastix/kamaji-console/templates/NOTES.txt create mode 100644 charts/clastix/kamaji-console/templates/_helpers.tpl create mode 100644 charts/clastix/kamaji-console/templates/deployment.yaml create mode 100644 charts/clastix/kamaji-console/templates/hpa.yaml create mode 100644 charts/clastix/kamaji-console/templates/ingress.yaml create mode 100644 charts/clastix/kamaji-console/templates/rbac.yaml create mode 100644 charts/clastix/kamaji-console/templates/secret.yaml create mode 100644 charts/clastix/kamaji-console/templates/service.yaml create mode 100644 charts/clastix/kamaji-console/templates/serviceaccount.yaml create mode 100644 charts/clastix/kamaji-console/templates/tests/test-connection.yaml create mode 100644 charts/clastix/kamaji-console/values.yaml diff --git a/assets/clastix/kamaji-console-0.0.4.tgz b/assets/clastix/kamaji-console-0.0.4.tgz new file mode 100644 index 0000000000000000000000000000000000000000..d2e3598a419bed065098a086d425923d0037814b GIT binary patch literal 6513 zcmV-%8II;3iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PKBjciT47Xup=fVph&>;%rDswqy6`Cb{+6ZtLCn<=9Sod$K(V zL_!i`3Sa?HwrczS_UGV@@3fS}b=v2cA8d*o0D}Q$Fqjz(&(RcpB!0-KU@`9QOc0mB z98KeI?(XXKdcDn!4gJ5@>s9~v*Ecu5>2GXoZ1grZ*ZLdZ^!gjUt&MM>cZWE%Ua63X zf7AQowyK@`i(H6OCXpnJih&0ZB8g%)4niblj03{DA?A{d2#yAjATBB9jbITGNsQ(` zMN>S0|L9o-J7!ij7C29b*q>o82%`gd{OV;tSnCHpzxTKioZ}cHfo=WeS?i&Mymd9r z);yFX`OjX^3;JG!MaW4a^)riIgp-)f1t1y$OE5_!*a+lA^~#hYjG`EZDUUD>;A}z!go=%TP$5wq0|JXEj2O4A2i}CKo=l`n#Gu<9 z6FEtTLCB`vFh)X>%WkEUBviOB4d3PHqB})|b^`<3B~vuUqO0l&5<2$O2)u0^098yP zLNONu&j&n3BpyJ7IAPyQj%YX`62~zLaOwe=A=y=L;jHjBFFD2E4@D^BfUpdHJK_XU z2FLjK-&4uF#(@e?3(F}7=B8A8VgRU4P8pFke2@H|# zEitc+pw1VJzyk$5fKJErRv_dUNel=C4mp;JFiI{GItIzkF;#t4$P}6ya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-8n{ZoDH(KA0#Dp>yZXs}I?mg_(>|Te6I|<8iwm`>tDSmZ=Lzn7R{u2ka-ICz>gU7t Xa6MdK@%o=1.21.0-0' + catalog.cattle.io/release-name: kamaji-console +apiVersion: v2 +appVersion: v0.0.1 +description: Kamaji deploys and operates Kubernetes at scale with a fraction of the + operational burden. This chart install a console for Kamaji. +home: https://github.com/clastix/kamaji-console +icon: https://github.com/clastix/kamaji-console/raw/main/.github/images/icon.png +kubeVersion: '>=1.21.0-0' +maintainers: +- email: dario@tranchitella.eu + name: Dario Tranchitella +- email: me@bsctl.io + name: Adriano Pezzuto +name: kamaji-console +sources: +- https://github.com/clastix/kamaji-console +type: application +version: 0.0.4 diff --git a/charts/clastix/kamaji-console/Makefile b/charts/clastix/kamaji-console/Makefile new file mode 100644 index 000000000..d18652802 --- /dev/null +++ b/charts/clastix/kamaji-console/Makefile @@ -0,0 +1,12 @@ +# Helm +SRC_ROOT = $(shell git rev-parse --show-toplevel) + +helm-docs: HELMDOCS_VERSION := v1.11.0 +helm-docs: docker + @docker run --rm -v "$(SRC_ROOT):/helm-docs" jnorwood/helm-docs:$(HELMDOCS_VERSION) --chart-search-root /helm-docs + +docker: + @hash docker 2>/dev/null || {\ + echo "You need docker" &&\ + exit 1;\ + } diff --git a/charts/clastix/kamaji-console/README.md b/charts/clastix/kamaji-console/README.md new file mode 100644 index 000000000..764c072a1 --- /dev/null +++ b/charts/clastix/kamaji-console/README.md @@ -0,0 +1,108 @@ +# kamaji-console + +![Version: 0.0.4](https://img.shields.io/badge/Version-0.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.0.1](https://img.shields.io/badge/AppVersion-v0.0.1-informational?style=flat-square) + +Kamaji deploys and operates Kubernetes at scale with a fraction of the operational burden. This chart install a console for Kamaji. + +## Install the console + +This chart requires a Secret in your Kubernetes cluster that contains the configuration and credentials to access the console. You can have the chart generate it for you, or create it yourself and provide the name of the Secret during installation. + +Replace placeholders with actual values, and execute the following: + +```bash +# The secret is required, otherwise the installation will fail +cat < + namespace: +data: + # Credentials to login into console + ADMIN_EMAIL: + ADMIN_PASSWORD: + # Secret used to sign the browser session + JWT_SECRET: + # URL where the console is accessible: https:///ui + NEXTAUTH_URL: +EOF +``` + +Make sure you set `credentialsSecret.name` value to the name of the secret . + +To install the Chart with the release name `kamaji-console` in the `kamaji-system` namespace: + + helm repo add clastix https://clastix.github.io/charts + helm repo update + helm install console clastix/kamaji-console -n kamaji-system --create-namespace + +Show the status: + + helm status console -n kamaji-system + +Upgrade the Chart + + helm upgrade console -n kamaji-system clastix/kamaji-console + +Uninstall the Chart + + helm uninstall console -n kamaji-system + +## Customize the installation + +Here the values you can override: + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| credentialsSecret.email | string | `""` | | +| credentialsSecret.generate | bool | `false` | | +| credentialsSecret.jwtSecret | string | `""` | | +| credentialsSecret.name | string | `"kamaji-console"` | | +| credentialsSecret.nextAuthUrl | string | `""` | | +| credentialsSecret.password | string | `""` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"clastix/kamaji-console"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | type=kubernetes.io/dockerconfigjson | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"kamaji.localhost"` | | +| ingress.hosts[0].paths[0].path | string | `"/ui"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podSecurityContext | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `80` | | +| service.targetPort | int | `3000` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Dario Tranchitella | | | +| Adriano Pezzuto | | | + +## Source Code + +* \ No newline at end of file diff --git a/charts/clastix/kamaji-console/README.md.gotmpl b/charts/clastix/kamaji-console/README.md.gotmpl new file mode 100644 index 000000000..0fd4e649c --- /dev/null +++ b/charts/clastix/kamaji-console/README.md.gotmpl @@ -0,0 +1,62 @@ +{{ template "chart.header" . }} +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.badgesSection" . }} + +{{ template "chart.description" . }} + +## Install the console + +This chart requires a Secret in your Kubernetes cluster that contains the configuration and credentials to access the console. You can have the chart generate it for you, or create it yourself and provide the name of the Secret during installation. + +Replace placeholders with actual values, and execute the following: + +```bash +# The secret is required, otherwise the installation will fail +cat < + namespace: +data: + # Credentials to login into console + ADMIN_EMAIL: + ADMIN_PASSWORD: + # Secret used to sign the browser session + JWT_SECRET: + # URL where the console is accessible: https:///ui + NEXTAUTH_URL: +EOF +``` + +Make sure you set `credentialsSecret.name` value to the name of the secret . + +To install the Chart with the release name `kamaji-console` in the `kamaji-system` namespace: + + helm repo add clastix https://clastix.github.io/charts + helm repo update + helm install console clastix/kamaji-console -n kamaji-system --create-namespace + +Show the status: + + helm status console -n kamaji-system + +Upgrade the Chart + + helm upgrade console -n kamaji-system clastix/kamaji-console + +Uninstall the Chart + + helm uninstall console -n kamaji-system + +## Customize the installation + +Here the values you can override: + +{{ template "chart.valuesSection" . }} + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} \ No newline at end of file diff --git a/charts/clastix/kamaji-console/app-readme.md b/charts/clastix/kamaji-console/app-readme.md new file mode 100644 index 000000000..006d701b5 --- /dev/null +++ b/charts/clastix/kamaji-console/app-readme.md @@ -0,0 +1,13 @@ +# Kamaji Console + +Kamaji deploys and operates Kubernetes at scale with a fraction of the operational burden. This chart installs the Kamaji Console. + +Useful links: +- [Kamaji Github repository](https://github.com/clastix/kamaji) +- [Kamaji Console Github repository](https://github.com/clastix/kamaji-console) +- [Kamaji Documentation](https://kamaji.clastix.io) + +## Requirements + +* Kubernetes v1.22+ +* Helm v3 \ No newline at end of file diff --git a/charts/clastix/kamaji-console/questions.yml b/charts/clastix/kamaji-console/questions.yml new file mode 100644 index 000000000..5b17ae61f --- /dev/null +++ b/charts/clastix/kamaji-console/questions.yml @@ -0,0 +1,70 @@ +questions: + - variable: credentialsSecret.generate + label: Generate Console Config Secret + description: Generates a Secret that contains a Kamaji Console config and credentials (If the option to generate it is enabled, credentials will be visible in the API to authorized users) + type: boolean + default: false + required: true + group: "Console Configuration" + show_subquestion_if: true + subquestions: + + - variable: credentialsSecret.nextAuthUrl + label: NextAuthUrl + description: URL where the console is accessible, eg. https://kamaji.rancher.localhost + default: "https://kamaji.rancher.localhost" + type: string + group: "Console Configuration" + + - variable: credentialsSecret.jwtSecret + description: Secret used to sign the browser session + label: JWT Secret + type: string + group: "Console Configuration" + + - variable: credentialsSecret.email + label: email + description: Credentials (email) to login into console + type: string + group: "Console Configuration" + + - variable: credentialsSecret.password + label: password + description: Password to login into Console + type: password + group: "Console Configuration" + + - variable: credentialsSecret.name + label: Console Config Secret Name + description: Name of the Secret that contains a Console config and credentials (Will not be visible in the API. More info in the README) + type: string + default: kamaji-console + group: "Console Configuration" + show_if: "credentialsSecret.generate=false" + + - variable: ingress.enabled + default: false + description: If true, create ingress, must also set ingress host value + type: boolean + label: Manager Ingress Status + group: "Ingress Configuration" + show_subquestion_if: true + subquestions: + - variable: ingress.hosts[0].host + default: "kamaji.rancher.localhost" + description: Must set this host value if ingress is enabled + type: string + label: Manager Ingress Host + group: "Ingress Configuration" + - variable: ingress.hosts[0].paths[0].path + default: "/ui" + description: Set ingress path to /ui (required) + type: string + label: Manager Ingress Path + group: "Ingress Configuration" + - variable: ingress.hosts[0].paths[0].pathType + default: "ImplementationSpecific" + description: "Set ingress path type" + type: string + label: Manager Ingress Path type + group: "Ingress Configuration" diff --git a/charts/clastix/kamaji-console/templates/NOTES.txt b/charts/clastix/kamaji-console/templates/NOTES.txt new file mode 100644 index 000000000..b841b452a --- /dev/null +++ b/charts/clastix/kamaji-console/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "console.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT/ui +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "console.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "console.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }}/ui +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "console.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080/ui to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/clastix/kamaji-console/templates/_helpers.tpl b/charts/clastix/kamaji-console/templates/_helpers.tpl new file mode 100644 index 000000000..014c1d249 --- /dev/null +++ b/charts/clastix/kamaji-console/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "console.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 "console.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 "console.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "console.labels" -}} +helm.sh/chart: {{ include "console.chart" . }} +{{ include "console.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "console.selectorLabels" -}} +app.kubernetes.io/name: {{ include "console.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "console.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "console.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/clastix/kamaji-console/templates/deployment.yaml b/charts/clastix/kamaji-console/templates/deployment.yaml new file mode 100644 index 000000000..fba72c45e --- /dev/null +++ b/charts/clastix/kamaji-console/templates/deployment.yaml @@ -0,0 +1,64 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "console.fullname" . }} + labels: + {{- include "console.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "console.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "console.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 6 }} + {{- end }} + serviceAccountName: {{ include "console.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 3000 + protocol: TCP + #livenessProbe: + # httpGet: + # path: / + # port: http + #readinessProbe: + # httpGet: + # path: / + # port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} + envFrom: + - secretRef: + name: {{ .Values.credentialsSecret.name }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/clastix/kamaji-console/templates/hpa.yaml b/charts/clastix/kamaji-console/templates/hpa.yaml new file mode 100644 index 000000000..8561f56a0 --- /dev/null +++ b/charts/clastix/kamaji-console/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "console.fullname" . }} + labels: + {{- include "console.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "console.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/clastix/kamaji-console/templates/ingress.yaml b/charts/clastix/kamaji-console/templates/ingress.yaml new file mode 100644 index 000000000..887847da3 --- /dev/null +++ b/charts/clastix/kamaji-console/templates/ingress.yaml @@ -0,0 +1,44 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "console.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + app: kamaji-console + {{- include "console.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.ingress.className }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType }} + backend: + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/clastix/kamaji-console/templates/rbac.yaml b/charts/clastix/kamaji-console/templates/rbac.yaml new file mode 100644 index 000000000..54cda46ee --- /dev/null +++ b/charts/clastix/kamaji-console/templates/rbac.yaml @@ -0,0 +1,44 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "console.fullname" . }} + labels: + {{- include "console.labels" . | nindent 4 }} +rules: +- apiGroups: + - '*' + resources: + - namespaces + - deployments + - replicasets + - services + - pods + - secrets + - configmaps + verbs: + - get + - list + - watch +- apiGroups: + - kamaji.clastix.io + resources: + - tenantcontrolplanes + - datastores + verbs: + - '*' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "console.fullname" . }} + labels: + {{- include "console.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "console.fullname" . }} +subjects: +- namespace: {{ .Release.Namespace }} + kind: ServiceAccount + name: {{ include "console.serviceAccountName" . }} + diff --git a/charts/clastix/kamaji-console/templates/secret.yaml b/charts/clastix/kamaji-console/templates/secret.yaml new file mode 100644 index 000000000..129a55db6 --- /dev/null +++ b/charts/clastix/kamaji-console/templates/secret.yaml @@ -0,0 +1,15 @@ +{{- if .Values.credentialsSecret.generate -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.credentialsSecret.name }} + labels: + {{- include "console.labels" . | nindent 4 }} +data: + NEXTAUTH_URL: {{ .Values.credentialsSecret.nextAuthUrl | b64enc | quote }} + # Secret used to sign the browser session + JWT_SECRET: {{ .Values.credentialsSecret.jwtSecret | b64enc | quote }} + # Credentials to access the dashboard + ADMIN_EMAIL: {{ .Values.credentialsSecret.email | b64enc | quote }} + ADMIN_PASSWORD: {{ .Values.credentialsSecret.password | b64enc | quote }} +{{- end -}} diff --git a/charts/clastix/kamaji-console/templates/service.yaml b/charts/clastix/kamaji-console/templates/service.yaml new file mode 100644 index 000000000..e7ad56e37 --- /dev/null +++ b/charts/clastix/kamaji-console/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "console.fullname" . }} + labels: + {{- include "console.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.targetPort }} + protocol: TCP + name: http + selector: + {{- include "console.selectorLabels" . | nindent 4 }} diff --git a/charts/clastix/kamaji-console/templates/serviceaccount.yaml b/charts/clastix/kamaji-console/templates/serviceaccount.yaml new file mode 100644 index 000000000..cbe93f504 --- /dev/null +++ b/charts/clastix/kamaji-console/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "console.serviceAccountName" . }} + labels: + {{- include "console.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/clastix/kamaji-console/templates/tests/test-connection.yaml b/charts/clastix/kamaji-console/templates/tests/test-connection.yaml new file mode 100644 index 000000000..1283ecc02 --- /dev/null +++ b/charts/clastix/kamaji-console/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "console.fullname" . }}-test-connection" + labels: + {{- include "console.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "console.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/clastix/kamaji-console/values.yaml b/charts/clastix/kamaji-console/values.yaml new file mode 100644 index 000000000..eef099684 --- /dev/null +++ b/charts/clastix/kamaji-console/values.yaml @@ -0,0 +1,100 @@ +# Default values for console. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: clastix/kamaji-console + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +# create a secret containing token to pull the image from Docker Hub +# kubectl -n create secret generic \ +# --from-file=.dockerconfigjson= \ +# --type=kubernetes.io/dockerconfigjson +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +credentialsSecret: + generate: false + # name of the secret hosting sensitive info + name: "kamaji-console" + # URL where the console is accessible, eg. https://kamaji.labs.clastix.io/ + nextAuthUrl: "" + # Secret used to sign the browser session + jwtSecret: "" + # Credentials to login into console + email: "" + password: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + targetPort: 3000 + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: kamaji.localhost + paths: + - path: /ui + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - kamaji.localhost + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/index.yaml b/index.yaml index 4d540a21e..7209d0189 100644 --- a/index.yaml +++ b/index.yaml @@ -22225,6 +22225,59 @@ entries: urls: - assets/clastix/kamaji-0.10.1.tgz version: 0.10.1 + kamaji-console: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Kamaji Console + catalog.cattle.io/kube-version: '>=1.21.0-0' + catalog.cattle.io/release-name: kamaji-console + apiVersion: v2 + appVersion: v0.0.1 + created: "2023-06-19T14:39:44.889098422+02:00" + description: Kamaji deploys and operates Kubernetes at scale with a fraction of + the operational burden. This chart install a console for Kamaji. + digest: b3b499354a5b359f0a8b552eecc646c0082984ee0c22d85bbd8bca1497494929 + home: https://github.com/clastix/kamaji-console + icon: https://github.com/clastix/kamaji-console/raw/main/.github/images/icon.png + kubeVersion: '>=1.21.0-0' + maintainers: + - email: dario@tranchitella.eu + name: Dario Tranchitella + - email: me@bsctl.io + name: Adriano Pezzuto + name: kamaji-console + sources: + - https://github.com/clastix/kamaji-console + type: application + urls: + - assets/clastix/kamaji-console-0.0.4.tgz + version: 0.0.4 + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Kamaji Console + catalog.cattle.io/kube-version: '>=1.21.0-0' + catalog.cattle.io/release-name: kamaji-console + apiVersion: v2 + appVersion: v0.0.1 + created: "2023-06-19T14:29:43.008419723+02:00" + description: Kamaji deploys and operates Kubernetes at scale with a fraction of + the operational burden. This chart install a console for Kamaji. + digest: 46002955458fc5fde4eb0ace6f3abfb9befe17d9b21734ed03786f11e0ed5d24 + home: https://github.com/clastix/kamaji-console + icon: https://github.com/clastix/kamaji-console/raw/main/.github/images/icon.png + kubeVersion: '>=1.21.0-0' + maintainers: + - email: dario@tranchitella.eu + name: Dario Tranchitella + - email: me@bsctl.io + name: Adriano Pezzuto + name: kamaji-console + sources: + - https://github.com/clastix/kamaji-console + type: application + urls: + - assets/clastix/kamaji-console-0.0.3.tgz + version: 0.0.3 kibana: - annotations: catalog.cattle.io/certified: partner