From beea6a120dca428dd8492872764a694637bf9a16 Mon Sep 17 00:00:00 2001 From: rpy-aiwe Date: Mon, 5 Feb 2024 13:26:50 +0300 Subject: [PATCH] Folders restructure --- client/setup_pgsql_operator_ui.sh | 6 ------ .../manifests/api-service.yaml | 0 .../manifests/complete-postgres-manifest.yaml | 0 .../manifests/configmap.yaml | 0 .../manifests/custom-team-membership.yaml | 0 .../manifests/e2e-storage-class.yaml | 0 .../manifests/fake-teams-api.yaml | 0 .../infrastructure-roles-configmap.yaml | 0 .../manifests/infrastructure-roles-new.yaml | 0 .../manifests/infrastructure-roles.yaml | 0 .../manifests/kustomization.yaml | 0 .../minimal-fake-pooler-deployment.yaml | 0 .../minimal-master-replica-svcmonitor.yaml | 0 .../minimal-postgres-manifest-12.yaml | 0 .../manifests/minimal-postgres-manifest.yaml | 0 ...erator-service-account-rbac-openshift.yaml | 0 .../operator-service-account-rbac.yaml | 0 .../manifests/operatorconfiguration.crd.yaml | 0 .../manifests/platform-credentials.yaml | 0 .../manifests/postgres-operator.yaml | 0 .../postgres-pod-priority-class.yaml | 0 ...gresql-operator-default-configuration.yaml | 0 .../manifests/postgresql.crd.yaml | 0 .../manifests/postgresteam.crd.yaml | 0 .../manifests/standby-manifest.yaml | 0 .../manifests/user-facing-clusterroles.yaml | 0 .../ui/manifests/deployment.yaml | 0 .../ui/manifests/service.yaml | 0 .../ui/manifests/ui-service-account-rbac.yaml | 0 manifests/traefik-config.yaml | 10 ++++++++++ postgres-operator/ui/manifests/ingress.yaml | 20 ------------------- scripts/client/setup_all.sh | 8 ++++++++ .../client}/setup_pgsql_minimal.sh | 2 +- .../client}/setup_pgsql_operator.sh | 2 +- scripts/client/setup_pgsql_operator_ui.sh | 6 ++++++ {misc => scripts/client}/start_pg_ui.sh | 0 scripts/server/install.sh | 2 ++ server/install.sh | 2 -- 38 files changed, 28 insertions(+), 30 deletions(-) delete mode 100755 client/setup_pgsql_operator_ui.sh rename {postgres-operator => manifests/postgres-operator}/manifests/api-service.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/complete-postgres-manifest.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/configmap.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/custom-team-membership.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/e2e-storage-class.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/fake-teams-api.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/infrastructure-roles-configmap.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/infrastructure-roles-new.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/infrastructure-roles.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/kustomization.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/minimal-fake-pooler-deployment.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/minimal-master-replica-svcmonitor.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/minimal-postgres-manifest-12.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/minimal-postgres-manifest.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/operator-service-account-rbac-openshift.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/operator-service-account-rbac.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/operatorconfiguration.crd.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/platform-credentials.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/postgres-operator.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/postgres-pod-priority-class.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/postgresql-operator-default-configuration.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/postgresql.crd.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/postgresteam.crd.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/standby-manifest.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/manifests/user-facing-clusterroles.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/ui/manifests/deployment.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/ui/manifests/service.yaml (100%) rename {postgres-operator => manifests/postgres-operator}/ui/manifests/ui-service-account-rbac.yaml (100%) create mode 100644 manifests/traefik-config.yaml delete mode 100644 postgres-operator/ui/manifests/ingress.yaml create mode 100755 scripts/client/setup_all.sh rename {client => scripts/client}/setup_pgsql_minimal.sh (53%) rename {client => scripts/client}/setup_pgsql_operator.sh (84%) create mode 100755 scripts/client/setup_pgsql_operator_ui.sh rename {misc => scripts/client}/start_pg_ui.sh (100%) create mode 100644 scripts/server/install.sh delete mode 100644 server/install.sh diff --git a/client/setup_pgsql_operator_ui.sh b/client/setup_pgsql_operator_ui.sh deleted file mode 100755 index b28a7f4..0000000 --- a/client/setup_pgsql_operator_ui.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -cd $(git rev-parse --show-toplevel)/postgres-operator - -kubectl apply -f ui/manifests/ - diff --git a/postgres-operator/manifests/api-service.yaml b/manifests/postgres-operator/manifests/api-service.yaml similarity index 100% rename from postgres-operator/manifests/api-service.yaml rename to manifests/postgres-operator/manifests/api-service.yaml diff --git a/postgres-operator/manifests/complete-postgres-manifest.yaml b/manifests/postgres-operator/manifests/complete-postgres-manifest.yaml similarity index 100% rename from postgres-operator/manifests/complete-postgres-manifest.yaml rename to manifests/postgres-operator/manifests/complete-postgres-manifest.yaml diff --git a/postgres-operator/manifests/configmap.yaml b/manifests/postgres-operator/manifests/configmap.yaml similarity index 100% rename from postgres-operator/manifests/configmap.yaml rename to manifests/postgres-operator/manifests/configmap.yaml diff --git a/postgres-operator/manifests/custom-team-membership.yaml b/manifests/postgres-operator/manifests/custom-team-membership.yaml similarity index 100% rename from postgres-operator/manifests/custom-team-membership.yaml rename to manifests/postgres-operator/manifests/custom-team-membership.yaml diff --git a/postgres-operator/manifests/e2e-storage-class.yaml b/manifests/postgres-operator/manifests/e2e-storage-class.yaml similarity index 100% rename from postgres-operator/manifests/e2e-storage-class.yaml rename to manifests/postgres-operator/manifests/e2e-storage-class.yaml diff --git a/postgres-operator/manifests/fake-teams-api.yaml b/manifests/postgres-operator/manifests/fake-teams-api.yaml similarity index 100% rename from postgres-operator/manifests/fake-teams-api.yaml rename to manifests/postgres-operator/manifests/fake-teams-api.yaml diff --git a/postgres-operator/manifests/infrastructure-roles-configmap.yaml b/manifests/postgres-operator/manifests/infrastructure-roles-configmap.yaml similarity index 100% rename from postgres-operator/manifests/infrastructure-roles-configmap.yaml rename to manifests/postgres-operator/manifests/infrastructure-roles-configmap.yaml diff --git a/postgres-operator/manifests/infrastructure-roles-new.yaml b/manifests/postgres-operator/manifests/infrastructure-roles-new.yaml similarity index 100% rename from postgres-operator/manifests/infrastructure-roles-new.yaml rename to manifests/postgres-operator/manifests/infrastructure-roles-new.yaml diff --git a/postgres-operator/manifests/infrastructure-roles.yaml b/manifests/postgres-operator/manifests/infrastructure-roles.yaml similarity index 100% rename from postgres-operator/manifests/infrastructure-roles.yaml rename to manifests/postgres-operator/manifests/infrastructure-roles.yaml diff --git a/postgres-operator/manifests/kustomization.yaml b/manifests/postgres-operator/manifests/kustomization.yaml similarity index 100% rename from postgres-operator/manifests/kustomization.yaml rename to manifests/postgres-operator/manifests/kustomization.yaml diff --git a/postgres-operator/manifests/minimal-fake-pooler-deployment.yaml b/manifests/postgres-operator/manifests/minimal-fake-pooler-deployment.yaml similarity index 100% rename from postgres-operator/manifests/minimal-fake-pooler-deployment.yaml rename to manifests/postgres-operator/manifests/minimal-fake-pooler-deployment.yaml diff --git a/postgres-operator/manifests/minimal-master-replica-svcmonitor.yaml b/manifests/postgres-operator/manifests/minimal-master-replica-svcmonitor.yaml similarity index 100% rename from postgres-operator/manifests/minimal-master-replica-svcmonitor.yaml rename to manifests/postgres-operator/manifests/minimal-master-replica-svcmonitor.yaml diff --git a/postgres-operator/manifests/minimal-postgres-manifest-12.yaml b/manifests/postgres-operator/manifests/minimal-postgres-manifest-12.yaml similarity index 100% rename from postgres-operator/manifests/minimal-postgres-manifest-12.yaml rename to manifests/postgres-operator/manifests/minimal-postgres-manifest-12.yaml diff --git a/postgres-operator/manifests/minimal-postgres-manifest.yaml b/manifests/postgres-operator/manifests/minimal-postgres-manifest.yaml similarity index 100% rename from postgres-operator/manifests/minimal-postgres-manifest.yaml rename to manifests/postgres-operator/manifests/minimal-postgres-manifest.yaml diff --git a/postgres-operator/manifests/operator-service-account-rbac-openshift.yaml b/manifests/postgres-operator/manifests/operator-service-account-rbac-openshift.yaml similarity index 100% rename from postgres-operator/manifests/operator-service-account-rbac-openshift.yaml rename to manifests/postgres-operator/manifests/operator-service-account-rbac-openshift.yaml diff --git a/postgres-operator/manifests/operator-service-account-rbac.yaml b/manifests/postgres-operator/manifests/operator-service-account-rbac.yaml similarity index 100% rename from postgres-operator/manifests/operator-service-account-rbac.yaml rename to manifests/postgres-operator/manifests/operator-service-account-rbac.yaml diff --git a/postgres-operator/manifests/operatorconfiguration.crd.yaml b/manifests/postgres-operator/manifests/operatorconfiguration.crd.yaml similarity index 100% rename from postgres-operator/manifests/operatorconfiguration.crd.yaml rename to manifests/postgres-operator/manifests/operatorconfiguration.crd.yaml diff --git a/postgres-operator/manifests/platform-credentials.yaml b/manifests/postgres-operator/manifests/platform-credentials.yaml similarity index 100% rename from postgres-operator/manifests/platform-credentials.yaml rename to manifests/postgres-operator/manifests/platform-credentials.yaml diff --git a/postgres-operator/manifests/postgres-operator.yaml b/manifests/postgres-operator/manifests/postgres-operator.yaml similarity index 100% rename from postgres-operator/manifests/postgres-operator.yaml rename to manifests/postgres-operator/manifests/postgres-operator.yaml diff --git a/postgres-operator/manifests/postgres-pod-priority-class.yaml b/manifests/postgres-operator/manifests/postgres-pod-priority-class.yaml similarity index 100% rename from postgres-operator/manifests/postgres-pod-priority-class.yaml rename to manifests/postgres-operator/manifests/postgres-pod-priority-class.yaml diff --git a/postgres-operator/manifests/postgresql-operator-default-configuration.yaml b/manifests/postgres-operator/manifests/postgresql-operator-default-configuration.yaml similarity index 100% rename from postgres-operator/manifests/postgresql-operator-default-configuration.yaml rename to manifests/postgres-operator/manifests/postgresql-operator-default-configuration.yaml diff --git a/postgres-operator/manifests/postgresql.crd.yaml b/manifests/postgres-operator/manifests/postgresql.crd.yaml similarity index 100% rename from postgres-operator/manifests/postgresql.crd.yaml rename to manifests/postgres-operator/manifests/postgresql.crd.yaml diff --git a/postgres-operator/manifests/postgresteam.crd.yaml b/manifests/postgres-operator/manifests/postgresteam.crd.yaml similarity index 100% rename from postgres-operator/manifests/postgresteam.crd.yaml rename to manifests/postgres-operator/manifests/postgresteam.crd.yaml diff --git a/postgres-operator/manifests/standby-manifest.yaml b/manifests/postgres-operator/manifests/standby-manifest.yaml similarity index 100% rename from postgres-operator/manifests/standby-manifest.yaml rename to manifests/postgres-operator/manifests/standby-manifest.yaml diff --git a/postgres-operator/manifests/user-facing-clusterroles.yaml b/manifests/postgres-operator/manifests/user-facing-clusterroles.yaml similarity index 100% rename from postgres-operator/manifests/user-facing-clusterroles.yaml rename to manifests/postgres-operator/manifests/user-facing-clusterroles.yaml diff --git a/postgres-operator/ui/manifests/deployment.yaml b/manifests/postgres-operator/ui/manifests/deployment.yaml similarity index 100% rename from postgres-operator/ui/manifests/deployment.yaml rename to manifests/postgres-operator/ui/manifests/deployment.yaml diff --git a/postgres-operator/ui/manifests/service.yaml b/manifests/postgres-operator/ui/manifests/service.yaml similarity index 100% rename from postgres-operator/ui/manifests/service.yaml rename to manifests/postgres-operator/ui/manifests/service.yaml diff --git a/postgres-operator/ui/manifests/ui-service-account-rbac.yaml b/manifests/postgres-operator/ui/manifests/ui-service-account-rbac.yaml similarity index 100% rename from postgres-operator/ui/manifests/ui-service-account-rbac.yaml rename to manifests/postgres-operator/ui/manifests/ui-service-account-rbac.yaml diff --git a/manifests/traefik-config.yaml b/manifests/traefik-config.yaml new file mode 100644 index 0000000..3077bf0 --- /dev/null +++ b/manifests/traefik-config.yaml @@ -0,0 +1,10 @@ +apiVersion: helm.cattle.io/v1 +kind: HelmChartConfig +metadata: + name: traefik + namespace: kube-system +spec: + valuesContent: |- + ports: + websecure: + expose: false diff --git a/postgres-operator/ui/manifests/ingress.yaml b/postgres-operator/ui/manifests/ingress.yaml deleted file mode 100644 index 3d721b9..0000000 --- a/postgres-operator/ui/manifests/ingress.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: "networking.k8s.io/v1" -kind: "Ingress" -metadata: - name: "postgres-operator-ui" - namespace: "default" - labels: - application: "postgres-operator-ui" -spec: - # ingressClassName: "ingress-nginx" - rules: - - host: "ui.example.org" - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: "postgres-operator-ui" - port: - number: 80 diff --git a/scripts/client/setup_all.sh b/scripts/client/setup_all.sh new file mode 100755 index 0000000..8530bea --- /dev/null +++ b/scripts/client/setup_all.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +./setup_pgsql_operator.sh +./setup_pgsql_operator_ui.sh + +cd $(git rev-parse --show-toplevel)/manifests + +kubectl apply -f traefik-config.yaml diff --git a/client/setup_pgsql_minimal.sh b/scripts/client/setup_pgsql_minimal.sh similarity index 53% rename from client/setup_pgsql_minimal.sh rename to scripts/client/setup_pgsql_minimal.sh index 9c9408d..51269f4 100755 --- a/client/setup_pgsql_minimal.sh +++ b/scripts/client/setup_pgsql_minimal.sh @@ -1,6 +1,6 @@ #!/bin/bash -cd $(git rev-parse --show-toplevel)/postgres-operator +cd $(git rev-parse --show-toplevel)/manifests/postgres-operator kubectl apply -f manifests/minimal-postgres-manifest.yaml diff --git a/client/setup_pgsql_operator.sh b/scripts/client/setup_pgsql_operator.sh similarity index 84% rename from client/setup_pgsql_operator.sh rename to scripts/client/setup_pgsql_operator.sh index 85d03bf..310b12a 100755 --- a/client/setup_pgsql_operator.sh +++ b/scripts/client/setup_pgsql_operator.sh @@ -1,6 +1,6 @@ #!/bin/bash -cd $(git rev-parse --show-toplevel)/postgres-operator +cd $(git rev-parse --show-toplevel)/manifests/postgres-operator # apply the manifests in the following order kubectl create -f manifests/configmap.yaml # configuration diff --git a/scripts/client/setup_pgsql_operator_ui.sh b/scripts/client/setup_pgsql_operator_ui.sh new file mode 100755 index 0000000..b945ae5 --- /dev/null +++ b/scripts/client/setup_pgsql_operator_ui.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cd $(git rev-parse --show-toplevel)/manifests/postgres-operator + +kubectl apply -f ui/manifests/ + diff --git a/misc/start_pg_ui.sh b/scripts/client/start_pg_ui.sh similarity index 100% rename from misc/start_pg_ui.sh rename to scripts/client/start_pg_ui.sh diff --git a/scripts/server/install.sh b/scripts/server/install.sh new file mode 100644 index 0000000..f87c84b --- /dev/null +++ b/scripts/server/install.sh @@ -0,0 +1,2 @@ +#!/bin/bash +curl -sfL https://get.k3s.io | sh -s - diff --git a/server/install.sh b/server/install.sh deleted file mode 100644 index 74c6439..0000000 --- a/server/install.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --disable=traefik" sh -s -