diff --git a/infra/overlays/prod/kordis-api-config-map.yaml b/infra/overlays/prod/kordis-api-config-map.yaml new file mode 100644 index 00000000..67a9d85a --- /dev/null +++ b/infra/overlays/prod/kordis-api-config-map.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: kordis-api-config-map +data: + ENVIRONMENT_NAME: prod diff --git a/infra/overlays/prod/kordis-azure-ss.yaml b/infra/overlays/prod/kordis-azure-ss.yaml new file mode 100644 index 00000000..44125280 --- /dev/null +++ b/infra/overlays/prod/kordis-azure-ss.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: bitnami.com/v1alpha1 +kind: SealedSecret +metadata: + creationTimestamp: null + name: azure-vault-creds + namespace: kordis-prod +spec: + encryptedData: + clientid: AgCTuBdlE1/NWvFREiR+5DJbKpbV+Ok0Oss6tyxWXSKmgUzq2soRTe3RPaCwjZ3LuNncMYInEqFWCWpVLZiEMq2TEHUGYCV7n1Okp7GG+v5N1A437lsrbja30ihE+8+C0EPwNJ8Kmm7DXn9gYRjxqDjTDxcSJkQwTCmGvJhDPEev+HRR32lNWBb5OIdxGDCZsYfrJqZcq0vNMugQ7KJgc9bfrltkJbh0c7YwOHN3D4aHr8YErGG+PHrzsCXojcjuF/GDlT6e1xev/Crr8Mukay8auFKoImexAzUqpkKDItk5gfF/9m0XuB/r7n9MrSSyBOP5Nl7CIyua88rfx+mi7xE9How6GM90L7SDI0cV6Z6u6SKUqHPqKd7Kmi9/kJXikD7ubwKI0SIDj/YNVfK9s7Ary4I/1uUyDYjFwEtfSXN8oZTVfOCTxUs2dX1OeuXQaGw0nhnMmVsl+yIfja0uMeY7QAA80zu9FW014+jSf/I29vNF9joD3lnVhcZAgrd1SZ11NDrrJ+GTbqrV7Vif0QFHjCILWD4Z9AELhXrdT6R04wmQM+qAFzTiK4rDhQiou6eXFJiwmkw9E60HggJj51X+Ea7SvYUduuM0+ZzuF0gqq4U5Zw5fcabQP6CWsTbbyTG0Hk9j/EkouCGbRh6MebKMheeUfAwa9XUboCHsv03GZOVJvXE23oPkrZHj3cQBQpmZzGdB8oNajghT125D+KOoRA7g6qGRO6zn5zB7U3aFbv7TnYA= + clientsecret: AgBSBa1hRna1mUMwTuUZaOxxIAK3tFkRVPrjUL2z+wZvWECx9xONchKwSJOTpzWFVqLPItI+ucuCEKVkfYWsXGQbrx8yddhJW9cpfe+b00AahNh5fEjAWUYysjlflsnj/3wb3TPHhcKl8fJmF0S7QBx8VPysr4mI9P5l5c5o3c6xIZsPfzCS/iqKTBM2La2gmBer5gsS21L+8ndO3vRsjSHG9INVj6DVr8YcdwkG0bjJOkcbKKF2vRPz8RKNV6qiC6X83JVAFcVHkARtkt2HjZ+o39CaY1jXAHciP3YsOxQNrV/S92ak6t2jKvHmLg6dc/qnQCWLRpGBRqal9NfhXprjWyloJQSBHu4xw4PJAULWYLMoLHvq9rg+hM8UGIfx6mPCWk7P3oiNVFfz9JAzdvOf2m7QI4XEN1+9DLfTEAh/MGKKM4JJzU/SrZ+66gtPI1Gpw3sIoSDaBVi0kKaU2WdT+cs8lBuoHfkunX1QhUiAeBVKimd1oryWEtDzSaIsbe4st8npO3E53iAlkLOouuKGnNRolrAuJvQn6cd2AGxQNcQGGncCzUfGjpb73DjceCzDx4jz73TQA0pzoG1pEcRESmhwHjssMLPZiFMtGpmmmj6cIe1EOKYVRgGS3EmFvzN1AqwRpPy0z9kI09nMpscyOG95TUql6aKJgOCZCzlbIWUup8DUMFlC3WtxdaxmCHFXw0ZEg3N1gvhGqm6E9u5h0CjtKGrD7HUDL6rDUkvB7/KCoMbBka5x + template: + metadata: + creationTimestamp: null + name: azure-vault-creds + namespace: kordis-prod diff --git a/infra/overlays/prod/kordis-ns.yaml b/infra/overlays/prod/kordis-ns.yaml new file mode 100644 index 00000000..8a519730 --- /dev/null +++ b/infra/overlays/prod/kordis-ns.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: kordis-prod diff --git a/infra/overlays/prod/kordis-spa-config-map.yaml b/infra/overlays/prod/kordis-spa-config-map.yaml new file mode 100644 index 00000000..e0f646eb --- /dev/null +++ b/infra/overlays/prod/kordis-spa-config-map.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: kordis-spa-config-map +data: + ENVIRONMENT_NAME: prod + OAUTH_CONFIG: | + { + "config": { + "redirectUri": "https://app.kordis-leitstelle.de/auth", + "oidc": true, + "responseType": "code", + "clientId": "d3c8c4e6-ef97-4878-935e-167ef9b68f41", + "issuer": "https://kordisleitstelle.b2clogin.com/5b974891-a530-4e68-ac04-e26a18c3bd46/v2.0/", + "tokenEndpoint": "https://kordisleitstelle.b2clogin.com/kordisleitstelle.onmicrosoft.com/b2c_1_signin/oauth2/v2.0/token", + "scope": "openid offline_access d3c8c4e6-ef97-4878-935e-167ef9b68f41", + "strictDiscoveryDocumentValidation": false + }, + "discoveryDocumentUrl": "https://kordisleitstelle.b2clogin.com/kordisleitstelle.onmicrosoft.com/B2C_1_SignIn/v2.0/.well-known/openid-configuration" + } + API_URL: https://api.kordis-leitstelle.de diff --git a/infra/overlays/prod/kordis-spc.yaml b/infra/overlays/prod/kordis-spc.yaml new file mode 100644 index 00000000..8606a48e --- /dev/null +++ b/infra/overlays/prod/kordis-spc.yaml @@ -0,0 +1,28 @@ +apiVersion: secrets-store.csi.x-k8s.io/v1 +kind: SecretProviderClass +metadata: + name: azure-vault-secrets +spec: + provider: azure + parameters: + keyvaultName: kordisvault + tenantId: aef4dff0-4552-432b-a5c9-925890face46 + objects: | + array: + - | + objectName: sentry-api-dns + objectType: secret + - | + objectName: sentry-spa-dns + objectType: secret + secretObjects: + - secretName: api-vault-secrets + type: Opaque + data: + - key: sentry-dns + objectName: sentry-api-dns + - secretName: spa-vault-secrets + type: Opaque + data: + - key: sentry-dns + objectName: sentry-spa-dns diff --git a/infra/overlays/prod/kustomization.yaml b/infra/overlays/prod/kustomization.yaml new file mode 100644 index 00000000..ae5c170c --- /dev/null +++ b/infra/overlays/prod/kustomization.yaml @@ -0,0 +1,39 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: kordis-prod + +resources: + - ../../base/ + - kordis-ns.yaml + - kordis-azure-ss.yaml + - kordis-spc.yaml + - kordis-api-config-map.yaml + - kordis-spa-config-map.yaml + +images: + - name: kordis-api + newName: ghcr.io/kordis-leitstelle/kordis-api + newTag: 8683454f374b5989ae30882db5b584152bab715a + - name: kordis-spa + newName: ghcr.io/kordis-leitstelle/kordis-spa + newTag: 8683454f374b5989ae30882db5b584152bab715a + +patches: + - patch: |- + - op: replace + path: /spec/rules/0/host + value: api.kordis-leitstelle.de + target: + group: networking.k8s.io + kind: Ingress + name: kordis-api + version: v1 + - patch: |- + - op: replace + path: /spec/rules/0/host + value: app.kordis-leitstelle.de + target: + group: networking.k8s.io + kind: Ingress + name: kordis-spa + version: v1