From b2d43f39de7c49266b1dad1c396e72fc26b5cf46 Mon Sep 17 00:00:00 2001 From: Mikhail Klimko Date: Fri, 11 Apr 2025 15:53:28 +0300 Subject: [PATCH] onprem: 2.7.8 --- codefresh/Chart.yaml | 6 +++--- codefresh/README.md | 5 +++-- codefresh/templates/ingress.yaml | 3 +++ codefresh/tests/ingress/ingress_test.yaml | 15 ++++++++++++++- codefresh/values.yaml | 2 ++ 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/codefresh/Chart.yaml b/codefresh/Chart.yaml index eddc47ff3d..89e9ef3c71 100644 --- a/codefresh/Chart.yaml +++ b/codefresh/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: Helm Chart for Codefresh On-Prem name: codefresh -version: 2.7.7 +version: 2.7.8 keywords: - codefresh home: https://codefresh.io/ @@ -18,8 +18,8 @@ annotations: artifacthub.io/containsSecurityUpdates: "true" # supported kinds are added, changed, deprecated, removed, fixed and security. artifacthub.io/changes: | - - kind: security - description: "Contains security updates" + - kind: added + description: "Add option to specify labels for Ingress object" dependencies: - name: cf-common repository: oci://quay.io/codefresh/charts diff --git a/codefresh/README.md b/codefresh/README.md index 16e43e138b..3943e9c30b 100644 --- a/codefresh/README.md +++ b/codefresh/README.md @@ -1,6 +1,6 @@ ## Codefresh On-Premises -![Version: 2.7.7](https://img.shields.io/badge/Version-2.7.7-informational?style=flat-square) ![AppVersion: 2.7.0](https://img.shields.io/badge/AppVersion-2.7.0-informational?style=flat-square) +![Version: 2.7.8](https://img.shields.io/badge/Version-2.7.8-informational?style=flat-square) ![AppVersion: 2.7.0](https://img.shields.io/badge/AppVersion-2.7.0-informational?style=flat-square) Helm chart for deploying [Codefresh On-Premises](https://codefresh.io/docs/docs/getting-started/intro-to-codefresh/) to Kubernetes. @@ -2290,11 +2290,12 @@ After platform upgrade, Consul fails with the error `refusing to rejoin cluster | hermes | object | See below | hermes | | hooks | object | See below | Pre/post-upgrade Job hooks. Updates images in `system/default` runtime. | | imageCredentials | object | `{}` | Credentials for Image Pull Secret object | -| ingress | object | `{"annotations":{"nginx.ingress.kubernetes.io/service-upstream":"true","nginx.ingress.kubernetes.io/ssl-redirect":"false","nginx.org/redirect-to-https":"false"},"enabled":true,"ingressClassName":"nginx-codefresh","nameOverride":"","services":{"internal-gateway":["/"]},"tls":{"cert":"","enabled":false,"existingSecret":"","key":"","secretName":"star.codefresh.io"}}` | Ingress | +| ingress | object | `{"annotations":{"nginx.ingress.kubernetes.io/service-upstream":"true","nginx.ingress.kubernetes.io/ssl-redirect":"false","nginx.org/redirect-to-https":"false"},"enabled":true,"ingressClassName":"nginx-codefresh","labels":{},"nameOverride":"","services":{"internal-gateway":["/"]},"tls":{"cert":"","enabled":false,"existingSecret":"","key":"","secretName":"star.codefresh.io"}}` | Ingress | | ingress-nginx | object | See below | ingress-nginx Ref: https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml | | ingress.annotations | object | See below | Set annotations for ingress. | | ingress.enabled | bool | `true` | Enable the Ingress | | ingress.ingressClassName | string | `"nginx-codefresh"` | Set the ingressClass that is used for the ingress. Default `nginx-codefresh` is created from `ingress-nginx` controller subchart | +| ingress.labels | object | `{}` | Set labels for ingress | | ingress.nameOverride | string | `""` | Override Ingress resource name | | ingress.services | object | See below | Default services and corresponding paths | | ingress.tls.cert | string | `""` | Certificate (base64 encoded) | diff --git a/codefresh/templates/ingress.yaml b/codefresh/templates/ingress.yaml index 0c8c7feebc..1b871e374e 100644 --- a/codefresh/templates/ingress.yaml +++ b/codefresh/templates/ingress.yaml @@ -9,6 +9,9 @@ metadata: name: {{ $ingressName }} labels: {{ include "codefresh.labels" . | nindent 4 }} + {{- with .Values.ingress.labels }} + {{ toYaml . | nindent 4 }} + {{- end }} {{- with .Values.ingress.annotations }} annotations: {{ toYaml . | nindent 4 }} diff --git a/codefresh/tests/ingress/ingress_test.yaml b/codefresh/tests/ingress/ingress_test.yaml index 979f6ba7a2..c377f7a0a6 100644 --- a/codefresh/tests/ingress/ingress_test.yaml +++ b/codefresh/tests/ingress/ingress_test.yaml @@ -41,4 +41,17 @@ tests: enabled: true asserts: - failedTemplate: - errorMessage: "A valid .Values.ingress.tls.cert is required!" \ No newline at end of file + errorMessage: "A valid .Values.ingress.tls.cert is required!" + + - it: ingress with extra labels + template: templates/ingress.yaml + set: + global: + appUrl: mydomain.local + ingress: + labels: + foo: bar + asserts: + - equal: + path: metadata.labels.foo + value: bar diff --git a/codefresh/values.yaml b/codefresh/values.yaml index c18cff0a08..cca4d15461 100644 --- a/codefresh/values.yaml +++ b/codefresh/values.yaml @@ -122,6 +122,8 @@ ingress: nginx.ingress.kubernetes.io/service-upstream: "true" nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.org/redirect-to-https: "false" + # -- Set labels for ingress + labels: {} # -- Global parameters # @default -- See below