diff --git a/helmchart/.helmignore b/helmchart/single-sign-on/.helmignore similarity index 100% rename from helmchart/.helmignore rename to helmchart/single-sign-on/.helmignore diff --git a/helmchart/Chart.yaml b/helmchart/single-sign-on/Chart.yaml similarity index 76% rename from helmchart/Chart.yaml rename to helmchart/single-sign-on/Chart.yaml index a200c6841926d6ebc2b33bc3064e0ecd9ba8daf7..849b93832ba7b77ebafa556f49a80f4332f971db 100644 --- a/helmchart/Chart.yaml +++ b/helmchart/single-sign-on/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: "1.0" +appVersion: "1.1" description: A Helm chart for OpenAppStacks Signle Sign on components name: single-sign-on -version: 0.1.0 +version: 0.1.1 diff --git a/helmchart/requirements.yaml b/helmchart/single-sign-on/requirements.yaml similarity index 100% rename from helmchart/requirements.yaml rename to helmchart/single-sign-on/requirements.yaml diff --git a/helmchart/templates/NOTES.txt b/helmchart/single-sign-on/templates/NOTES.txt similarity index 100% rename from helmchart/templates/NOTES.txt rename to helmchart/single-sign-on/templates/NOTES.txt diff --git a/helmchart/templates/_helpers.tpl b/helmchart/single-sign-on/templates/_helpers.tpl similarity index 100% rename from helmchart/templates/_helpers.tpl rename to helmchart/single-sign-on/templates/_helpers.tpl diff --git a/helmchart/templates/deployment-consent.yaml b/helmchart/single-sign-on/templates/deployment-consent.yaml similarity index 95% rename from helmchart/templates/deployment-consent.yaml rename to helmchart/single-sign-on/templates/deployment-consent.yaml index 44c5f7be873e2dfbd4df5b3a87ed7a42ad0f9ebf..e9e8da133c2f168abfeb4d6017a121bbd63b9fd1 100644 --- a/helmchart/templates/deployment-consent.yaml +++ b/helmchart/single-sign-on/templates/deployment-consent.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: {{ .Chart.Name }}-consent - image: "open.greenhost.net:4567/openappstack/single-sign-on/consent_provider:master" + image: "open.greenhost.net:4567/openappstack/single-sign-on/consent_provider:integration-user-panel" imagePullPolicy: Always env: - name: HYDRA_ADMIN_URL diff --git a/helmchart/templates/deployment-login.yaml b/helmchart/single-sign-on/templates/deployment-login.yaml similarity index 96% rename from helmchart/templates/deployment-login.yaml rename to helmchart/single-sign-on/templates/deployment-login.yaml index 7e0b7bb4b162ba11666c336a75e477d95ee86e8c..e4b56acbf062a57afa605f43c7d3d787a7ee1982 100644 --- a/helmchart/templates/deployment-login.yaml +++ b/helmchart/single-sign-on/templates/deployment-login.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: {{ .Chart.Name }}-login - image: "open.greenhost.net:4567/openappstack/single-sign-on/login_provider:master" + image: "open.greenhost.net:4567/openappstack/single-sign-on/login_provider:integration" imagePullPolicy: Always env: - name: HYDRA_ADMIN_URL diff --git a/helmchart/templates/deployment-userbackend.yaml b/helmchart/single-sign-on/templates/deployment-userbackend.yaml similarity index 97% rename from helmchart/templates/deployment-userbackend.yaml rename to helmchart/single-sign-on/templates/deployment-userbackend.yaml index 05383739ab807ffd48c2a8106c936da126bb3fc9..58e9af878553c64292b75849f8e794751c85a2ac 100644 --- a/helmchart/templates/deployment-userbackend.yaml +++ b/helmchart/single-sign-on/templates/deployment-userbackend.yaml @@ -21,7 +21,7 @@ spec: - name: POSTGRES_PASSWORD value: secret - name: {{ .Chart.Name }}-userbackend - image: "open.greenhost.net:4567/openappstack/user-panel:master" + image: "open.greenhost.net:4567/openappstack/user-panel/backend:minimal-frontend" imagePullPolicy: Always env: - name: HYDRA_ADMIN_URL diff --git a/helmchart/single-sign-on/templates/deployment-userfrontend.yaml b/helmchart/single-sign-on/templates/deployment-userfrontend.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2b0759e69685f9c47f29483bc8b4a528f2c95368 --- /dev/null +++ b/helmchart/single-sign-on/templates/deployment-userfrontend.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "single-sign-on.fullname" . }}-userpanel-frontend + labels: +{{ include "single-sign-on.labels" . | indent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: {{ include "single-sign-on.name" . }}-userpanel-frontend + template: + metadata: + labels: + app.kubernetes.io/name: {{ include "single-sign-on.name" . }}-userpanel-frontend + spec: + containers: + - name: {{ .Chart.Name }}-userpanel-frontend + image: "open.greenhost.net:4567/openappstack/user-panel/frontend:minimal-frontend" + imagePullPolicy: Always + env: + - name: HOST + value: 0.0.0.0 + - name: BASE_URL + value: https://admin.oas.alumnicloud.net + - name: REDIRECT_URL + value: https://admin.oas.alumnicloud.net/callback + - name: HYDRA_BASE_URL + value: https://sso.oas.alumnicloud.net + - name: AUTHORIZE_URL + value: https://sso.oas.alumnicloud.net/oauth2/auth + - name: USERINFO_URL + value: https://sso.oas.alumnicloud.net/userinfo + - name: ACCESS_TOKEN + value: https://sso.oas.alumnicloud.net/oauth2/token + - name: BACKEND_API_URL + value: http://{{ include "single-sign-on.fullname" . }}-userbackend/graphql + - name: OAUTH_CLIENT_ID + value: user-panel + - name: OAUTH_CLIENT_SECRET + value: secret_secret + ports: + - name: frontend + containerPort: 3000 + protocol: TCP diff --git a/helmchart/templates/ingress.yaml b/helmchart/single-sign-on/templates/ingress.yaml similarity index 70% rename from helmchart/templates/ingress.yaml rename to helmchart/single-sign-on/templates/ingress.yaml index 3a8f65b063e04b3f59ece0ae8bc2ef672411ab4d..47f191b288bbf07fb5a629e7bd9dbb2598f9cb73 100644 --- a/helmchart/templates/ingress.yaml +++ b/helmchart/single-sign-on/templates/ingress.yaml @@ -22,11 +22,19 @@ spec: backend: serviceName: {{ include "single-sign-on.fullname" . }}-login servicePort: 5000 + - host: {{ .Values.userpanelFrontend.ingress.host }} + http: + paths: + - path: / + backend: + serviceName: {{ include "single-sign-on.fullname" . }}-userpanel-frontend + servicePort: 3000 tls: - hosts: - {{ .Values.loginProvider.ingress.host }} - {{ .Values.consentProvider.ingress.host }} - secretName: {{ include "single-sign-on.fullname" . }}-consent + - {{ .Values.userpanelFrontend.ingress.host }} + secretName: {{ include "single-sign-on.fullname" . }}.tls status: loadBalancer: ingress: diff --git a/helmchart/templates/service-consent.yaml b/helmchart/single-sign-on/templates/service-consent.yaml similarity index 100% rename from helmchart/templates/service-consent.yaml rename to helmchart/single-sign-on/templates/service-consent.yaml diff --git a/helmchart/templates/service-login.yaml b/helmchart/single-sign-on/templates/service-login.yaml similarity index 100% rename from helmchart/templates/service-login.yaml rename to helmchart/single-sign-on/templates/service-login.yaml diff --git a/helmchart/templates/service-userbackend.yaml b/helmchart/single-sign-on/templates/service-userbackend.yaml similarity index 100% rename from helmchart/templates/service-userbackend.yaml rename to helmchart/single-sign-on/templates/service-userbackend.yaml diff --git a/helmchart/single-sign-on/templates/service-userpanel-frontend.yaml b/helmchart/single-sign-on/templates/service-userpanel-frontend.yaml new file mode 100644 index 0000000000000000000000000000000000000000..14f4d6a1bf0a9370d3d66ffc3630d88af69104db --- /dev/null +++ b/helmchart/single-sign-on/templates/service-userpanel-frontend.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "single-sign-on.fullname" . }}-userpanel-frontend + labels: +{{ include "single-sign-on.labels" . | indent 4 }} +spec: + ports: + - port: 3000 + targetPort: frontend + protocol: TCP + name: frontend + selector: + app.kubernetes.io/name: {{ include "single-sign-on.name" . }}-userpanel-frontend diff --git a/helmchart/templates/tests/test-connection.yaml b/helmchart/single-sign-on/templates/tests/test-connection.yaml similarity index 100% rename from helmchart/templates/tests/test-connection.yaml rename to helmchart/single-sign-on/templates/tests/test-connection.yaml diff --git a/helmchart/values.yaml b/helmchart/single-sign-on/values.yaml similarity index 58% rename from helmchart/values.yaml rename to helmchart/single-sign-on/values.yaml index fee629bc1d7c433bab0c1ece10658190cc954b78..9fb847c8affdcb1a2537d1708c519b5a059702d6 100644 --- a/helmchart/values.yaml +++ b/helmchart/single-sign-on/values.yaml @@ -1,13 +1,17 @@ global: - hydraAdminUrl: https://hydra-admin.oas.example.net + hydraAdminUrl: https://hydra-admin.oas.alumnicloud.net loginProvider: ingress: - host: login.oas.example.net + host: login.oas.alumnicloud.net consentProvider: ingress: - host: consent.oas.example.net + host: consent.oas.alumnicloud.net + +userpanelFrontend: + ingress: + host: admin.oas.alumnicloud.net hydra: hydra: @@ -25,9 +29,9 @@ hydra: dsn: memory urls: self: - issuer: https://hydra.oas.example.net - login: https://login.oas.example.net - consent: https://consent.oas.example.net + issuer: https://sso.oas.alumnicloud.net + login: https://login.oas.alumnicloud.net + consent: https://consent.oas.alumnicloud.net secrets: system: "YouReallyNeedToChangeThis" ingress: @@ -36,23 +40,23 @@ hydra: annotations: kubernetes.io/tls-acme: "true" hosts: - - host: hydra.oas.example.net + - host: sso.oas.alumnicloud.net paths: ["/"] tls: - hosts: - - hydra.oas.example.net - secretName: hydra-proxy-example.tls + - sso.oas.alumnicloud.net + secretName: hydra-proxy-alumnicloud.tls admin: enabled: true annotations: kubernetes.io/tls-acme: "true" hosts: - - host: hydra-admin.oas.example.net + - host: hydra-admin.oas.alumnicloud.net paths: ["/"] tls: - hosts: - - hydra-admin.oas.example.net - secretName: hydra-admin-proxy-example.tls + - hydra-admin.oas.alumnicloud.net + secretName: hydra-admin-proxy-alumnicloud.tls service: public: enabled: true