diff --git a/ecommerce-apps/kustomize/ecommerce-online-boutique.yaml b/ecommerce-apps/kustomize/ecommerce-online-boutique.yaml new file mode 100644 index 0000000..96582a4 --- /dev/null +++ b/ecommerce-apps/kustomize/ecommerce-online-boutique.yaml @@ -0,0 +1,23 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ecommerce-online-boutique + namespace: ecommerce-apps + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: ecommerce-apps + name: in-cluster + project: k8saas + source: + path: ecommerce-online-boutique + repoURL: http://gitea-http.k8saas-system.svc:3000/root/k8saas-frozen + targetRevision: HEAD + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/ecommerce-apps/kustomize/kustomization.yaml b/ecommerce-apps/kustomize/kustomization.yaml new file mode 100644 index 0000000..e9a857e --- /dev/null +++ b/ecommerce-apps/kustomize/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ecommerce-online-boutique.yaml diff --git a/ecommerce-online-boutique/app.yaml b/ecommerce-online-boutique/app.yaml new file mode 100644 index 0000000..c984320 --- /dev/null +++ b/ecommerce-online-boutique/app.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: online-boutique + namespace: ecommerce-apps + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: ecommerce-online-boutique + name: in-cluster + project: ecommerce + source: + path: ecommerce-online-boutique + repoURL: http://gitea-http.k8saas-system.svc:3000/root/k8saas-frozen + targetRevision: HEAD + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/online-boutique/kustomize/dashboard.yaml b/ecommerce-online-boutique/kustomize/dashboard.yaml similarity index 100% rename from online-boutique/kustomize/dashboard.yaml rename to ecommerce-online-boutique/kustomize/dashboard.yaml diff --git a/online-boutique/kustomize/frontend-admin-panel.yaml b/ecommerce-online-boutique/kustomize/frontend-admin-panel.yaml similarity index 100% rename from online-boutique/kustomize/frontend-admin-panel.yaml rename to ecommerce-online-boutique/kustomize/frontend-admin-panel.yaml diff --git a/online-boutique/kustomize/ingress.yaml b/ecommerce-online-boutique/kustomize/ingress.yaml similarity index 100% rename from online-boutique/kustomize/ingress.yaml rename to ecommerce-online-boutique/kustomize/ingress.yaml diff --git a/online-boutique/kustomize/kustomization.yaml b/ecommerce-online-boutique/kustomize/kustomization.yaml similarity index 96% rename from online-boutique/kustomize/kustomization.yaml rename to ecommerce-online-boutique/kustomize/kustomization.yaml index b768a2f..10ce2a7 100644 --- a/online-boutique/kustomize/kustomization.yaml +++ b/ecommerce-online-boutique/kustomize/kustomization.yaml @@ -14,7 +14,8 @@ resources: - ingress.yaml - dashboard.yaml - slo.yaml -- velero-schedule.yaml +# TODO: Re-enable? +# - velero-backup.yaml components: - https://github.com/GoogleCloudPlatform/microservices-demo//kustomize/components/network-policies?timeout=90s&ref=6af73dcf7fe1ca653d95ae7a29e12faf8cf02964 - https://github.com/GoogleCloudPlatform/microservices-demo//kustomize/components/non-public-frontend?timeout=90s&ref=6af73dcf7fe1ca653d95ae7a29e12faf8cf02964 diff --git a/online-boutique/kustomize/patch-currency-service-limits.yaml b/ecommerce-online-boutique/kustomize/patch-currency-service-limits.yaml similarity index 100% rename from online-boutique/kustomize/patch-currency-service-limits.yaml rename to ecommerce-online-boutique/kustomize/patch-currency-service-limits.yaml diff --git a/online-boutique/kustomize/patch-enable-tracing.yaml b/ecommerce-online-boutique/kustomize/patch-enable-tracing.yaml similarity index 100% rename from online-boutique/kustomize/patch-enable-tracing.yaml rename to ecommerce-online-boutique/kustomize/patch-enable-tracing.yaml diff --git a/online-boutique/kustomize/patch-frontend-admin-panel.yaml b/ecommerce-online-boutique/kustomize/patch-frontend-admin-panel.yaml similarity index 100% rename from online-boutique/kustomize/patch-frontend-admin-panel.yaml rename to ecommerce-online-boutique/kustomize/patch-frontend-admin-panel.yaml diff --git a/online-boutique/kustomize/patch-loadgenerator-config.yaml b/ecommerce-online-boutique/kustomize/patch-loadgenerator-config.yaml similarity index 100% rename from online-boutique/kustomize/patch-loadgenerator-config.yaml rename to ecommerce-online-boutique/kustomize/patch-loadgenerator-config.yaml diff --git a/online-boutique/kustomize/slo.yaml b/ecommerce-online-boutique/kustomize/slo.yaml similarity index 100% rename from online-boutique/kustomize/slo.yaml rename to ecommerce-online-boutique/kustomize/slo.yaml diff --git a/online-boutique/kustomize/velero-schedule.yaml b/ecommerce-online-boutique/kustomize/velero-schedule.yaml similarity index 86% rename from online-boutique/kustomize/velero-schedule.yaml rename to ecommerce-online-boutique/kustomize/velero-schedule.yaml index 44a0278..f319f26 100644 --- a/online-boutique/kustomize/velero-schedule.yaml +++ b/ecommerce-online-boutique/kustomize/velero-schedule.yaml @@ -9,4 +9,4 @@ spec: template: ttl: 168h0m0s includedNamespaces: - - online-boutique + - ecommerce-online-boutique diff --git a/online-boutique/app.yaml b/tenants/app.yaml similarity index 80% rename from online-boutique/app.yaml rename to tenants/app.yaml index 869dc22..75c829e 100644 --- a/online-boutique/app.yaml +++ b/tenants/app.yaml @@ -1,17 +1,17 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: online-boutique + name: tenants namespace: k8saas-system finalizers: - resources-finalizer.argocd.argoproj.io spec: destination: - namespace: online-boutique + namespace: k8saas-system name: in-cluster - project: default + project: k8saas source: - path: online-boutique + path: tenants repoURL: http://gitea-http.k8saas-system.svc:3000/root/k8saas-frozen targetRevision: HEAD syncPolicy: diff --git a/tenants/kustomize/ecommerce-tenant.yaml b/tenants/kustomize/ecommerce-tenant.yaml new file mode 100644 index 0000000..ba8f47d --- /dev/null +++ b/tenants/kustomize/ecommerce-tenant.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: capsule.clastix.io/v1beta1 +kind: Tenant +metadata: + name: ecommerce + labels: + k8saas.io/tenant: ecommerce +spec: + owners: + - name: oidc:guest@k8saas.io + kind: User + - name: oidc:tenant-ecommerce + kind: Group + namespaceOptions: + quota: 1 +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ecommerce-apps + namespace: k8saas-system + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: ecommerce-apps + name: in-cluster + project: k8saas + source: + path: ecommerce-apps + repoURL: http://gitea-http.k8saas-system.svc:3000/root/k8saas-frozen + targetRevision: HEAD + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/tenants/kustomize/kustomization.yaml b/tenants/kustomize/kustomization.yaml new file mode 100644 index 0000000..b010912 --- /dev/null +++ b/tenants/kustomize/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ecommerce-tenant.yaml