From 3dd1f08b55c4f8ac5a496d1579fbf29ef973dbb0 Mon Sep 17 00:00:00 2001 From: blazejpass Date: Mon, 16 Oct 2023 16:57:31 +0200 Subject: [PATCH] Move yml deployment and service files for tldraw to separate role folder --- ansible/roles/schulcloud-server-core/tasks/main.yml | 12 ------------ ansible/roles/schulcloud-server-tldraw/meta/main.yml | 9 +++++++++ .../roles/schulcloud-server-tldraw/tasks/main.yml | 11 +++++++++++ .../templates/api-tldraw-deployment.yml.j2} | 2 +- .../templates/api-tldraw-svc.yml.j2} | 2 +- 5 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 ansible/roles/schulcloud-server-tldraw/meta/main.yml create mode 100644 ansible/roles/schulcloud-server-tldraw/tasks/main.yml rename ansible/roles/{schulcloud-server-core/templates/tldraw-deployment.yml.j2 => schulcloud-server-tldraw/templates/api-tldraw-deployment.yml.j2} (97%) rename ansible/roles/{schulcloud-server-core/templates/tldraw-svc.yml.j2 => schulcloud-server-tldraw/templates/api-tldraw-svc.yml.j2} (91%) diff --git a/ansible/roles/schulcloud-server-core/tasks/main.yml b/ansible/roles/schulcloud-server-core/tasks/main.yml index 0dd43741944..fff5b10197a 100644 --- a/ansible/roles/schulcloud-server-core/tasks/main.yml +++ b/ansible/roles/schulcloud-server-core/tasks/main.yml @@ -83,15 +83,3 @@ kubeconfig: ~/.kube/config namespace: "{{ NAMESPACE }}" template: amqp-files-deployment.yml.j2 - - - name: TlDrawServerDeployment - kubernetes.core.k8s: - kubeconfig: ~/.kube/config - namespace: "{{ NAMESPACE }}" - template: tldraw-deployment.yml.j2 - - - name: TlDrawWsService - kubernetes.core.k8s: - kubeconfig: ~/.kube/config - namespace: "{{ NAMESPACE }}" - template: tldraw-svc.yml.j2 diff --git a/ansible/roles/schulcloud-server-tldraw/meta/main.yml b/ansible/roles/schulcloud-server-tldraw/meta/main.yml new file mode 100644 index 00000000000..895ccb2bc29 --- /dev/null +++ b/ansible/roles/schulcloud-server-tldraw/meta/main.yml @@ -0,0 +1,9 @@ +galaxy_info: + role_name: schulcloud-server-tldraw + author: Schul-Cloud Verbund + description: tldraw role for the schulcloud-server + company: Schul-Cloud Verbund + license: license (AGPLv3) + min_ansible_version: 2.8 + galaxy_tags: [] +dependencies: [] diff --git a/ansible/roles/schulcloud-server-tldraw/tasks/main.yml b/ansible/roles/schulcloud-server-tldraw/tasks/main.yml new file mode 100644 index 00000000000..711876e7881 --- /dev/null +++ b/ansible/roles/schulcloud-server-tldraw/tasks/main.yml @@ -0,0 +1,11 @@ +- name: TlDrawServerDeployment + kubernetes.core.k8s: + kubeconfig: ~/.kube/config + namespace: "{{ NAMESPACE }}" + template: api-tldraw-deployment.yml.j2 + +- name: TlDrawWsService + kubernetes.core.k8s: + kubeconfig: ~/.kube/config + namespace: "{{ NAMESPACE }}" + template: api-tldraw-svc.yml.j2 \ No newline at end of file diff --git a/ansible/roles/schulcloud-server-core/templates/tldraw-deployment.yml.j2 b/ansible/roles/schulcloud-server-tldraw/templates/api-tldraw-deployment.yml.j2 similarity index 97% rename from ansible/roles/schulcloud-server-core/templates/tldraw-deployment.yml.j2 rename to ansible/roles/schulcloud-server-tldraw/templates/api-tldraw-deployment.yml.j2 index 1faa5b6fdfc..4d226a7d776 100644 --- a/ansible/roles/schulcloud-server-core/templates/tldraw-deployment.yml.j2 +++ b/ansible/roles/schulcloud-server-tldraw/templates/api-tldraw-deployment.yml.j2 @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: tldraw-deployment + name: api-tldraw-deployment namespace: {{ NAMESPACE }} labels: app: tldraw diff --git a/ansible/roles/schulcloud-server-core/templates/tldraw-svc.yml.j2 b/ansible/roles/schulcloud-server-tldraw/templates/api-tldraw-svc.yml.j2 similarity index 91% rename from ansible/roles/schulcloud-server-core/templates/tldraw-svc.yml.j2 rename to ansible/roles/schulcloud-server-tldraw/templates/api-tldraw-svc.yml.j2 index 5a77fbd9608..e2d55c2a317 100644 --- a/ansible/roles/schulcloud-server-core/templates/tldraw-svc.yml.j2 +++ b/ansible/roles/schulcloud-server-tldraw/templates/api-tldraw-svc.yml.j2 @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: tldraw-svc + name: api-tldraw-svc namespace: {{ NAMESPACE }} labels: app: tldraw