diff --git a/.github/workflows/build-chart.yaml b/.github/workflows/build-chart.yaml deleted file mode 100644 index 48484395355b1147c243d779fcdec9faba85e707..0000000000000000000000000000000000000000 --- a/.github/workflows/build-chart.yaml +++ /dev/null @@ -1,62 +0,0 @@ -name: Build NMaaS Helm Chart -on: - push: - branches: - - '**' -jobs: - test_chart: - runs-on: ubuntu-22.04 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: "0" - - - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Set up Helm - uses: azure/setup-helm@v3 - with: - version: v3.9.2 - - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.3.1 - - - name: Add Helm repository - run: helm repo add nmaas-helm-mirror https://artifactory.software.geant.org/artifactory/nmaas-helm-mirror - - - name: Lint Helm chart - run: ct lint --debug --target-branch master - - - name: Check for chart changes - id: list-changed - run: | - changed=$(ct list-changed --target-branch master) - if [[ -n "$changed" ]]; then - echo ::set-output name=changed::true - fi - - - name: Install helm-docs - run: | - if [ not $(which helmd-docs) ] - then - mkdir -p ~/.local/bin - wget -O /tmp/helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v1.11.0/helm-docs_1.11.0_Linux_x86_64.tar.gz - tar -xvzf /tmp/helm-docs.tar.gz -C ~/.local/bin - rm ~/.local/bin/README.md ~/.local/bin/LICENSE - echo "${HOME}/.local/bin" >> $GITHUB_PATH - fi - shell: bash - if: steps.list-changed.outputs.changed == 'true' - - - name: Generate helm-docs - run: helm-docs --output-file ../../README.md - if: steps.list-changed.outputs.changed == 'true' - - - name: Commit changes made to readme files - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: update chart readme.md files automatically - if: steps.list-changed.outputs.changed == 'true' \ No newline at end of file diff --git a/README.md b/README.md index 2c7d797e6d6b60e30adab17d627e11452b7d67c2..4d9453656190db1ecd0706ed48a966097d44eb40 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # nmaas -  +  GÉANT Network Management as a Service Helm chart for Kubernetes @@ -23,6 +23,10 @@ GÉANT Network Management as a Service Helm chart for Kubernetes | global.acmeIssuer | bool | `true` | set to no if a wildcard certificate is available | | global.createIngressResources | bool | `true` | | | global.demoDeployment | bool | `false` | | +| global.gitlabApiToken.literal | string | `""` | | +| global.gitlabApiToken.secret.key | string | `"secret"` | | +| global.gitlabApiToken.secret.name | string | `"nmaas-gitlab-api-token"` | | +| global.gitlabApiUrl | string | `"https://gitlab.example.com/api/v4"` | | | global.helmAccessKeyPrivate | string | `"nmaas-helm-key-private"` | | | global.helmAccessKeyPublic | string | `"nmaas-helm-key-public"` | | | global.ingressName | string | `"nmaas-ingress"` | prefix for the created ingress objects | @@ -51,10 +55,6 @@ GÉANT Network Management as a Service Helm chart for Kubernetes | janitor.image.tag | string | `"1.6.1"` | | | janitor.name | string | `"nmaas-janitor"` | | | janitor.port | int | `5000` | | -| janitor.properties.gitlabApiUrl | string | `"http://nmaas-gitlab-webservice-default:8181/api/v4"` | | -| janitor.properties.gitlabToken.literal | string | `""` | | -| janitor.properties.gitlabToken.secret.key | string | `"secret"` | | -| janitor.properties.gitlabToken.secret.name | string | `"nmaas-gitlab-janitor-token"` | | | janitor.serviceAccountName | string | `"nmaas-janitor"` | | | janitor.targetPort | int | `5000` | | | janitor.type | string | `"ClusterIP"` | | @@ -67,7 +67,7 @@ GÉANT Network Management as a Service Helm chart for Kubernetes | platform.enabled | bool | `true` | | | platform.image.pullPolicy | string | `"IfNotPresent"` | | | platform.image.repository | string | `"artifactory.software.geant.org/nmaas-docker-local/nmaas-platform"` | | -| platform.image.tag | string | `"1.6.1"` | | +| platform.image.tag | string | `"1.6.2"` | | | platform.ingress.className | string | `""` | defaults to .Values.platform.properties.k8s.ingress.controller.ingressClass if not set | | platform.initscripts.enabled | bool | `true` | | | platform.initscripts.image.pullPolicy | string | `"Always"` | | @@ -93,8 +93,6 @@ GÉANT Network Management as a Service Helm chart for Kubernetes | platform.properties.captchaSecret.secret.key | string | `"secret"` | | | platform.properties.captchaSecret.secret.name | string | `"nmaas-captcha-secret-secret"` | | | platform.properties.defaultLanguage | string | `"en"` | | -| platform.properties.gitlab.host | string | `"nmaas-gitlab-webservice-default"` | replace with service name from GitLab, e.g <MY_GITLAB_RELEASE>-webservice-default | -| platform.properties.gitlab.port | int | `8080` | | | platform.properties.helm.address | string | `"nmaas-helm"` | | | platform.properties.helm.asyncUpdateCron | string | `"0 0 * * * ?"` | | | platform.properties.helm.asyncUpdateEnabled | bool | `true` | | @@ -155,7 +153,7 @@ GÉANT Network Management as a Service Helm chart for Kubernetes | portal.enabled | bool | `true` | | | portal.image.pullPolicy | string | `"IfNotPresent"` | | | portal.image.repository | string | `"artifactory.software.geant.org/nmaas-docker-local/nmaas-portal"` | | -| portal.image.tag | string | `"1.6.1"` | | +| portal.image.tag | string | `"1.6.2"` | | | portal.ingress.className | string | `""` | defaults to .Values.platform.properties.k8s.ingress.controller.ingressClass if not set | | portal.name | string | `"nmaas-portal"` | | | portal.port | int | `9009` | | diff --git a/charts/nmaas/Chart.yaml b/charts/nmaas/Chart.yaml index b374ee0ad53f848cfb6e18f3e6b8937709cb76ba..38782df50e5fc6613057c4e699ba80b0a8b5a862 100644 --- a/charts/nmaas/Chart.yaml +++ b/charts/nmaas/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: nmaas description: GÉANT Network Management as a Service Helm chart for Kubernetes -version: 1.2.10 -appVersion: 1.6.1 +version: 1.2.11-1 +appVersion: 1.6.2 keywords: - Network Management - Cloud Deployment diff --git a/charts/nmaas/templates/nmaas-gitlab-api-token-secret.yaml b/charts/nmaas/templates/nmaas-gitlab-api-token-secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..21c09381d8c491341ef31b1d85354f9dad7fa09c --- /dev/null +++ b/charts/nmaas/templates/nmaas-gitlab-api-token-secret.yaml @@ -0,0 +1,9 @@ +{{- if .Values.global.gitlabApiToken.literal }} +apiVersion: v1 +type: Opaque +kind: Secret +metadata: + name: {{ .Values.global.gitlabApiToken.secret.name | quote }} +data: + {{ .Values.global.gitlabApiToken.secret.key | quote }}: {{ .Values.global.gitlabApiToken.literal | b64enc | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/nmaas/templates/nmaas-gitlab-janitor-token-secret.yaml b/charts/nmaas/templates/nmaas-gitlab-janitor-token-secret.yaml deleted file mode 100644 index 109f2df114e623198939611bd02ccc67264df7d9..0000000000000000000000000000000000000000 --- a/charts/nmaas/templates/nmaas-gitlab-janitor-token-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -{{- if .Values.janitor.properties.gitlabToken.literal }} -apiVersion: v1 -type: Opaque -kind: Secret -metadata: - name: {{ .Values.janitor.properties.gitlabToken.secret.name | quote }} -data: - {{ .Values.janitor.properties.gitlabToken.secret.key | quote }}: {{ .Values.janitor.properties.gitlabToken.literal | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/nmaas/templates/nmaas-janitor-deployment.yaml b/charts/nmaas/templates/nmaas-janitor-deployment.yaml index cfc1fba076680cc11eca6b44693cf56c7145f2a8..5bdf1f38ed081c4c221aadddda65375ad8abd3a5 100644 --- a/charts/nmaas/templates/nmaas-janitor-deployment.yaml +++ b/charts/nmaas/templates/nmaas-janitor-deployment.yaml @@ -33,12 +33,12 @@ spec: - name: SERVER_PORT value: {{ .Values.janitor.port | quote }} - name: GITLAB_URL - value: {{ .Values.janitor.properties.gitlabApiUrl | default "http://nmaas-gitlab-unicorn:8181/api/v4" }} + value: {{ .Values.global.gitlabApiUrl | default "http://nmaas-gitlab-unicorn:8181/api/v4" }} - name: GITLAB_TOKEN valueFrom: secretKeyRef: - name: {{ .Values.janitor.properties.gitlabToken.secret.name }} - key: {{ .Values.janitor.properties.gitlabToken.secret.key }} + name: {{ .Values.global.gitlabApiToken.secret.name }} + key: {{ .Values.global.gitlabApiToken.secret.key }} imagePullSecrets: - name: {{ .Values.global.registrysecret }} {{- end -}} diff --git a/charts/nmaas/templates/nmaas-platform-deployment.yaml b/charts/nmaas/templates/nmaas-platform-deployment.yaml index ab09083c947fe5281fdb0aa88058400fa08c0418..91d4bffbc1ab829278b4233e1295a37eac6d87ad 100644 --- a/charts/nmaas/templates/nmaas-platform-deployment.yaml +++ b/charts/nmaas/templates/nmaas-platform-deployment.yaml @@ -174,15 +174,13 @@ spec: {{- end }} - name: METRICS_ENABLED value: {{ .Values.platform.properties.nmaasMetricsEnabled | default "false" | quote }} - - name: GITLAB_ADDRESS - value: {{ .Values.platform.properties.gitlab.host }} - - name: GITLAB_PORT - value: {{ .Values.platform.properties.gitlab.port | quote }} + - name: GITLAB_API_URL + value: {{ .Values.global.gitlabApiUrl | default "http://nmaas-gitlab-unicorn:8181/api/v4" }} - name: GITLAB_TOKEN valueFrom: secretKeyRef: - name: {{ .Values.janitor.properties.gitlabToken.secret.name }} - key: {{ .Values.janitor.properties.gitlabToken.secret.key }} + name: {{ .Values.global.gitlabApiToken.secret.name }} + key: {{ .Values.global.gitlabApiToken.secret.key }} - name: K8S_INGRESS_CONTROLLER_INGRESS_CLASS value: {{ .Values.platform.properties.k8s.ingress.controller.ingressClass }} - name: K8S_INGRESS_CONTROLLER_PUBLIC_INGRESS_CLASS diff --git a/charts/nmaas/values.yaml b/charts/nmaas/values.yaml index 271bf8bc54b206321e36711a2ce9ed26b2e090a5..e2f7fe34a0521873b8421c1fe38907fbd4a14f01 100644 --- a/charts/nmaas/values.yaml +++ b/charts/nmaas/values.yaml @@ -15,6 +15,12 @@ global: # -- currently not needed, for future use registrysecret: nmaas-registry demoDeployment: false + gitlabApiUrl: https://gitlab.example.com/api/v4 + gitlabApiToken: + literal: "" + secret: + name: nmaas-gitlab-api-token + key: secret platform: enabled: true @@ -52,7 +58,7 @@ platform: timeoutSeconds: 10 image: repository: artifactory.software.geant.org/nmaas-docker-local/nmaas-platform - tag: "1.6.1" + tag: "1.6.2" pullPolicy: IfNotPresent port: 9001 targetPort: 9001 @@ -138,10 +144,6 @@ platform: from: "" # -- exposed as SMTP_FROM_DEFAULT_DOMAIN in global deployment parameters defaultDomain: 'example.com' - gitlab: - # -- replace with service name from GitLab, e.g <MY_GITLAB_RELEASE>-webservice-default - host: nmaas-gitlab-webservice-default - port: 8080 k8s: ingress: controller: @@ -184,7 +186,7 @@ portal: name: nmaas-portal image: repository: artifactory.software.geant.org/nmaas-docker-local/nmaas-portal - tag: "1.6.1" + tag: "1.6.2" pullPolicy: IfNotPresent ingress: # -- defaults to .Values.platform.properties.k8s.ingress.controller.ingressClass if not set @@ -288,13 +290,6 @@ janitor: targetPort: 5000 serviceAccountName: nmaas-janitor type: ClusterIP - properties: - gitlabToken: - literal: "" - secret: - name: nmaas-gitlab-janitor-token - key: secret - gitlabApiUrl: http://nmaas-gitlab-webservice-default:8181/api/v4 # -- settings for in-cluster postgresql postgresql: