Skip to content

Commit

Permalink
feat: Add flexibility for the helm chart ocean-kubernetes-controller (#…
Browse files Browse the repository at this point in the history
…152)

* feat: Add flexibility for the helm chart ocean-kubernetes-controller (Spot Support #4674842)

* bump chart & update docs

---------

Co-authored-by: Anton Bakavets <[email protected]>
Co-authored-by: Roi Kramer <[email protected]>
  • Loading branch information
3 people authored Aug 22, 2024
1 parent e9d43c1 commit 26a4cbf
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/ocean-kubernetes-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: ocean-kubernetes-controller
description: A Helm chart for Ocean Kubernetes Controller
type: application
version: 0.1.52
version: 0.1.53
appVersion: 2.0.65
kubeVersion: ">=1.20.0-0"
maintainers:
Expand Down
6 changes: 4 additions & 2 deletions charts/ocean-kubernetes-controller/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ocean-kubernetes-controller

![Version: 0.1.52](https://img.shields.io/badge/Version-0.1.52-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.65](https://img.shields.io/badge/AppVersion-2.0.65-informational?style=flat-square)
![Version: 0.1.53](https://img.shields.io/badge/Version-0.1.53-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.65](https://img.shields.io/badge/AppVersion-2.0.65-informational?style=flat-square)

A Helm chart for Ocean Kubernetes Controller.

Expand Down Expand Up @@ -85,6 +85,7 @@ Kubernetes: `>=1.20.0-0`
| caBundleSecret.data | string | `""` | Must contain the CA bundle data in case `caBundleSecret.create` is true. For example by using `--set caBundleSecret.data="$(cat ./ca.pem)"` |
| caBundleSecret.key | string | `"userEnvCertificates.pem"` | Key inside the secret to inject the CA bundle from |
| caBundleSecret.name | string | `""` | CA bundle Secret name. (Optional) |
| command | list | `[]` | |
| commonLabels | object | `{}` | |
| configMap.create | bool | `true` | |
| configMap.name | string | `""` | ConfigMap name. (Optional) |
Expand All @@ -97,11 +98,12 @@ Kubernetes: `>=1.20.0-0`
| image.repository | string | `"us-docker.pkg.dev/spotit-today/container-labs/spotinst-kubernetes-controller"` | |
| image.tag | string | `""` | |
| imagePullSecrets | list | `[]` | |
| initContainers | list | `[]` | |
| livenessProbe.httpGet.path | string | `"/healthz"` | |
| livenessProbe.httpGet.port | string | `"readiness"` | |
| livenessProbe.initialDelaySeconds | int | `15` | |
| livenessProbe.periodSeconds | int | `20` | |
| logShipping | object | `{"destination":{"host":"api.spotinst.io","port":443,"tls":true},"enabled":true,"image":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/fluent/fluent-bit","tag":"3.0.7"}}` | Log Shipping configuration. |
| logShipping | object | `{"command":["/fluent-bit/bin/fluent-bit","-c","/tmp/fluent-bit.conf","-q"],"destination":{"host":"api.spotinst.io","port":443,"tls":true},"enabled":true,"extraEnv":[],"extraVolumeMounts":[],"image":{"pullPolicy":"IfNotPresent","repository":"ghcr.io/fluent/fluent-bit","tag":"3.0.7"}}` | Log Shipping configuration. |
| logShipping.destination | object | `{"host":"api.spotinst.io","port":443,"tls":true}` | Log shipping destination configuration. |
| logShipping.enabled | bool | `true` | Specifies whether to send the controller logs to Spot for analysis. (Optional) |
| logShipping.image | object | `{"pullPolicy":"IfNotPresent","repository":"ghcr.io/fluent/fluent-bit","tag":"3.0.7"}` | Specifies the log shipping container image. (Optional) |
Expand Down
25 changes: 19 additions & 6 deletions charts/ocean-kubernetes-controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,20 @@ spec:
{{- with .Values.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
{{- with .Values.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ include "ocean-kubernetes-controller.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
args:
{{- range .Values.args }}
- {{ . }}
Expand Down Expand Up @@ -151,7 +159,7 @@ spec:
{{- end }}
volumeMounts:
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- if eq (include "ocean-kubernetes-controller.logShipping.enabled" .) "true" }}
- name: logs
Expand All @@ -165,11 +173,10 @@ spec:
- name: log-shipper
image: {{ .Values.logShipping.image.repository }}:{{ .Values.logShipping.image.tag }}
imagePullPolicy: {{ .Values.logShipping.image.pullPolicy }}
{{- with .Values.logShipping.command }}
command:
- /fluent-bit/bin/fluent-bit
- -c
- /tmp/fluent-bit.conf
- -q
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: SPOTINST_TOKEN
valueFrom:
Expand All @@ -196,6 +203,9 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- with .Values.logShipping.extraEnv }}
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
- name: logs
mountPath: /var/log
Expand All @@ -205,10 +215,13 @@ spec:
- name: fluentbit-config
mountPath: /tmp/parsers.conf
subPath: parsers.conf
{{- with .Values.logShipping.extraVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
volumes:
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if eq (include "ocean-kubernetes-controller.logShipping.enabled" .) "true" }}
- name: logs
Expand Down
14 changes: 14 additions & 0 deletions charts/ocean-kubernetes-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

initContainers: []

imagePullSecrets: []

serviceAccount:
Expand Down Expand Up @@ -100,6 +102,8 @@ securityContext:
drop:
- ALL

command: []

args: []
# - --test

Expand Down Expand Up @@ -212,6 +216,16 @@ logShipping:
port: 443
tls: true

extraVolumeMounts: []

extraEnv: []

command:
- /fluent-bit/bin/fluent-bit
- -c
- /tmp/fluent-bit.conf
- -q

# Auto Update process configuration.
autoUpdate:
# -- Configures the image for the auto-updater job. (Optional)
Expand Down

0 comments on commit 26a4cbf

Please sign in to comment.