forked from projectcontour/contour
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deployment: move Contour deployment to Kustomize
Move the example deployment to Kustomize. This breaks the YAML documents in the example deployment into 4 components located in `config/components` - types, contour, envoy and certgen. These are all included in the default deployments, but operators have the option of creating deployments that dont't include all the components. Deployments to various Kubernetes infrastructure are in the `deployment` directory. The base deployment pulls in all the components and sets the namespace to `projectcontour`. The `kind` deployment updates the Envoy Daemonset to use a `NodePort` service, and the `aws` deployment enables TCP load balancing with PROXY protocol support. No special options are needed for `gke` as far as I know, but it is included for completeness. The traditional quickstart YAML is now located at `config/quickstary.yaml` and is just a rendering of the base deployment. The netlify redirect can't be updated until after a release because it points to a release branch. This updates projectcontour#855, projectcontour#1190, projectcontour#2088, projectcontour#2544. Signed-off-by: James Peach <jpeach@vmware.com>
- Loading branch information
Showing
45 changed files
with
3,404 additions
and
1,989 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: contour-certgen | ||
spec: | ||
ttlSecondsAfterFinished: 0 | ||
template: | ||
metadata: | ||
labels: | ||
app: "contour-certgen" | ||
spec: | ||
containers: | ||
- name: contour | ||
image: projectcontour/contour | ||
imagePullPolicy: Always | ||
command: | ||
- contour | ||
- certgen | ||
- --incluster | ||
- --kube | ||
- --namespace=$(CONTOUR_NAMESPACE) | ||
env: | ||
- name: CONTOUR_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
restartPolicy: Never | ||
serviceAccountName: contour-certgen | ||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 65534 | ||
runAsGroup: 65534 | ||
parallelism: 1 | ||
completions: 1 | ||
backoffLimit: 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- job.yaml | ||
- rbac.yaml | ||
- serviceaccount.yaml | ||
|
||
# This version is set to latest because Job specs are immutable; | ||
# if we change this on each version, you can no longer upgrade | ||
# just by applying the deployment YAML. | ||
# | ||
# See #2423, #2395, #2150, and #2030 for earlier questions about this. | ||
images: | ||
- name: projectcontour/contour | ||
newName: docker.io/projectcontour/contour | ||
newTag: master |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: RoleBinding | ||
metadata: | ||
name: contour | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: contour-certgen | ||
subjects: | ||
- kind: ServiceAccount | ||
name: contour-certgen | ||
|
||
--- | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: Role | ||
metadata: | ||
name: contour-certgen | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- list | ||
- watch | ||
- create | ||
- get | ||
- put | ||
- post | ||
- patch |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: contour-certgen |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Whether contour should expect to be running inside a k8s cluster. | ||
# incluster: true | ||
|
||
# Path to kubeconfig (if not running inside a k8s cluster). | ||
# kubeconfig: /path/to/.kube/config | ||
|
||
# Client request timeout to be passed to Envoy | ||
# as the connection manager request_timeout. | ||
# Defaults to 0, which Envoy interprets as disabled. | ||
# Note that this is the timeout for the whole request, | ||
# not an idle timeout. | ||
# request-timeout: 0s | ||
|
||
# Whether to disable the HTTPProxy permitInsecure field. | ||
disablePermitInsecure: false | ||
|
||
tls: | ||
# minimum TLS version that Contour will negotiate | ||
# minimum-protocol-version: "1.1" | ||
|
||
# The following config shows the defaults for the leader election. | ||
# leaderelection: | ||
# configmap-name: leader-elect | ||
# configmap-namespace: projectcontour | ||
|
||
# Logging options | ||
accesslog-format: envoy | ||
|
||
# To enable JSON logging in Envoy | ||
# accesslog-format: json | ||
# The default fields that will be logged are specified below. | ||
# To customize this list, just add or remove entries. | ||
# The canonical list is available at | ||
# https://godoc.org/github.com/projectcontour/contour/internal/envoy#JSONFields | ||
# json-fields: | ||
# - "@timestamp" | ||
# - "authority" | ||
# - "bytes_received" | ||
# - "bytes_sent" | ||
# - "downstream_local_address" | ||
# - "downstream_remote_address" | ||
# - "duration" | ||
# - "method" | ||
# - "path" | ||
# - "protocol" | ||
# - "request_id" | ||
# - "requested_server_name" | ||
# - "response_code" | ||
# - "response_flags" | ||
# - "uber_trace_id" | ||
# - "upstream_cluster" | ||
# - "upstream_host" | ||
# - "upstream_local_address" | ||
# - "upstream_service_time" | ||
# - "user_agent" | ||
# - "x_forwarded_for" |
This file contains 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
2 changes: 0 additions & 2 deletions
2
examples/contour/03-contour.yaml → config/components/contour/deployment.yaml
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: Role | ||
metadata: | ||
name: contour-leaderelection | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- create | ||
- get | ||
- list | ||
- watch | ||
- update | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- events | ||
verbs: | ||
- create | ||
- update | ||
- patch | ||
|
||
--- | ||
|
||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: RoleBinding | ||
metadata: | ||
name: contour-leaderelection | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: contour-leaderelection | ||
subjects: | ||
- kind: ServiceAccount | ||
name: contour |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- serviceaccount.yaml | ||
- contour-rbac.yaml | ||
- election-rbac.yaml | ||
- deployment.yaml | ||
- service.yaml | ||
|
||
configMapGenerator: | ||
- name: contour | ||
files: | ||
- configs/contour.yaml | ||
|
||
images: | ||
- name: projectcontour/contour | ||
newName: docker.io/projectcontour/contour | ||
newTag: master |
2 changes: 0 additions & 2 deletions
2
examples/contour/02-service-contour.yaml → config/components/contour/service.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: contour | ||
namespace: projectcontour | ||
spec: | ||
ports: | ||
- port: 8001 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: contour | ||
namespace: projectcontour |
Oops, something went wrong.