After provisioning the cluster, install Contour with Envoy, the CircleCI
release agent, and metrics-server from an operator workstation. Install
Helm and kubectl, and export CIRCLECI_K8S_TOKEN for the release agent.
If needed, use doctl to save kubeconfig first.
make -C area/k8s save-config
kubectl config current-context
The CircleCI chart creates a Role and RoleBinding in lean. If the namespace
is missing, create it with make -C area/apps setup before installing the
add-ons.
make -C area/k8s setup
make -C area/k8s pods
The add-on Makefile pins the chart versions. For
Contour, see the compatibility matrix
before changing the pinned version. The chart installs Contour’s CRDs.
Applications use Kubernetes Ingress with class contour.
Set Contour, Envoy, and shutdown manager resource budgets in the
Contour values and apply them with
make -C area/k8s install-contour. Update the release agent’s resources in
the CircleCI values and apply them with
make -C area/k8s install-circleci.
[!CAUTION]
make -C area/k8s deletedeletes thecontour,circleci, andmetrics-servernamespaces.
Cloudflare uses full SSL mode and connects to Envoy over HTTPS. Envoy
forwards HTTP to app port 8080. Contour trusts one forwarded-header hop
for Cloudflare behind the TCP load balancer. Review the hop count if you add
another HTTP proxy.
Each namespace with public app Ingresses needs an ingress-tls TLS Secret
that covers its configured hosts. After creating the lean namespace, use
the certificate helper if you need a new origin certificate. It requires
OpenSSL and creates a self-signed wildcard certificate for
*.lean-thoughts.com. It removes temporary files on exit and fails if the
Secret already exists.
make -C area/k8s create-ingress-cert
Reuse the existing Secret if it covers the configured hosts. Cloudflare
full (strict) needs a trusted origin certificate, such as Cloudflare
Origin CA.
Schedule a maintenance window when moving the old installation from
projectcontour to contour. Uninstall the old Helm release before
installing the new one so the cluster-scoped resources can be recreated
with the new ownership. The uninstallation removes the old load balancer
and chart-managed Contour CRDs. Export any custom Contour resources first.
Traffic is unavailable until the replacement load balancer is ready and
Cloudflare points to its address.
helm uninstall contour-release --namespace projectcontour --wait --timeout 5m
kubectl delete namespace projectcontour
make -C area/k8s install-contour
make -C area/k8s contour-address
Wait for EXTERNAL-IP, then set balancer_zones[0].ipv4 in
cf.hjson to that address. Reuse class contour and the
existing lean/ingress-tls Secret. Apply DNS and verify the public routes.
make area=cf pulumi-preview
make area=cf pulumi-update
make -C area/apps verify-all
For any public route skipped by verify-all, use the readiness check in
that application’s own docs.