diff --git a/ansible-5/roles/prod.k3s/defaults/main.yml b/ansible-5/roles/prod.k3s/defaults/main.yml index 4e73d86..9e34d5e 100644 --- a/ansible-5/roles/prod.k3s/defaults/main.yml +++ b/ansible-5/roles/prod.k3s/defaults/main.yml @@ -90,7 +90,7 @@ apps: hello_world: enabled: true namespace: default - state: absent + state: present funkwhale: enabled: true diff --git a/ansible-5/roles/prod.k3s/files/hello-world/deployment.yaml b/ansible-5/roles/prod.k3s/files/hello-world/deployment.yaml index f876784..848a514 100644 --- a/ansible-5/roles/prod.k3s/files/hello-world/deployment.yaml +++ b/ansible-5/roles/prod.k3s/files/hello-world/deployment.yaml @@ -13,6 +13,9 @@ spec: metadata: labels: app: hello-world + annotations: + # Mandatory annotation for auto-discovery when using bunkerweb-controller + bunkerweb.io/INSTANCE: "yes" spec: containers: - name: nginx @@ -22,6 +25,22 @@ spec: volumeMounts: - name: hello-world-volume mountPath: /usr/share/nginx/html + # Sidecar BunkerWeb + - name: bunkerweb + image: bunkerity/bunkerweb:latest + ports: + - containerPort: 8080 + name: entrypoint + - containerPort: 5000 + name: bwapi + - containerPort: 9113 + name: metrics + env: + - name: API_WHITELIST_IP + value: "127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.4.0/16" + - name: KUBERNETES_MODE + value: "yes" + volumes: - name: hello-world-volume configMap: diff --git a/ansible-5/roles/prod.k3s/files/hello-world/service.yaml b/ansible-5/roles/prod.k3s/files/hello-world/service.yaml index 4d2e7ca..a1a5766 100644 --- a/ansible-5/roles/prod.k3s/files/hello-world/service.yaml +++ b/ansible-5/roles/prod.k3s/files/hello-world/service.yaml @@ -7,6 +7,7 @@ metadata: spec: ports: - port: 80 + targetPort: 8080 protocol: TCP selector: app: hello-world