diff --git a/apps/stage-maker/kustomization.yaml b/apps/stage-maker/kustomization.yaml deleted file mode 100644 index 7b83e20..0000000 --- a/apps/stage-maker/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: - - cluster-role-binding.yaml - - namespace-prefix-policy.yaml - - namespace.yaml - - service-account.yaml diff --git a/apps/stage-maker/namespace.yaml b/apps/stage-maker/namespace.yaml deleted file mode 100644 index 3fc73c1..0000000 --- a/apps/stage-maker/namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: stage-maker \ No newline at end of file diff --git a/clusters/ontime-dev/apps.yaml b/clusters/ontime-dev/apps.yaml deleted file mode 100644 index 4ed41ec..0000000 --- a/clusters/ontime-dev/apps.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: kustomize.toolkit.fluxcd.io/v1 -kind: Kustomization -metadata: - name: apps - namespace: flux-system -spec: - interval: 1h - retryInterval: 1m - timeout: 5m - sourceRef: - kind: GitRepository - name: flux-system - path: ./apps - prune: true - wait: true \ No newline at end of file diff --git a/apps/stage-maker/cluster-role-binding.yaml b/infrastructure/ontime-operator/cluster-role-binding.yaml similarity index 91% rename from apps/stage-maker/cluster-role-binding.yaml rename to infrastructure/ontime-operator/cluster-role-binding.yaml index e1dcdbb..297b7c3 100644 --- a/apps/stage-maker/cluster-role-binding.yaml +++ b/infrastructure/ontime-operator/cluster-role-binding.yaml @@ -14,7 +14,7 @@ metadata: subjects: - kind: ServiceAccount name: stage-editor - namespace: stage-maker + namespace: ontime-operator-system roleRef: kind: ClusterRole name: ontime-operator-stage-editor-role @@ -27,7 +27,7 @@ metadata: subjects: - kind: ServiceAccount name: stage-editor - namespace: stage-maker + namespace: ontime-operator-system roleRef: kind: ClusterRole name: edit-namespaces diff --git a/infrastructure/ontime-operator/kustomization.yaml b/infrastructure/ontime-operator/kustomization.yaml index 4fb5e46..e190203 100644 --- a/infrastructure/ontime-operator/kustomization.yaml +++ b/infrastructure/ontime-operator/kustomization.yaml @@ -1,4 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ./deploy.yaml \ No newline at end of file + - ./deploy.yaml + - ./namepsace-prefix-policy.yaml + - ./service-account.yaml \ No newline at end of file diff --git a/apps/stage-maker/namespace-prefix-policy.yaml b/infrastructure/ontime-operator/namespace-prefix-policy.yaml similarity index 95% rename from apps/stage-maker/namespace-prefix-policy.yaml rename to infrastructure/ontime-operator/namespace-prefix-policy.yaml index 7cf1c08..a3910b7 100644 --- a/apps/stage-maker/namespace-prefix-policy.yaml +++ b/infrastructure/ontime-operator/namespace-prefix-policy.yaml @@ -12,7 +12,7 @@ spec: resources: ["namespaces"] matchConditions: - name: 'only-stage-editor' - expression: "request.userInfo.username == 'system:serviceaccount:stage-maker:stage-editor'" + expression: "request.userInfo.username == 'system:serviceaccount:ontime-operator-system:stage-editor'" validations: - expression: "object.metadata.name.startsWith('team-')" message: "All namespaces managed by stage-editor must start with 'team-'" diff --git a/apps/stage-maker/service-account.yaml b/infrastructure/ontime-operator/service-account.yaml similarity index 65% rename from apps/stage-maker/service-account.yaml rename to infrastructure/ontime-operator/service-account.yaml index b1f61c8..7c97730 100644 --- a/apps/stage-maker/service-account.yaml +++ b/infrastructure/ontime-operator/service-account.yaml @@ -2,4 +2,4 @@ apiVersion: v1 kind: ServiceAccount metadata: name: stage-editor - namespace: stage-maker \ No newline at end of file + namespace: ontime-operator-system \ No newline at end of file