Created
December 14, 2019 12:58
-
-
Save jvanbruegge/2e20fe45178d08a04a42a2d1ae267658 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: haproxy | |
| --- | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: ingresses-controller | |
| namespace: haproxy | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRole | |
| metadata: | |
| name: ingresses-controller | |
| namespace: haproxy | |
| rules: | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - configmaps | |
| - endpoints | |
| - nodes | |
| - pods | |
| - secrets | |
| verbs: | |
| - list | |
| - watch | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - nodes | |
| verbs: | |
| - get | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - services | |
| verbs: | |
| - get | |
| - list | |
| - watch | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - events | |
| verbs: | |
| - create | |
| - patch | |
| - apiGroups: | |
| - extensions | |
| resources: | |
| - ingresses | |
| verbs: | |
| - get | |
| - list | |
| - watch | |
| - apiGroups: | |
| - extensions | |
| resources: | |
| - ingresses/status | |
| verbs: | |
| - update | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRoleBinding | |
| metadata: | |
| name: ingresses-controller | |
| namespace: haproxy | |
| roleRef: | |
| apiGroup: rbac.authorization.k8s.io | |
| kind: ClusterRole | |
| name: ingresses-controller | |
| subjects: | |
| - kind: ServiceAccount | |
| name: ingress-controller | |
| namespace: haproxy | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: Role | |
| metadata: | |
| name: ingresses-controller | |
| namespace: haproxy | |
| rules: | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - configmaps | |
| - pods | |
| - secrets | |
| - namespaces | |
| verbs: | |
| - get | |
| - apiGroups: | |
| - "" | |
| resources: | |
| - configmaps | |
| - endpoints | |
| verbs: | |
| - get | |
| - update | |
| - create | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: RoleBinding | |
| metadata: | |
| name: ingresses-controller | |
| namespace: haproxy | |
| roleRef: | |
| apiGroup: rbac.authorization.k8s.io | |
| kind: Role | |
| name: ingresses-controller | |
| subjects: | |
| - kind: ServiceAccount | |
| name: ingress-controller | |
| namespace: haproxy | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: ingress-default-backend | |
| namespace: haproxy | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: ingress-default-backend | |
| template: | |
| metadata: | |
| labels: | |
| app: ingress-default-backend | |
| name: ingress-default-backend | |
| spec: | |
| containers: | |
| - image: gcr.io/google_containers/defaultbackend:1.0 | |
| name: ingress-default-backend | |
| ports: | |
| - containerPort: 8080 | |
| name: http | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: ingress-default-backend | |
| namespace: haproxy | |
| spec: | |
| ports: | |
| - name: http | |
| port: 8080 | |
| targetPort: 8080 | |
| selector: | |
| app: ingress-default-backend | |
| --- | |
| apiVersion: v1 | |
| data: | |
| backend-server-slots-increment: "4" | |
| ssl-dh-default-max-size: "2048" | |
| kind: ConfigMap | |
| metadata: | |
| name: haproxy-config | |
| namespace: haproxy | |
| --- | |
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: haproxy-tcp-config | |
| namespace: haproxy | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: haproxy | |
| namespace: haproxy | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: haproxy | |
| template: | |
| metadata: | |
| labels: | |
| app: haproxy | |
| name: haproxy | |
| spec: | |
| containers: | |
| - args: | |
| - "--default-backend-service=haproxy/ingress-default-backend" | |
| - "--configmap=haproxy/haproxy-config" | |
| - "--tcp-services-configmap=haproxy/haproxy-tcp-config" | |
| - "--reload-strategy=native" | |
| env: | |
| - name: POD_NAME | |
| valueFrom: | |
| fieldRef: | |
| fieldPath: metadata.name | |
| - name: POD_NAMESPACE | |
| valueFrom: | |
| fieldRef: | |
| fieldPath: metadata.namespace | |
| image: quay.io/jcmoraisjr/haproxy-ingress:v0.7 | |
| imagePullPolicy: IfNotPresent | |
| name: haproxy-ingress | |
| ports: | |
| - containerPort: 80 | |
| name: http | |
| protocol: TCP | |
| - containerPort: 443 | |
| name: https | |
| protocol: TCP | |
| - containerPort: 1936 | |
| name: stats | |
| protocol: TCP | |
| serviceAccountName: ingress-controller | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: haproxy | |
| namespace: haproxy | |
| spec: | |
| externalIPs: | |
| - "5.189.142.109" | |
| - "192.168.99.100" | |
| ports: | |
| - name: http | |
| port: 80 | |
| protocol: TCP | |
| targetPort: 80 | |
| - name: https | |
| port: 443 | |
| protocol: TCP | |
| targetPort: 443 | |
| - name: stats | |
| port: 1936 | |
| protocol: TCP | |
| targetPort: 1936 | |
| selector: | |
| app: haproxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment