Skip to content

Commit c980b03

Browse files
committed
🚀 Set up required config.
1 parent e56c48c commit c980b03

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

‎config/manager/api-service.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: api-service
5+
namespace: system
6+
spec:
7+
selector:
8+
control-plane: controller-manager
9+
ports:
10+
- port: 5000

‎config/manager/kustomization.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
11
resources:
2+
- api-service.yaml
23
- manager.yaml
4+
5+
# the following config is for teaching kustomize how to do var substitution
6+
vars:
7+
- name: API_SERVICE_NAMESPACE # namespace of the service
8+
objref:
9+
kind: Service
10+
version: v1
11+
name: api-service
12+
fieldref:
13+
fieldpath: metadata.namespace
14+
- name: API_SERVICE_NAME
15+
objref:
16+
kind: Service
17+
version: v1
18+
name: api-service
19+
- name: MANAGER_CONTAINER_IMAGE
20+
objref:
21+
group: apps
22+
kind: Deployment
23+
version: v1
24+
name: controller-manager
25+
fieldref:
26+
fieldpath: spec.template.spec.containers[1].image

‎config/manager/manager.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ spec:
2929
- --enable-leader-election
3030
image: ghcr.io/coderanger/migrations-operator:latest
3131
name: manager
32+
env:
33+
- name: API_HOSTNAME
34+
value: $(API_SERVICE_NAME).$(API_SERVICE_NAMESPACE).svc:5000
35+
- name: WAITER_IMAGE
36+
value: $(MANAGER_CONTAINER_IMAGE)
3237
resources:
3338
limits:
3439
memory: 256M

0 commit comments

Comments
 (0)