From a3a68116a96d32c831c05129dc06cec21cd85577 Mon Sep 17 00:00:00 2001 From: Eden Federman Date: Sun, 5 May 2024 17:38:07 +0400 Subject: [PATCH] Add psp and imagePrefix support (#41) * add psp and imagePrefix support * change chart version --- README.md | 4 ++-- charts/odigos/Chart.yaml | 2 +- charts/odigos/templates/NOTES.txt | 2 +- charts/odigos/templates/autoscaler/deployment.yaml | 4 ++++ charts/odigos/templates/instrumentor/deployment.yaml | 4 ++++ charts/odigos/templates/odiglet/clusterrole.yaml | 10 ++++++++++ charts/odigos/templates/odiglet/daemonset.yaml | 4 ++++ charts/odigos/templates/odigos-config.yaml | 4 ++++ charts/odigos/templates/scheduler/deployment.yaml | 4 ++++ 9 files changed, 34 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a107188..683926a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Odigos Helm Chart -[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Release Charts](https://github.com/keyval-dev/odigos-charts/actions/workflows/release.yml/badge.svg?branch=master)](https://github.com/keyval-dev/odigos-charts/actions/workflows/release.yml) +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Release Charts](https://github.com/odigos-io/odigos-charts/actions/workflows/release.yml/badge.svg?branch=master)](https://github.com/odigos-io/odigos-charts/actions/workflows/release.yml) This repository contains the helm chart for Odigos - the observability control plane. @@ -8,7 +8,7 @@ This repository contains the helm chart for Odigos - the observability control p Add helm repository: ```console -helm repo add odigos https://keyval-dev.github.io/odigos-charts/ +helm repo add odigos https://odigos-io.github.io/odigos-charts/ ``` ### Install Odigos diff --git a/charts/odigos/Chart.yaml b/charts/odigos/Chart.yaml index 695aa6e..86e326d 100644 --- a/charts/odigos/Chart.yaml +++ b/charts/odigos/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.11 +version: 0.3.12 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/odigos/templates/NOTES.txt b/charts/odigos/templates/NOTES.txt index 7bfd461..c8ec0ba 100644 --- a/charts/odigos/templates/NOTES.txt +++ b/charts/odigos/templates/NOTES.txt @@ -1,6 +1,6 @@ Odigos installed successfully. For getting started go to the UI by running: -brew install keyval-dev/homebrew-odigos-cli/odigos +brew install odigos-io/homebrew-odigos-cli/odigos odigos ui Then, go to: http://localhost:3000 diff --git a/charts/odigos/templates/autoscaler/deployment.yaml b/charts/odigos/templates/autoscaler/deployment.yaml index 40cf297..a95dfed 100644 --- a/charts/odigos/templates/autoscaler/deployment.yaml +++ b/charts/odigos/templates/autoscaler/deployment.yaml @@ -27,7 +27,11 @@ spec: {{ end }} command: - /app + {{- if .Values.imagePrefix }} + image: "{{ .Values.imagePrefix }}/{{ .Values.autoscaler.image.repository }}:{{ .Values.image.tag }}" + {{- else }} image: "{{ .Values.autoscaler.image.repository }}:{{ .Values.image.tag }}" + {{- end }} env: - name: OTEL_SERVICE_NAME value: auto-scaler diff --git a/charts/odigos/templates/instrumentor/deployment.yaml b/charts/odigos/templates/instrumentor/deployment.yaml index 866a156..dd444b4 100644 --- a/charts/odigos/templates/instrumentor/deployment.yaml +++ b/charts/odigos/templates/instrumentor/deployment.yaml @@ -24,7 +24,11 @@ spec: - --leader-elect command: - /app + {{- if .Values.imagePrefix }} + image: "{{ .Values.imagePrefix }}/{{ .Values.instrumentor.image.repository }}:{{ .Values.image.tag }}" + {{- else }} image: "{{ .Values.instrumentor.image.repository }}:{{ .Values.image.tag }}" + {{- end }} env: - name: OTEL_SERVICE_NAME value: instrumentor diff --git a/charts/odigos/templates/odiglet/clusterrole.yaml b/charts/odigos/templates/odiglet/clusterrole.yaml index ea330f5..91cf4de 100644 --- a/charts/odigos/templates/odiglet/clusterrole.yaml +++ b/charts/odigos/templates/odiglet/clusterrole.yaml @@ -61,3 +61,13 @@ rules: - patch - update - watch +{{ if .Values.psp.enabled }} + - apiGroups: + - policy + resourceNames: + - privileged + resources: + - podsecuritypolicies + verbs: + - use +{{ end }} \ No newline at end of file diff --git a/charts/odigos/templates/odiglet/daemonset.yaml b/charts/odigos/templates/odiglet/daemonset.yaml index 97bef65..41761f6 100644 --- a/charts/odigos/templates/odiglet/daemonset.yaml +++ b/charts/odigos/templates/odiglet/daemonset.yaml @@ -21,7 +21,11 @@ spec: spec: containers: - name: odiglet + {{- if .Values.imagePrefix }} + image: "{{ .Values.imagePrefix }}/{{ .Values.odiglet.image.repository }}:{{ .Values.image.tag }}" + {{- else }} image: "{{ .Values.odiglet.image.repository }}:{{ .Values.image.tag }}" + {{- end }} env: - name: NODE_NAME valueFrom: diff --git a/charts/odigos/templates/odigos-config.yaml b/charts/odigos/templates/odigos-config.yaml index 16ad61d..643aa0a 100644 --- a/charts/odigos/templates/odigos-config.yaml +++ b/charts/odigos/templates/odigos-config.yaml @@ -8,6 +8,9 @@ metadata: spec: configVersion: 1 autoscalerImage: {{ .Values.autoscaler.image.repository }} + {{- if .Values.imagePrefix }} + imagePrefix: {{ .Values.imagePrefix }} + {{- end }} {{- if .Values.collectorGateway }} collectorGateway: {{- with .Values.collectorGateway.requestMemoryMiB }} @@ -26,6 +29,7 @@ spec: instrumentorImage: {{ .Values.instrumentor.image.repository }} odigosVersion: {{ .Values.image.tag }} telemetryEnabled: {{ .Values.telemetry.enabled }} + psp: {{ .Values.psp.enabled }} ignoredNamespaces: {{- toYaml .Values.instrumentor.ignoredNamespaces | nindent 8 }} defaultSDKs: diff --git a/charts/odigos/templates/scheduler/deployment.yaml b/charts/odigos/templates/scheduler/deployment.yaml index 1c1fa85..aa1a485 100644 --- a/charts/odigos/templates/scheduler/deployment.yaml +++ b/charts/odigos/templates/scheduler/deployment.yaml @@ -24,7 +24,11 @@ spec: - --leader-elect command: - /app + {{- if .Values.imagePrefix }} + image: "{{ .Values.imagePrefix }}/{{ .Values.scheduler.image.repository }}:{{ .Values.image.tag }}" + {{- else }} image: "{{ .Values.scheduler.image.repository }}:{{ .Values.image.tag }}" + {{- end }} env: - name: OTEL_SERVICE_NAME value: scheduler