From 47cbabefb5e22becce98d99f3b4ed0b3a5d63132 Mon Sep 17 00:00:00 2001 From: Ahmed Mansour Date: Thu, 18 May 2023 20:35:33 +0300 Subject: [PATCH 1/2] fixes jenkins chart old version dependancies --- .../helm-chart/setup/requirements.yaml | 4 +- .../helm-chart/setup/templates/NOTES.txt | 6 +-- deploy/complete/helm-chart/setup/values.yaml | 42 ++++++++++--------- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/deploy/complete/helm-chart/setup/requirements.yaml b/deploy/complete/helm-chart/setup/requirements.yaml index 6da9fca15..8a814eae0 100644 --- a/deploy/complete/helm-chart/setup/requirements.yaml +++ b/deploy/complete/helm-chart/setup/requirements.yaml @@ -30,6 +30,6 @@ dependencies: repository: https://charts.jetstack.io # jenkins - name: jenkins - version: 2.1.0 + version: 4.3.23 condition: jenkins.enabled - repository: https://charts.helm.sh/stable + repository: https://charts.jenkins.io diff --git a/deploy/complete/helm-chart/setup/templates/NOTES.txt b/deploy/complete/helm-chart/setup/templates/NOTES.txt index 21d227779..3850062ca 100644 --- a/deploy/complete/helm-chart/setup/templates/NOTES.txt +++ b/deploy/complete/helm-chart/setup/templates/NOTES.txt @@ -69,13 +69,13 @@ how to access the Jenkins application. kubectl get secret -n {{ .Release.Namespace }} {{ .Release.Name }}-jenkins \ -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode ; echo -- Ensure that Jenkins is up and running +- Ensure that Jenkins is up and running - kubectl get deployment -n {{ .Release.Namespace }} {{ .Release.Name }}-jenkins + kubectl get StatefulSet -n {{ .Release.Namespace }} {{ .Release.Name }}-jenkins - Access Jenkins with admin/: -- {{ if .Values.jenkins.master.ingress.enabled -}} +- {{ if .Values.jenkins.controller.ingress.enabled -}} Open http:///jenkins ( See above for how to locate the ) Or alternatively, {{ end -}} diff --git a/deploy/complete/helm-chart/setup/values.yaml b/deploy/complete/helm-chart/setup/values.yaml index 684635b03..8994a052e 100644 --- a/deploy/complete/helm-chart/setup/values.yaml +++ b/deploy/complete/helm-chart/setup/values.yaml @@ -123,31 +123,35 @@ grafana: - grafana-piechart-panel - btplc-status-dot-panel -# https://github.com/helm/charts/blob/master/stable/jenkins/README.md +# https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/README.md jenkins: enabled: false - master: + #https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/values.yaml + controller: serviceType: ClusterIP jenkinsUriPrefix: "/jenkins" ingress: # enable ingress only if the ingress-controller `nginx-ingress` is enabled. enabled: true - paths: - - path: /jenkins - backend: - serviceName: >- - {{ template "jenkins.fullname" . }} - servicePort: 8080 - apiVersion: "networking.k8s.io/v1beta1" + apiVersion: networking.k8s.io/v1 + #apiVersion: "networking.k8s.io/v1beta1" labels: {} - annotations: - kubernetes.io/ingress.class: nginx + spec: + ingressClassName: nginx + rules: + - http: + paths: + - path: /jenkins + pathType: Prefix + backend: + serviceName: >- + {{ template "jenkins.fullname" . }} + servicePort: 8080 installPlugins: - - kubernetes:1.26.1 - - workflow-job:2.39 - - workflow-aggregator:2.6 - - credentials-binding:1.23 - - git:4.2.2 - - configuration-as-code:1.41 - - blueocean:1.23.2 - + - kubernetes:3900.va_dce992317b_4 + - workflow-aggregator:596.v8c21c963d92d + - git:5.0.1 + - configuration-as-code:1625.v27444588cc3d + - blueocean:1.27.3 + - credentials-binding:604.vb_64480b_c56ca_ + - workflow-job:1292.v27d8cc3e2602 \ No newline at end of file From 18d23311200981966800ee9ce75a6bc4242c4ee1 Mon Sep 17 00:00:00 2001 From: Ahmed Mansour Date: Thu, 18 May 2023 22:17:59 +0300 Subject: [PATCH 2/2] updates the jenkins chart --- deploy/complete/helm-chart/setup/values.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/deploy/complete/helm-chart/setup/values.yaml b/deploy/complete/helm-chart/setup/values.yaml index 8994a052e..fd37d7c59 100644 --- a/deploy/complete/helm-chart/setup/values.yaml +++ b/deploy/complete/helm-chart/setup/values.yaml @@ -134,19 +134,22 @@ jenkins: # enable ingress only if the ingress-controller `nginx-ingress` is enabled. enabled: true apiVersion: networking.k8s.io/v1 - #apiVersion: "networking.k8s.io/v1beta1" + metadata: + annotations: + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/rewrite-target: /$2 labels: {} spec: - ingressClassName: nginx rules: - http: paths: - - path: /jenkins + - path: /jenkins(/|$)(.*) pathType: Prefix backend: - serviceName: >- - {{ template "jenkins.fullname" . }} - servicePort: 8080 + service: + name: mushop-setup-jenkins + port: + number: 8080 installPlugins: - kubernetes:3900.va_dce992317b_4 - workflow-aggregator:596.v8c21c963d92d @@ -154,4 +157,5 @@ jenkins: - configuration-as-code:1625.v27444588cc3d - blueocean:1.27.3 - credentials-binding:604.vb_64480b_c56ca_ - - workflow-job:1292.v27d8cc3e2602 \ No newline at end of file + - workflow-job:1292.v27d8cc3e2602 +