From c64028705ba61f96e8deaeeb6ea4271d236f8f55 Mon Sep 17 00:00:00 2001 From: Saul Date: Thu, 15 Jul 2021 16:16:58 +0200 Subject: [PATCH] feat: add namespace for release --- config/base/deploy.yml | 14 +++++++------- config/base/kustomization.yaml | 2 +- config/default/kustomization.yaml | 2 +- config/deploy/operator.yml | 14 +++++++------- config/manager/manager.yaml | 7 ++++++- config/samples/example_ingress.yaml | 2 +- .../templating.flanksource.com_v1_template.yaml | 2 +- examples/static-secret.yaml | 2 +- test/e2e.go | 2 +- test/patch1.yaml | 4 ++-- 10 files changed, 28 insertions(+), 23 deletions(-) diff --git a/config/base/deploy.yml b/config/base/deploy.yml index 96c090b..e8dfbe2 100644 --- a/config/base/deploy.yml +++ b/config/base/deploy.yml @@ -2,13 +2,13 @@ apiVersion: v1 kind: ServiceAccount metadata: name: template-operator-manager - namespace: platform-system + namespace: template-operator --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: template-operator-leader-election-role - namespace: platform-system + namespace: template-operator rules: - apiGroups: - "" @@ -54,7 +54,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: template-operator-leader-election-rolebinding - namespace: platform-system + namespace: template-operator roleRef: apiGroup: rbac.authorization.k8s.io kind: Role @@ -62,7 +62,7 @@ roleRef: subjects: - kind: ServiceAccount name: template-operator-manager - namespace: platform-system + namespace: template-operator --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -75,7 +75,7 @@ roleRef: subjects: - kind: ServiceAccount name: template-operator-manager - namespace: platform-system + namespace: template-operator --- apiVersion: v1 kind: Service @@ -85,7 +85,7 @@ metadata: labels: control-plane: template-operator name: template-operator-template-operator - namespace: platform-system + namespace: template-operator spec: ports: - name: prometheus @@ -100,7 +100,7 @@ metadata: labels: control-plane: template-operator name: template-operator-controller-manager - namespace: platform-system + namespace: template-operator spec: replicas: 1 selector: diff --git a/config/base/kustomization.yaml b/config/base/kustomization.yaml index b01683f..b7c17be 100644 --- a/config/base/kustomization.yaml +++ b/config/base/kustomization.yaml @@ -1,5 +1,5 @@ # Adds namespace to all resources. -namespace: platform-system +namespace: template-operator namePrefix: template-operator- diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 5c1e34f..7e798ea 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,5 +1,5 @@ # Adds namespace to all resources. -namespace: platform-system +namespace: template-operator # Value of this field is prepended to the # names of all resources, e.g. a deployment named diff --git a/config/deploy/operator.yml b/config/deploy/operator.yml index af4284d..02c1707 100644 --- a/config/deploy/operator.yml +++ b/config/deploy/operator.yml @@ -369,13 +369,13 @@ apiVersion: v1 kind: ServiceAccount metadata: name: template-operator-manager - namespace: platform-system + namespace: template-operator --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: template-operator-leader-election-role - namespace: platform-system + namespace: template-operator rules: - apiGroups: - "" @@ -421,7 +421,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: template-operator-leader-election-rolebinding - namespace: platform-system + namespace: template-operator roleRef: apiGroup: rbac.authorization.k8s.io kind: Role @@ -429,7 +429,7 @@ roleRef: subjects: - kind: ServiceAccount name: template-operator-manager - namespace: platform-system + namespace: template-operator --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -442,7 +442,7 @@ roleRef: subjects: - kind: ServiceAccount name: template-operator-manager - namespace: platform-system + namespace: template-operator --- apiVersion: v1 kind: Service @@ -452,7 +452,7 @@ metadata: labels: control-plane: template-operator name: template-operator-template-operator - namespace: platform-system + namespace: template-operator spec: ports: - name: prometheus @@ -467,7 +467,7 @@ metadata: labels: control-plane: template-operator name: template-operator-controller-manager - namespace: platform-system + namespace: template-operator spec: replicas: 1 selector: diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index fb429f8..7a09df0 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -1,3 +1,8 @@ +kind: Namespace +apiVersion: v1 +metadata: + name: template-operator +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -46,7 +51,7 @@ apiVersion: v1 kind: Service metadata: name: template-operator - namespace: platform-system + namespace: template-operator annotations: prometheus.io/scrape: "true" labels: diff --git a/config/samples/example_ingress.yaml b/config/samples/example_ingress.yaml index 639c123..eb2f158 100644 --- a/config/samples/example_ingress.yaml +++ b/config/samples/example_ingress.yaml @@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: example-ingress - namespace: platform-system + namespace: template-operator labels: "platform.flanksource.com/autocomplete-ingress-domain": "true" spec: diff --git a/config/samples/templating.flanksource.com_v1_template.yaml b/config/samples/templating.flanksource.com_v1_template.yaml index 97c4577..221138f 100644 --- a/config/samples/templating.flanksource.com_v1_template.yaml +++ b/config/samples/templating.flanksource.com_v1_template.yaml @@ -2,7 +2,7 @@ apiVersion: templating.flanksource.com/v1 kind: Template metadata: name: dynamic-ingress-hostnames - namespace: platform-system + namespace: template-operator spec: onceoff: true # need to set this flag as otherwise it will trigger an endless loop appending the domain to iteself. source: diff --git a/examples/static-secret.yaml b/examples/static-secret.yaml index 208665f..d6eabfb 100644 --- a/examples/static-secret.yaml +++ b/examples/static-secret.yaml @@ -35,5 +35,5 @@ spec: namespaces: - minio - monitoring - - platform-system + - template-operator - quack \ No newline at end of file diff --git a/test/e2e.go b/test/e2e.go index 3c95b43..61b00f5 100644 --- a/test/e2e.go +++ b/test/e2e.go @@ -34,7 +34,7 @@ import ( ) const ( - namespace = "platform-system" + namespace = "template-operator" deployment = "template-operator-controller-manager" ) diff --git a/test/patch1.yaml b/test/patch1.yaml index c69ea75..f2ea976 100644 --- a/test/patch1.yaml +++ b/test/patch1.yaml @@ -128,7 +128,7 @@ metadata: # Disable reload/all in tests annotations: null name: platform-operator - namespace: platform-system + namespace: template-operator spec: replicas: 1 template: @@ -148,7 +148,7 @@ metadata: # Disable reload/all in tests annotations: null name: canary-checker - namespace: platform-system + namespace: template-operator spec: template: metadata: