-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into DMED-119-integration-of-search-environment
- Loading branch information
Showing
43 changed files
with
458 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
EXTERNAL_SECRETS_OPERATOR: false | ||
EXTERNAL_SECRETS_K8S_STORE: k8s-store | ||
EXTERNAL_SECRETS_POSTFIX: "" | ||
EXTERNAL_SECRETS_REFRESH_INTERVAL: "1m" | ||
EXTERNAL_SECRETS_NAMESPACE: external-secrets | ||
EXTERNAL_SECRETS_TOKEN_SECRET: external-secrets-k8s-store-token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
MONGO_MANAGEMENT_PREFIX: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Add prefix if namespace begins with number (consitent with postgres), replace - with _ and trim | ||
MONGO_MANAGEMENT_PREFIX: "{{ (NAMESPACE | regex_replace('^(\\d.+)', 'release_\\1') | replace('-','_'))[:40] }}__" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
mongodb_query_exporter_mongodb_sc_db_name: "scapp" | ||
mongodb_query_exporter_mongodb_sc_db_name: "{{ MONGO_MANAGEMENT_PREFIX if WITH_BRANCH_MONGO_DB_MANAGEMENT else '' }}scapp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
mongodb_query_exporter_mongodb_sc_db_name: "scapp" | ||
mongodb_query_exporter_mongodb_sc_db_name: "schulcloud" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
WITH_MONGO_DATABASES: true | ||
WITH_SCHULCLOUD_INIT: true | ||
WITH_CALENDAR_INIT: true | ||
WITH_STORAGE: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
ansible/roles/dof_etherpad/templates/external-secret.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: etherpad-secret | ||
namespace: {{ NAMESPACE }} | ||
labels: | ||
app: etherpad | ||
spec: | ||
refreshInterval: {{ EXTERNAL_SECRETS_REFRESH_INTERVAL }} | ||
secretStoreRef: | ||
kind: SecretStore | ||
name: {{ EXTERNAL_SECRETS_K8S_STORE }} | ||
target: | ||
name: etherpad-secret | ||
template: | ||
engineVersion: v2 | ||
mergePolicy: Merge | ||
data: | ||
DB_URL: "{{ '{{ .MONGO_MANAGEMENT_TEMPLATE_URL }}/' ~ MONGO_MANAGEMENT_PREFIX ~ 'etherpad' }}" | ||
dataFrom: | ||
- extract: | ||
key: etherpad-secret{{ EXTERNAL_SECRETS_POSTFIX }} | ||
data: | ||
- secretKey: MONGO_MANAGEMENT_TEMPLATE_URL | ||
remoteRef: | ||
key: mongo-cluster-readwrite-secret | ||
property: credentials-url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
galaxy_info: | ||
role_name: dof_mongo_management | ||
author: Schul-Cloud Verbund | ||
description: Helper role for creating the MongoDB Secret | ||
company: Schul-Cloud Verbund | ||
license: license (AGPLv3) | ||
min_ansible_version: 2.8 | ||
galaxy_tags: [] | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- name: Add or Update MongoDB Read/Write Secret by 1Password | ||
kubernetes.core.k8s: | ||
kubeconfig: ~/.kube/config | ||
namespace: "{{ NAMESPACE }}" | ||
template: onepassword-mongo-readwrite.yml.j2 | ||
when: WITH_BRANCH_MONGO_DB_MANAGEMENT and ONEPASSWORD_OPERATOR is defined and ONEPASSWORD_OPERATOR|bool | ||
tags: | ||
- 1password |
9 changes: 9 additions & 0 deletions
9
ansible/roles/dof_mongo_management/templates/onepassword-mongo-readwrite.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: onepassword.com/v1 | ||
kind: OnePasswordItem | ||
metadata: | ||
name: mongo-cluster-readwrite-secret | ||
namespace: {{ NAMESPACE }} | ||
labels: | ||
app: mongo-management | ||
spec: | ||
itemPath: "vaults/{{ ONEPASSWORD_OPERATOR_VAULT }}/items/mongo-cluster-schulcloud-anydatabase-rw" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
galaxy_info: | ||
role_name: external-secrets | ||
author: Schul-Cloud Verbund | ||
description: Configures the SecretStore of external-secrets for the namespace | ||
company: Schul-Cloud Verbund | ||
license: license (AGPLv3) | ||
min_ansible_version: 2.8 | ||
galaxy_tags: [] | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
- name: Get ServiceAccount Token for SecretStore | ||
kubernetes.core.k8s_info: | ||
kubeconfig: ~/.kube/config | ||
kind: Secret | ||
name: "{{ EXTERNAL_SECRETS_TOKEN_SECRET }}" | ||
namespace: "{{ EXTERNAL_SECRETS_NAMESPACE }}" | ||
register: secretstore_token | ||
when: EXTERNAL_SECRETS_OPERATOR | ||
tags: | ||
- 1password | ||
|
||
- name: Save the Token for SecretStore in a secret in this namespace | ||
vars: | ||
token: "{{ secretstore_token.resources[0].data.token }}" | ||
kubernetes.core.k8s: | ||
kubeconfig: ~/.kube/config | ||
template: secret-token.yml.j2 | ||
when: EXTERNAL_SECRETS_OPERATOR | ||
tags: | ||
- 1password | ||
|
||
- name: Delete Secret with Token for SecretStore | ||
kubernetes.core.k8s: | ||
kubeconfig: ~/.kube/config | ||
namespace: "{{ NAMESPACE }}" | ||
kind: Secret | ||
name: external-secrets-secretstore-token | ||
state: absent | ||
when: not EXTERNAL_SECRETS_OPERATOR | ||
tags: | ||
- 1password | ||
|
||
- name: Create Secret Store | ||
kubernetes.core.k8s: | ||
kubeconfig: ~/.kube/config | ||
template: secretstore.yml.j2 | ||
when: EXTERNAL_SECRETS_OPERATOR | ||
tags: | ||
- 1password |
10 changes: 10 additions & 0 deletions
10
ansible/roles/external-secrets/templates/secret-token.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: external-secrets-secretstore-token | ||
namespace: {{ NAMESPACE }} | ||
labels: | ||
app: external-secrets | ||
type: Opaque | ||
data: | ||
token: "{{ token }}" |
19 changes: 19 additions & 0 deletions
19
ansible/roles/external-secrets/templates/secretstore.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: SecretStore | ||
metadata: | ||
name: {{ EXTERNAL_SECRETS_K8S_STORE }} | ||
namespace: {{ NAMESPACE }} | ||
spec: | ||
provider: | ||
kubernetes: | ||
auth: | ||
token: | ||
bearerToken: | ||
name: external-secrets-secretstore-token | ||
key: token | ||
remoteNamespace: {{ NAMESPACE }} | ||
server: | ||
caProvider: | ||
key: ca.crt | ||
name: kube-root-ca.crt | ||
type: ConfigMap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
ansible/roles/mongodb_query_exporter/templates/external-secret.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: {{ mongodb_query_exporter_secret_name }} | ||
namespace: {{ NAMESPACE }} | ||
labels: | ||
app: mongodb-query-exporter | ||
spec: | ||
refreshInterval: {{ EXTERNAL_SECRETS_REFRESH_INTERVAL }} | ||
secretStoreRef: | ||
kind: SecretStore | ||
name: {{ EXTERNAL_SECRETS_K8S_STORE }} | ||
target: | ||
name: {{ mongodb_query_exporter_secret_name }} | ||
template: | ||
engineVersion: v2 | ||
mergePolicy: Merge | ||
data: | ||
MDBEXPORTER_SERVER_0_MONGODB_URI: "{{ '{{ .MONGO_MANAGEMENT_TEMPLATE_URL }}/' ~ mongodb_query_exporter_mongodb_sc_db_name }}" | ||
dataFrom: | ||
- extract: | ||
key: {{ mongodb_query_exporter_secret_name }}{{ EXTERNAL_SECRETS_POSTFIX }} | ||
data: | ||
- secretKey: MONGO_MANAGEMENT_TEMPLATE_URL | ||
remoteRef: | ||
key: mongo-cluster-readwrite-secret | ||
property: credentials-url |
2 changes: 1 addition & 1 deletion
2
ansible/roles/mongodb_query_exporter/templates/onepassword.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 40 additions & 35 deletions
75
ansible/roles/namespace-activator-scaled-objects/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,41 @@ | ||
deployments_for_scaled_objects: | ||
- api-deployment | ||
- admin-api-deployment | ||
- client-deployment | ||
- amqp-files-deployment | ||
- api-h5p-proxy-deployment | ||
- api-h5p-deployment | ||
- h5p-staticfiles-server-deployment | ||
- antivirus-webserver-deployment | ||
- antivirus-scanfile-deployment | ||
- api-files-deployment | ||
- api-migration-systems-deployment | ||
- preview-generator-deployment | ||
- api-fwu-deployment | ||
- calendar-deployment | ||
- clamav-deployment | ||
- default-backend-404-deployment | ||
- erwinidm-deployment | ||
- etherpad-deployment | ||
- etherpad-nginx-deployment | ||
- hydra-deployment | ||
- libreoffice-deployment | ||
- management-deployment | ||
- nuxtclient-deployment | ||
- oidcmock-deployment | ||
- rocketchat-deployment | ||
- shd-deployment | ||
- shd-client-deployment | ||
- version-aggregator-deployment | ||
# - tldraw-deployment | ||
# - tldraw-worker-deployment | ||
- tldraw-client-deployment | ||
- mailcatcher-deployment | ||
- maildrop-deployment | ||
- board-collaboration-deployment | ||
- common-cartridge-deployment | ||
- name: api-deployment | ||
- name: admin-api-deployment | ||
- name: client-deployment | ||
- name: amqp-files-deployment | ||
- name: api-h5p-proxy-deployment | ||
- name: api-h5p-deployment | ||
- name: h5p-staticfiles-server-deployment | ||
- name: antivirus-webserver-deployment | ||
- name: antivirus-scanfile-deployment | ||
- name: api-files-deployment | ||
- name: api-migration-systems-deployment | ||
- name: preview-generator-deployment | ||
- name: api-fwu-deployment | ||
- name: calendar-deployment | ||
- name: clamav-deployment | ||
- name: default-backend-404-deployment | ||
- name: erwinidm-deployment | ||
- name: etherpad-deployment | ||
- name: etherpad-nginx-deployment | ||
- name: hydra-deployment | ||
- name: libreoffice-deployment | ||
- name: management-deployment | ||
- name: nuxtclient-deployment | ||
- name: oidcmock-deployment | ||
- name: rocketchat-deployment | ||
- name: shd-deployment | ||
- name: shd-client-deployment | ||
- name: version-aggregator-deployment | ||
- name: mailcatcher-deployment | ||
- name: maildrop-deployment | ||
- name: board-collaboration-deployment | ||
- name: common-cartridge-deployment | ||
- name: clammit-deployment | ||
# those 2 will be re-added when new tldraw stuff is enabled by default | ||
# - tldraw-deployment | ||
# - tldraw-worker-deployment | ||
- name: tldraw-client-deployment | ||
- name: valkey-node | ||
kind: StatefulSet | ||
replicaCount: "{{TLDRAW_VALKEY_REPLICAS}}" |
Oops, something went wrong.