From 143eb5c9ea2ea63e731a5f3b49ae1bf6d38a5574 Mon Sep 17 00:00:00 2001 From: Dawid Rusnak Date: Wed, 6 Nov 2024 15:38:53 +0100 Subject: [PATCH] chore: delete OAuth support for CLI --- .../helm-releaser-testkube-charts.yaml | 2 +- ...elm-releaser-testkube-main-chart-only.yaml | 2 +- charts/testkube-api/README.md | 11 ---- .../testkube-api/templates/cli-ingress.yaml | 58 ------------------- charts/testkube-api/values.yaml | 26 --------- charts/testkube/README.md | 10 ---- charts/testkube/values-demo.yaml | 23 -------- charts/testkube/values-develop.yaml | 23 -------- charts/testkube/values-stage.yaml | 23 -------- charts/testkube/values.yaml | 40 ------------- 10 files changed, 2 insertions(+), 216 deletions(-) delete mode 100644 charts/testkube-api/templates/cli-ingress.yaml diff --git a/.github/workflows/helm-releaser-testkube-charts.yaml b/.github/workflows/helm-releaser-testkube-charts.yaml index cc5e60317..ccfadddea 100644 --- a/.github/workflows/helm-releaser-testkube-charts.yaml +++ b/.github/workflows/helm-releaser-testkube-charts.yaml @@ -206,7 +206,7 @@ jobs: # Deploy the Docker image to the GKE cluster - name: Deploy run: |- - helm upgrade --install --atomic --timeout 180s testkube helm-charts/testkube --namespace testkube-integration --create-namespace --values ./charts/testkube/values-stage.yaml --debug --set testkube-api.cliIngress.oauth.clientID=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_ID }} --set testkube-api.cliIngress.oauth.clientSecret=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_SECRET }} --set mongodb.livenessProbe.enabled=false --set mongodb.readinessProbe.enabled=false --set testkube-operator.enabled=false + helm upgrade --install --atomic --timeout 180s testkube helm-charts/testkube --namespace testkube-integration --create-namespace --values ./charts/testkube/values-stage.yaml --debug --set mongodb.livenessProbe.enabled=false --set mongodb.readinessProbe.enabled=false --set testkube-operator.enabled=false notify_slack_if_deploy_dev_succeeds: runs-on: ubuntu-latest diff --git a/.github/workflows/helm-releaser-testkube-main-chart-only.yaml b/.github/workflows/helm-releaser-testkube-main-chart-only.yaml index f46488f53..6d2b85937 100644 --- a/.github/workflows/helm-releaser-testkube-main-chart-only.yaml +++ b/.github/workflows/helm-releaser-testkube-main-chart-only.yaml @@ -204,7 +204,7 @@ jobs: # Deploy the Docker image to the GKE cluster - name: Deploy run: |- - helm upgrade --install --atomic --timeout 180s testkube helm-charts/testkube --namespace testkube-integration --create-namespace --values ./charts/testkube/values-stage.yaml --debug --set testkube-api.cliIngress.oauth.clientID=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_ID }} --set testkube-api.cliIngress.oauth.clientSecret=${{ secrets.TESTKUBE_DEMO_OAUTH_CLIENT_SECRET }} --set mongodb.livenessProbe.enabled=false --set mongodb.readinessProbe.enabled=false --set testkube-operator.enabled=false + helm upgrade --install --atomic --timeout 180s testkube helm-charts/testkube --namespace testkube-integration --create-namespace --values ./charts/testkube/values-stage.yaml --debug --set mongodb.livenessProbe.enabled=false --set mongodb.readinessProbe.enabled=false --set testkube-operator.enabled=false notify_slack_if_deploy_dev_succeeds: runs-on: ubuntu-latest diff --git a/charts/testkube-api/README.md b/charts/testkube-api/README.md index be77b4a2e..be4085688 100644 --- a/charts/testkube-api/README.md +++ b/charts/testkube-api/README.md @@ -29,17 +29,6 @@ A Helm chart for Testkube api | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | autoscaling.targetMemoryUtilizationPercentage | int | `80` | | | cdeventsTarget | string | `""` | | -| cliIngress.annotations | object | `{}` | | -| cliIngress.enabled | bool | `false` | | -| cliIngress.hosts | list | `[]` | | -| cliIngress.labels | object | `{}` | | -| cliIngress.oauth.clientID | string | `""` | | -| cliIngress.oauth.clientSecret | string | `""` | | -| cliIngress.oauth.provider | string | `"github"` | | -| cliIngress.oauth.scopes | string | `""` | | -| cliIngress.path | string | `"/results/(v\\d/.*)"` | | -| cliIngress.tls | list | `[]` | | -| cliIngress.tlsenabled | bool | `false` | | | cloud.envId | string | `""` | | | cloud.existingSecret.envId | string | `""` | | | cloud.existingSecret.key | string | `""` | | diff --git a/charts/testkube-api/templates/cli-ingress.yaml b/charts/testkube-api/templates/cli-ingress.yaml deleted file mode 100644 index d2a260baf..000000000 --- a/charts/testkube-api/templates/cli-ingress.yaml +++ /dev/null @@ -1,58 +0,0 @@ -{{- if .Values.cliIngress.enabled -}} -apiVersion: {{ include "global.capabilities.ingress.apiVersion" . }} -kind: Ingress -metadata: - name: cli-{{ include "testkube-api.fullname" $ }}-{{ .Release.Name }} - labels: - {{- include "testkube-api.labels" . | nindent 4 }} - {{- if .Values.cliIngress.labels }} - {{- include "global.tplvalues.render" ( dict "value" .Values.cliIngress.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.global.labels }} - {{- include "global.tplvalues.render" ( dict "value" .Values.global.labels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if and .Values.cliIngress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.Version)) }} - kubernetes.io/ingress.class: {{ .Values.cliIngress.className }} - {{- end }} - {{- if .Values.cliIngress.annotations }} - {{- include "global.tplvalues.render" (dict "value" .Values.cliIngress.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.global.annotations }} - {{- include "global.tplvalues.render" ( dict "value" .Values.global.annotations "context" $ ) | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.cliIngress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.Version) }} - ingressClassName: {{ .Values.cliIngress.className }} - {{- end }} - {{- if .Values.cliIngress.tls }} - tls: - {{- if .Values.cliIngress.tlsenabled }} - {{- range .Values.cliIngress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - {{- end }} - rules: - {{- range .Values.cliIngress.hosts }} - - host: {{ . | quote }} - http: - paths: - - path: {{ $.Values.cliIngress.path }} - pathType: Prefix - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.Version }} - service: - name: {{ include "testkube-api.fullname" $ }} - port: - number: {{ $.Values.service.port }} - {{- else }} - serviceName: {{ include "testkube-api.fullname" $ }} - servicePort: {{ $.Values.service.port }} - {{- end }} - {{- end }} - {{- end }} diff --git a/charts/testkube-api/values.yaml b/charts/testkube-api/values.yaml index 69c731f40..32c7e29f6 100644 --- a/charts/testkube-api/values.yaml +++ b/charts/testkube-api/values.yaml @@ -627,32 +627,6 @@ uiIngress: # - testkube.example.com # secretName: testkube-cert-secret -## cliIngress parameters -cliIngress: - ## Use cliIngress - enabled: false - ## Labels to add to the Ingress - labels: {} - ## Annotations to add to the Ingress - annotations: {} - ## Parameters to check oauth token (by default github one) - oauth: - clientID: "" - clientSecret: "" - provider: "github" - scopes: "" - ## The Path to Nginx. - path: /results/(v\d/.*) - ## Hostnames must be provided if Ingress is enabled. - hosts: [] - # - testkube.example.com - tlsenabled: false - # Placing a host in the TLS config will indicate a certificate should be created - tls: [] - # - hosts: - # - testkube.example.com - # secretName: testkube-cert-secret - ## Prometheus monitoring prometheus: ## Toggle whether to install ServiceMonitor diff --git a/charts/testkube/README.md b/charts/testkube/README.md index dd1bf401c..c00083fd7 100644 --- a/charts/testkube/README.md +++ b/charts/testkube/README.md @@ -219,16 +219,6 @@ kubectl label --overwrite crds scripts.tests.testkube.io app.kubernetes.io/manag | testkube-api.additionalVolumes | list | `[]` | Additional volumes to be added | | testkube-api.analyticsEnabled | bool | `true` | Enable analytics for Testkube | | testkube-api.cdeventsTarget | string | `""` | target for cdevents emission via http(s) | -| testkube-api.cliIngress.annotations | object | `{}` | Additional annotations for the Ingress resource. | -| testkube-api.cliIngress.enabled | bool | `false` | Use ingress | -| testkube-api.cliIngress.hosts | list | `["testkube.example.com"]` | Hostnames must be provided if Ingress is enabled. | -| testkube-api.cliIngress.oauth.clientID | string | `""` | OAuth Client ID | -| testkube-api.cliIngress.oauth.clientSecret | string | `""` | OAuth Client Secret | -| testkube-api.cliIngress.oauth.provider | string | `"github"` | OAuth Provider | -| testkube-api.cliIngress.oauth.scopes | string | `""` | OAuth Scopes | -| testkube-api.cliIngress.path | string | `"/results/(v\\d/.*)"` | | -| testkube-api.cliIngress.tls | list | `[]` | Placing a host in the TLS config will indicate a certificate should be created | -| testkube-api.cliIngress.tlsenabled | bool | `false` | Toggle whether to enable TLS on the ingress | | testkube-api.cloud.key | string | `""` | Testkube Clouc License Key (for Environment) | | testkube-api.cloud.tls.certificate.caFile | string | `"/tmp/agent-cert/ca.crt"` | Default path for ca file | | testkube-api.cloud.tls.certificate.certFile | string | `"/tmp/agent-cert/cert.crt"` | Default path for certificate file | diff --git a/charts/testkube/values-demo.yaml b/charts/testkube/values-demo.yaml index 1eec34ef9..50552b6fe 100644 --- a/charts/testkube/values-demo.yaml +++ b/charts/testkube/values-demo.yaml @@ -292,29 +292,6 @@ testkube-api: - hosts: - demo.testkube.io secretName: testkube-demo-cert-secret - cliIngress: - enabled: true - annotations: - kubernetes.io/ingress.class: nginx - nginx.ingress.kubernetes.io/rewrite-target: /$1 - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/configuration-snippet: | - more_set_input_headers "X-CLI-Ingress: true"; - # parameters to check oauth token (by default github one) - oauth: - clientID: "" - clientSecret: "" - provider: "github" - scopes: "" - path: /api/(v\d/.*) - hosts: - - demo.testkube.io - tlsenabled: "false" - tls: # < placing a host in the TLS config will indicate a certificate should be created - - hosts: - - demo.testkube.io - secretName: testkube-demo-cert-secret storage: endpoint: "" endpoint_port: "9000" diff --git a/charts/testkube/values-develop.yaml b/charts/testkube/values-develop.yaml index aac288cc0..89d9bbb03 100644 --- a/charts/testkube/values-develop.yaml +++ b/charts/testkube/values-develop.yaml @@ -237,29 +237,6 @@ testkube-api: - hosts: - demo.testkube.dev secretName: testkube-prod-cert-secret - cliIngress: - enabled: false - annotations: - kubernetes.io/ingress.class: nginx - nginx.ingress.kubernetes.io/rewrite-target: /$1 - nginx.ingress.kubernetes.io/force-ssl-redirect: "false" - nginx.ingress.kubernetes.io/ssl-redirect: "false" - nginx.ingress.kubernetes.io/configuration-snippet: | - more_set_headers "X-CLI-Ingress: true"; - # parameters to check oauth token (by default github one) - oauth: - clientID: "" - clientSecret: "" - provider: "github" - scopes: "" - path: /results/(v\d/.*) - hosts: - - demo.testkube.dev - tlsenabled: "false" - tls: # < placing a host in the TLS config will indicate a certificate should be created - - hosts: - - demo.testkube.dev - secretName: testkube-prod-cert-secret storage: endpoint: "" endpoint_port: "9000" diff --git a/charts/testkube/values-stage.yaml b/charts/testkube/values-stage.yaml index efd0394d6..e8d3e4c16 100644 --- a/charts/testkube/values-stage.yaml +++ b/charts/testkube/values-stage.yaml @@ -236,29 +236,6 @@ testkube-api: - hosts: - demo.testkube.xyz secretName: testkube-demo-cert-secret - cliIngress: - enabled: false - annotations: - kubernetes.io/ingress.class: nginx - nginx.ingress.kubernetes.io/rewrite-target: /$1 - nginx.ingress.kubernetes.io/force-ssl-redirect: "false" - nginx.ingress.kubernetes.io/ssl-redirect: "false" - nginx.ingress.kubernetes.io/configuration-snippet: | - more_set_headers "X-CLI-Ingress: true"; - # parameters to check oauth token (by default github one) - oauth: - clientID: "" - clientSecret: "" - provider: "github" - scopes: "" - path: /results/(v\d/.*) - hosts: - - demo.testkube.io - tlsenabled: "false" - tls: # < placing a host in the TLS config will indicate a certificate should be created - - hosts: - - demo.testkube.io - secretName: testkube-demo-cert-secret storage: endpoint: "" endpoint_port: "9000" diff --git a/charts/testkube/values.yaml b/charts/testkube/values.yaml index 7ee85d698..50b84f657 100644 --- a/charts/testkube/values.yaml +++ b/charts/testkube/values.yaml @@ -685,46 +685,6 @@ testkube-api: # - testkube.example.com # secretName: testkube-cert-secret - # cliIngress parameters - cliIngress: - # -- Use ingress - enabled: false - # -- Additional annotations for the Ingress resource. - annotations: {} - # e.g. annotations for NGINX Ingress Controller: - # kubernetes.io/ingress.class: nginx - # nginx.ingress.kubernetes.io/rewrite-target: /$1 - # nginx.ingress.kubernetes.io/force-ssl-redirect: "false" - # nginx.ingress.kubernetes.io/ssl-redirect: "false" - # nginx.ingress.kubernetes.io/configuration-snippet: | - # more_set_headers "X-CLI-Ingress: true"; - # for websockets - # nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" - # nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" - - # parameters to check oauth token (by default github one) - oauth: - # -- OAuth Client ID - clientID: "" - # -- OAuth Client Secret - clientSecret: "" - # -- OAuth Provider - provider: "github" - # -- OAuth Scopes - scopes: "" - path: /results/(v\d/.*) - # -- Hostnames must be provided if Ingress is enabled. - hosts: - - testkube.example.com - # -- Toggle whether to enable TLS on the ingress - tlsenabled: false - # -- Placing a host in the TLS config will indicate a certificate should be created - tls: - [] - # - hosts: - # - testkube.example.com - # secretName: testkube-cert-secret - # Storage for Testkube API using MinIO storage: # -- MinIO endpoint