Skip to content

Commit

Permalink
generate ingress-nginx manifests (#133)
Browse files Browse the repository at this point in the history
Signed-off-by: Manabu McCloskey <[email protected]>
  • Loading branch information
nabuskey authored Jan 29, 2024
1 parent 538e3b2 commit 5194086
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 0 deletions.
43 changes: 43 additions & 0 deletions hack/ingress-nginx/deployment-ingress-nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ingress-nginx-controller
namespace: ingress-nginx
spec:
strategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
app.kubernetes.io/version: 1.8.1
spec:
terminationGracePeriodSeconds: 0
containers:
- name: controller
args:
- /nginx-ingress-controller
- --election-id=ingress-nginx-leader
- --controller-class=k8s.io/ingress-nginx
- --ingress-class=nginx
- --configmap=$(POD_NAMESPACE)/ingress-nginx-controller
- --validating-webhook=:8443
- --validating-webhook-certificate=/usr/local/certificates/cert
- --validating-webhook-key=/usr/local/certificates/key
- --watch-ingress-without-class=true
- --publish-status-address=localhost
- --enable-ssl-passthrough
ports:
- containerPort: 80
hostPort: 80
name: http
protocol: TCP
- containerPort: 443
hostPort: 443
name: https
protocol: TCP
5 changes: 5 additions & 0 deletions hack/ingress-nginx/generate-manifests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INSTALL_YAML="pkg/controllers/localbuild/resources/nginx/k8s/ingress-nginx.yaml"

echo "# INGRESS-NGINX INSTALL RESOURCES" > ${INSTALL_YAML}
echo "# This file is auto-generated with 'hack/ingress-nginx/generate-manifests.sh'" >> ${INSTALL_YAML}
kustomize build ./hack/ingress-nginx/ >> ${INSTALL_YAML}
21 changes: 21 additions & 0 deletions hack/ingress-nginx/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.8.1/deploy/static/provider/cloud/deploy.yaml

patches:
- path: deployment-ingress-nginx.yaml
- path: service-ingress-nginx.yaml
- target:
group: ""
version: v1
kind: Service
name: ingress-nginx-controller
namespace: ingress-nginx
patch: |-
- op: remove
path: /spec/externalTrafficPolicy
- op: replace
path: /spec/type
value: NodePort
15 changes: 15 additions & 0 deletions hack/ingress-nginx/service-ingress-nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: ingress-nginx-controller
namespace: ingress-nginx
spec:
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- appProtocol: https
name: https-8443
port: 8443
protocol: TCP
targetPort: https
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# INGRESS-NGINX INSTALL RESOURCES
# This file is auto-generated with 'hack/ingress-nginx/generate-manifests.sh'
apiVersion: v1
kind: Namespace
metadata:
Expand Down Expand Up @@ -348,6 +350,11 @@ spec:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- appProtocol: https
name: https-8443
port: 8443
protocol: TCP
targetPort: https
- appProtocol: http
name: http
port: 80
Expand Down

0 comments on commit 5194086

Please sign in to comment.