Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*.so
*.dylib
bin
manager
/manager
config/tests/cases/simple/charts
coverage.out

Expand Down
64 changes: 64 additions & 0 deletions config/base/manager/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8sreq-duplicator-controller
labels:
control-plane: controller-manager
spec:
selector:
matchLabels:
control-plane: controller-manager
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: manager
labels:
control-plane: controller-manager
spec:
containers:
- command:
- /manager
args:
- --enable-leader-election
image: ghcr.io/doodlescheduling/k8sreq-duplicator-controller:latest
name: k8sreq-duplicator-controller
imagePullPolicy: Never
ports:
- name: metrics
containerPort: 9556
protocol: TCP
- name: probes
containerPort: 9557
protocol: TCP
- containerPort: 8080
name: http
protocol: TCP
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
livenessProbe:
httpGet:
path: /healthz
port: probes
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /readyz
port: probes
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 100m
memory: 64Mi
terminationGracePeriodSeconds: 10
8 changes: 8 additions & 0 deletions config/base/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
images:
- name: ghcr.io/doodlescheduling/k8sreq-duplicator-controller
newTag: v0.0.1
17 changes: 17 additions & 0 deletions config/base/manager/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: k8sreq-duplicator-controller
spec:
ports:
- port: 8080
targetPort: http
protocol: TCP
name: http
- port: 9556
targetPort: metrics
protocol: TCP
name: metrics
selector:
control-plane: controller-manager
type: ClusterIP
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,6 @@ func main() {
os.Exit(1)
}

s.Shutdown(context.TODO())
_ = s.Shutdown(context.TODO())
wg.Wait()
}