From f0aa07c82fa3314a485feb628c6770f5bf044376 Mon Sep 17 00:00:00 2001 From: sa069q Date: Tue, 18 May 2021 17:42:32 +0530 Subject: [PATCH] Changes in dex function to work for both target cluster as well as sub-clusters along with few enhancements Depends-On: https://review.opendev.org/c/airship/airshipctl/+/792316 Change-Id: I13f97faec5523b6ae86cd0a578d4b76c8c1344a2 --- .../function/dex-aio/dex-cert-issuer.yaml | 5 ++--- .../function/dex-aio/dex-helmrelease.yaml | 22 ++----------------- manifests/function/dex-aio/kustomization.yaml | 2 +- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/manifests/function/dex-aio/dex-cert-issuer.yaml b/manifests/function/dex-aio/dex-cert-issuer.yaml index f02c17aa6..a50176010 100644 --- a/manifests/function/dex-aio/dex-cert-issuer.yaml +++ b/manifests/function/dex-aio/dex-cert-issuer.yaml @@ -1,8 +1,7 @@ apiVersion: cert-manager.io/v1alpha2 kind: Issuer metadata: - name: workload-cluster-ca-issuer - namespace: default + name: dex spec: ca: - secret: dex-apiserver-secret + secretName: dex-apiserver-secret diff --git a/manifests/function/dex-aio/dex-helmrelease.yaml b/manifests/function/dex-aio/dex-helmrelease.yaml index b4f70f0c8..8bd2883ee 100644 --- a/manifests/function/dex-aio/dex-helmrelease.yaml +++ b/manifests/function/dex-aio/dex-helmrelease.yaml @@ -1,18 +1,3 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: dex ---- -# Dex Helm Charts from Helm Repository (Helm Collator) -apiVersion: source.toolkit.fluxcd.io/v1beta1 -kind: HelmRepository -metadata: - name: dex-helm-repo - namespace: collator -spec: - interval: 5m - url: http://helm-chart-collator.collator.svc:8080 ---- # Dex Helm Charts from Git Repository # apiVersion: source.toolkit.fluxcd.io/v1beta1 # kind: GitRepository @@ -29,10 +14,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: dex-aio - namespace: default spec: - releaseName: dex-aio - targetNamespace: dex interval: 5m chart: spec: @@ -40,7 +22,7 @@ spec: # Referencing Dex Helm charts from Helm Collator repo sourceRef: kind: HelmRepository - name: dex-helm-repo + name: helm-repo namespace: collator # Referencing Dex Helm charts from Git repo # sourceRef: @@ -60,7 +42,7 @@ spec: tls: cert_manager: true issuer: - name: workload-cluster-ca-issuer + name: dex kind: Issuer oidc: client_id: function-kubernetes diff --git a/manifests/function/dex-aio/kustomization.yaml b/manifests/function/dex-aio/kustomization.yaml index cad19f37f..101cb3239 100644 --- a/manifests/function/dex-aio/kustomization.yaml +++ b/manifests/function/dex-aio/kustomization.yaml @@ -2,5 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- dex-cert-issuer.yaml - dex-helmrelease.yaml +- dex-cert-issuer.yaml