Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1076 from flanksource/bugfix/template-operator-na…
Browse files Browse the repository at this point in the history
…mespace

feat: drop duplicate namespace from manifest
  • Loading branch information
paddatrapper committed May 18, 2023
2 parents 7d8281a + 3b7129c commit ea5633b
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 94 deletions.
2 changes: 1 addition & 1 deletion manifests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ ARCH = $(shell uname -m | sed 's/x86_64/amd64/')

bin/kustomize:
@mkdir -p bin
@curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.0.3/kustomize_v4.0.3_$(OS)_$(ARCH).tar.gz | tar xzf - -C bin/ && chmod +x bin/kustomize
@curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.0.3/kustomize_v5.0.3_$(OS)_$(ARCH).tar.gz | tar xzf - -C bin/ && chmod +x bin/kustomize

bin/yq:
@mkdir -p bin
Expand Down
135 changes: 65 additions & 70 deletions manifests/template-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# This file was generated by running 'make template-operator.yaml' in manifests directory
apiVersion: v1
kind: Namespace
metadata:
name: platform-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: template-operator-manager
Expand All @@ -16,45 +11,45 @@ metadata:
name: template-operator-leader-election-role
namespace: platform-system
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: template-operator-manager-role
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
Expand All @@ -66,9 +61,9 @@ roleRef:
kind: Role
name: template-operator-leader-election-role
subjects:
- kind: ServiceAccount
name: template-operator-manager
namespace: platform-system
- kind: ServiceAccount
name: template-operator-manager
namespace: platform-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand All @@ -79,9 +74,9 @@ roleRef:
kind: ClusterRole
name: template-operator-manager-role
subjects:
- kind: ServiceAccount
name: template-operator-manager
namespace: platform-system
- kind: ServiceAccount
name: template-operator-manager
namespace: platform-system
---
apiVersion: v1
kind: Service
Expand All @@ -94,9 +89,9 @@ metadata:
namespace: platform-system
spec:
ports:
- name: prometheus
port: 8080
protocol: TCP
- name: prometheus
port: 8080
protocol: TCP
selector:
control-plane: template-operator
---
Expand All @@ -118,28 +113,28 @@ spec:
control-plane: template-operator
spec:
containers:
- args:
- --metrics-addr=0.0.0.0:8080
- --enable-leader-election
- --sync-period={{ .templateOperator.syncPeriod | default "5m" }}
image: docker.io/flanksource/template-operator:{{.templateOperator.version}}
name: manager
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 100m
memory: 200Mi
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=2
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
- args:
- --metrics-addr=0.0.0.0:8080
- --enable-leader-election
- --sync-period={{ .templateOperator.syncPeriod | default "5m" }}
image: docker.io/flanksource/template-operator:{{.templateOperator.version}}
name: manager
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 100m
memory: 200Mi
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=2
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
serviceAccount: template-operator-manager
terminationGracePeriodSeconds: 10
terminationGracePeriodSeconds: 10
52 changes: 29 additions & 23 deletions manifests/upstream/template-operator/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,32 @@ images:
- name: flanksource/template-operator
newName: docker.io/flanksource/template-operator
newTag: "{{.templateOperator.version}}"
patchesStrategicMerge:
- |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: template-operator-controller-manager
namespace: template-operator
spec:
template:
spec:
containers:
- name: manager
args:
- --metrics-addr=0.0.0.0:8080
- --enable-leader-election
- "--sync-period={{ .templateOperator.syncPeriod | default \"5m\" }}"
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 100m
memory: 200Mi
patches:
- patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: template-operator-controller-manager
namespace: template-operator
spec:
template:
spec:
containers:
- name: manager
args:
- --metrics-addr=0.0.0.0:8080
- --enable-leader-election
- "--sync-period={{ .templateOperator.syncPeriod | default \"5m\" }}"
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 100m
memory: 200Mi
- patch: |-
$patch: delete
apiVersion: v1
kind: Namespace
metadata:
name: template-operator

0 comments on commit ea5633b

Please sign in to comment.