-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* put a little note in docs on disabling network * first draft of contour ingress and gateway * put contour chart * minor fixes * put some fakes * more wip * helm client create ns for contour * gateway * testy yamls * gateway provisioner * ck-gateway * more gateway * gateway provider manifest to chart * remove that * add mini tls delegation chart * some cleanup * set use-proxy-protocol * yamling, put shared crds in their own chart * forgot this yaml * some more comments * gateway class renamed ck-gateway, some renaming * testing adjustments & cleanup * fix ingress class name * fix cilium ingress class * try improve tests * lint * lint2 * lint * fix test * change contour chart version * update component contour * update ingress test * little typo * ingressClassName patch * typo * cleanup cilium ingress class * update dir * cleanup * make contour charts updatable * fix gateway yamls * comments * lost braket, * beautify * comments * move tlscertdelegation * lint * undo move enabled config * update charts * match on label my-gateway * improve label check * linter * make ingress check more precise * update helm pull for contour * wait for contour common crds * add missing returns * change name in api resources await * change chart helm pull * missed a little name change * comment update Co-authored-by: eaudetcobello <155978570+eaudetcobello@users.noreply.github.com> * update resources for group version * rewrite wait for crds for two groups * update wait for crds * the rest of my comment * maybe now I understand api group conventions * Revert "maybe now I understand api group conventions" This reverts commit 854f205. * correct api-resource name * update chart helm pull * remove resource.group check optional param * cleanup * make it two loops * add images * comments --------- Co-authored-by: eaudetcobello <155978570+eaudetcobello@users.noreply.github.com>
- Loading branch information
1 parent
488418b
commit 78f406c
Showing
25 changed files
with
580 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
|
||
CONTOUR_VERSION="v1.28.2" | ||
DIR=$(realpath $(dirname "${0}")) | ||
CHARTS_PATH="$DIR/../../k8s/components/charts" | ||
|
||
cd "$CHARTS_PATH" | ||
# Download the common CRDs | ||
echo "Downloading common CRDs from Contour ${CONTOUR_VERSION}" | ||
|
||
git clone https://github.com/projectcontour/contour --depth 1 -b "${CONTOUR_VERSION}" contour-src | ||
# curl -s -o "${CHARTS_PATH}/contour/templates/common-crds.yaml" "${COMMON_URL}" | ||
|
||
# Common CRDS for contour gateway and ingress | ||
rm -rf "ck-contour-common-${CONTOUR_VERSION:1}.tgz" | ||
helm create ck-contour-common | ||
|
||
rm -rf ck-contour-common/templates | ||
rm -rf ck-contour-common/charts | ||
rm -rf ck-contour-common/values.yaml | ||
mkdir -p ck-contour-common/crds | ||
|
||
cp contour-src/examples/contour/01-crds.yaml ck-contour-common/crds/ | ||
sed -i 's/^\(version: \).*$/\1'"${CONTOUR_VERSION:1}"'/' ck-contour-common/Chart.yaml | ||
sed -i 's/^\(appVersion: \).*$/\1'"${CONTOUR_VERSION:1}"'/' ck-contour-common/Chart.yaml | ||
sed -i 's/^\(description: \).*$/\1'"A Helm Chart containing Contour common CRDs"'/' ck-contour-common/Chart.yaml | ||
|
||
helm package ck-contour-common | ||
rm -rf ck-contour-common | ||
|
||
# Contour Gateway Provisioner | ||
helm create ck-gateway-contour | ||
rm -rf ck-gateway-contour/templates/* | ||
rm -rf ck-gateway-contour/charts | ||
rm -rf ck-gateway-contour/values.yaml | ||
mkdir -p ck-gateway-contour/crds | ||
|
||
cp contour-src/examples/gateway/00-crds.yaml ck-gateway-contour/crds/ | ||
cp contour-src/examples/gateway-provisioner/00-common.yaml ck-gateway-contour/templates/ | ||
cp contour-src/examples/gateway-provisioner/01-roles.yaml ck-gateway-contour/templates/ | ||
cp contour-src/examples/gateway-provisioner/02-rolebindings.yaml ck-gateway-contour/templates/ | ||
cp contour-src/examples/gateway-provisioner/03-gateway-provisioner.yaml ck-gateway-contour/templates/ | ||
|
||
# Add Gateway Class | ||
cat <<EOF >ck-gateway-contour/templates/ck-gateway-class.yaml | ||
--- | ||
kind: GatewayClass | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
metadata: | ||
name: ck-gateway | ||
spec: | ||
controllerName: projectcontour.io/gateway-controller | ||
EOF | ||
# Remove the Namespace resource from 00-common.yaml | ||
sed -i '1,5d' ck-gateway-contour/templates/00-common.yaml | ||
|
||
sed -i 's/^\(version: \).*$/\1'"${CONTOUR_VERSION:1}"'/' ck-gateway-contour/Chart.yaml | ||
sed -i 's/^\(appVersion: \).*$/\1'"${CONTOUR_VERSION:1}"'/' ck-gateway-contour/Chart.yaml | ||
sed -i 's/^\(description: \).*$/\1'"A Helm Chart containing Contour Gateway Provisioner"'/' ck-gateway-contour/Chart.yaml | ||
|
||
helm package ck-gateway-contour | ||
rm -rf ck-gateway-contour | ||
|
||
# Remove the github source code | ||
rm -rf contour-src |
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
Binary file not shown.
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,24 @@ | ||
apiVersion: v2 | ||
name: ck-gateway-cilium | ||
description: A Helm chart for Kubernetes | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "1.16.0" |
7 changes: 7 additions & 0 deletions
7
k8s/manifests/charts/ck-gateway-cilium/templates/gatewayclass.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
kind: GatewayClass | ||
apiVersion: gateway.networking.k8s.io/v1beta1 | ||
metadata: | ||
name: ck-gateway | ||
spec: | ||
controllerName: io.cilium/gateway-controller |
Binary file not shown.
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,24 @@ | ||
apiVersion: v2 | ||
name: ck-ingress-tls | ||
description: A Helm chart for Kubernetes | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "1.16.0" |
10 changes: 10 additions & 0 deletions
10
k8s/manifests/charts/ck-ingress-tls/templates/tlscertificatedelegation.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: projectcontour.io/v1 | ||
kind: TLSCertificateDelegation | ||
metadata: | ||
name: ck-ingress-tls-delegation | ||
namespace: projectcontour-root | ||
spec: | ||
delegations: | ||
- secretName: {{ .Values.defaultTLSSecret}} | ||
targetNamespaces: | ||
- "*" |
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 @@ | ||
# Default values for ck-ingress. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
defaultTLSSecret: "" |
Binary file not shown.
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,53 @@ | ||
package contour | ||
|
||
import ( | ||
"path" | ||
|
||
"github.com/canonical/k8s/pkg/client/helm" | ||
) | ||
|
||
var ( | ||
// chartContour represents manifests to deploy Contour. | ||
// This excludes shared CRDs. | ||
chartContour = helm.InstallableChart{ | ||
Name: "ck-ingress", | ||
Namespace: "projectcontour", | ||
ManifestPath: path.Join("charts", "contour-17.0.4.tgz"), | ||
} | ||
// chartGateway represents manifests to deploy Contour Gateway. | ||
// This excludes shared CRDs. | ||
chartGateway = helm.InstallableChart{ | ||
Name: "ck-gateway", | ||
Namespace: "projectcontour", | ||
ManifestPath: path.Join("charts", "ck-gateway-contour-1.28.2.tgz"), | ||
} | ||
// chartDefaultTLS represents manifests to deploy a delegation resource for the default TLS secret. | ||
chartDefaultTLS = helm.InstallableChart{ | ||
Name: "ck-ingress-tls", | ||
Namespace: "projectcontour-root", | ||
ManifestPath: path.Join("charts", "ck-ingress-tls"), | ||
} | ||
// chartCommonContourCRDS represents manifests to deploy common Contour CRDs. | ||
chartCommonContourCRDS = helm.InstallableChart{ | ||
Name: "ck-contour-common", | ||
Namespace: "projectcontour", | ||
ManifestPath: path.Join("charts", "ck-contour-common-1.28.2.tgz"), | ||
} | ||
// envoyImageRepo represents the image to use for the Contour Envoy proxy. | ||
envoyImageRepo = "docker.io/bitnami/envoy" | ||
|
||
// envoyImageTag is the tag to use for the Contour Envoy proxy image. | ||
envoyImageTag = "1.28.2-debian-12-r0" | ||
|
||
// contourImageRepo represents the image to use for Contour. | ||
contourImageRepo = "docker.io/bitnami/contour" | ||
|
||
// contourImageTag is the tag to use for the Contour image. | ||
contourImageTag = "1.28.2-debian-12-r4" | ||
|
||
// contourGatewayImageRepo represents the image to use for the Contour Gateway Provisioner. | ||
contourGatewayImageRepo = "ghcr.io/projectcontour/contour" | ||
|
||
// contourGatewayImageTag is the tag to use for the Contour Gateway Provisioner image. | ||
contourGatewayImageTag = "v1.28.2" | ||
) |
Oops, something went wrong.