move stage-editor stuff to ontime-operator
This commit is contained in:
@@ -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
|
||||
@@ -1,4 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: stage-maker
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -2,3 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./deploy.yaml
|
||||
- ./namepsace-prefix-policy.yaml
|
||||
- ./service-account.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-'"
|
||||
@@ -2,4 +2,4 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: stage-editor
|
||||
namespace: stage-maker
|
||||
namespace: ontime-operator-system
|
||||
Reference in New Issue
Block a user