diff --git a/examples/customization/custom-configuration/haproxy/README.md b/examples/customization/custom-configuration/haproxy/README.md index 7763413dc..77b13ba15 100644 --- a/examples/customization/custom-configuration/haproxy/README.md +++ b/examples/customization/custom-configuration/haproxy/README.md @@ -6,7 +6,7 @@ This example uses a [ConfigMap](https://kubernetes.io/docs/user-guide/configmap/ This document has the following prerequisites: -Deploy only the tls-secret and the default backend from the [deployment instructions](../../../deployment/haproxy/) +Deploy only the tls-secret and the default backend from the [deployment instructions](/examples/deployment/haproxy) ## Customize the HAProxy configuration @@ -15,16 +15,17 @@ Using a [ConfigMap](https://kubernetes.io/docs/user-guide/configmap/) is possibl For example, if we want to change the syslog-endpoint we need to create a ConfigMap: ``` -$ kubectl create configmap haproxy-conf --from-literal=syslog-endpoint=172.17.8.101 - +$ kubectl create configmap haproxy-ingress --from-literal=syslog-endpoint=172.17.8.101 ``` Create the HAProxy Ingress deployment: + ``` $ kubectl create -f haproxy-custom-configuration.yaml ``` The only difference from the deployment instructions is the --configmap parameter: + ``` - --configmap=default/haproxy-conf ``` diff --git a/examples/customization/custom-configuration/haproxy/haproxy-custom-configuration.yaml b/examples/customization/custom-configuration/haproxy/haproxy-custom-configuration.yaml index 694179f73..796e4c3f8 100644 --- a/examples/customization/custom-configuration/haproxy/haproxy-custom-configuration.yaml +++ b/examples/customization/custom-configuration/haproxy/haproxy-custom-configuration.yaml @@ -5,7 +5,6 @@ metadata: run: haproxy-ingress name: haproxy-ingress spec: - replicas: 1 selector: matchLabels: run: haproxy-ingress @@ -18,9 +17,9 @@ spec: - name: haproxy-ingress image: quay.io/jcmoraisjr/haproxy-ingress args: - - --default-backend-service=default/ingress-default-backend - - --default-ssl-certificate=default/tls-secret - - --configmap=default/haproxy-conf + - --default-backend-service=$(POD_NAMESPACE)/ingress-default-backend + - --default-ssl-certificate=$(POD_NAMESPACE)/tls-secret + - --configmap=$(POD_NAMESPACE)/haproxy-ingress ports: - name: http containerPort: 80 diff --git a/examples/daemonset/haproxy/haproxy-ingress-daemonset.yaml b/examples/daemonset/haproxy/haproxy-ingress-daemonset.yaml index 6d6d689ad..713c92612 100644 --- a/examples/daemonset/haproxy/haproxy-ingress-daemonset.yaml +++ b/examples/daemonset/haproxy/haproxy-ingress-daemonset.yaml @@ -13,10 +13,9 @@ spec: containers: - name: haproxy-ingress image: quay.io/jcmoraisjr/haproxy-ingress - imagePullPolicy: IfNotPresent args: - - --default-backend-service=default/default-http-backend - - --default-ssl-certificate=default/tls-secret + - --default-backend-service=$(POD_NAMESPACE)/default-http-backend + - --default-ssl-certificate=$(POD_NAMESPACE)/tls-secret ports: - name: http containerPort: 80 diff --git a/examples/deployment/haproxy/haproxy-ingress.yaml b/examples/deployment/haproxy/haproxy-ingress.yaml index 84c661b90..796e4c3f8 100644 --- a/examples/deployment/haproxy/haproxy-ingress.yaml +++ b/examples/deployment/haproxy/haproxy-ingress.yaml @@ -5,7 +5,6 @@ metadata: run: haproxy-ingress name: haproxy-ingress spec: - replicas: 1 selector: matchLabels: run: haproxy-ingress @@ -18,9 +17,9 @@ spec: - name: haproxy-ingress image: quay.io/jcmoraisjr/haproxy-ingress args: - - --default-backend-service=default/ingress-default-backend - - --default-ssl-certificate=default/tls-secret - - --configmap=default/haproxy-ingress + - --default-backend-service=$(POD_NAMESPACE)/ingress-default-backend + - --default-ssl-certificate=$(POD_NAMESPACE)/tls-secret + - --configmap=$(POD_NAMESPACE)/haproxy-ingress ports: - name: http containerPort: 80 diff --git a/examples/scaling-deployment/haproxy/haproxy-ingress-deployment.yaml b/examples/scaling-deployment/haproxy/haproxy-ingress-deployment.yaml index 357ed6387..853af0ab5 100644 --- a/examples/scaling-deployment/haproxy/haproxy-ingress-deployment.yaml +++ b/examples/scaling-deployment/haproxy/haproxy-ingress-deployment.yaml @@ -17,10 +17,9 @@ spec: containers: - name: haproxy-ingress image: quay.io/jcmoraisjr/haproxy-ingress - imagePullPolicy: IfNotPresent args: - - --default-backend-service=default/default-http-backend - - --default-ssl-certificate=default/tls-secret + - --default-backend-service=$(POD_NAMESPACE)/default-http-backend + - --default-ssl-certificate=$(POD_NAMESPACE)/tls-secret ports: - name: http containerPort: 80