50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
kind: Kustomization
|
|
namespace: ingress-nginx
|
|
|
|
# Create the tcp-services ConfigMap from *quoted* literals
|
|
configMapGenerator:
|
|
- name: tcp-services
|
|
literals:
|
|
- "5432=db/postgres:5432"
|
|
- "7687=graph/neo4j:7687"
|
|
|
|
generatorOptions:
|
|
disableNameSuffixHash: true
|
|
|
|
# Inline JSON6902 patches
|
|
patches:
|
|
# 1) Add controller arg for tcp-services
|
|
- target:
|
|
group: apps
|
|
version: v1
|
|
kind: Deployment
|
|
name: ingress-nginx-controller
|
|
namespace: ingress-nginx
|
|
patch: |-
|
|
- op: add
|
|
path: /spec/template/spec/containers/0/args/-
|
|
value: --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
|
|
|
|
# 2) Expose Service ports 5432 and 7687 (keeps 80/443)
|
|
- target:
|
|
version: v1
|
|
kind: Service
|
|
name: ingress-nginx-controller
|
|
namespace: ingress-nginx
|
|
patch: |-
|
|
- op: add
|
|
path: /spec/ports/-
|
|
value:
|
|
name: tcp-5432
|
|
port: 5432
|
|
protocol: TCP
|
|
targetPort: 5432
|
|
- op: add
|
|
path: /spec/ports/-
|
|
value:
|
|
name: tcp-7687
|
|
port: 7687
|
|
protocol: TCP
|
|
targetPort: 7687
|