Skip to content

Commit

Permalink
add install docs for gke autopilot
Browse files Browse the repository at this point in the history
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
  • Loading branch information
chanwit committed Sep 13, 2023
1 parent aca6f62 commit 1be5e71
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,35 @@ For the most recent release candidate of TF-controller, please use [rc.yaml](htt
kubectl apply -f https://raw.githubusercontent.com/weaveworks/tf-controller/main/docs/rc.yaml
```

### Installation on GKE

As of September 2023, GKE Autopilot clusters will use Cloud DNS for internal DNS resolution.
This means that the default DNS resolution method used by TF-controller will not work.
To use TF-controller on GKE Autopilot, you must set flag `--use-pod-subdomain-resolution=true` on the TF-controller deployment.
This flag can be set by adding the following to the TF-controller HelmRelease:

```yaml
spec:
values:
usePodSubdomainResolution: true
runner:
allowedNamespaces:
- flux-system
- dev-team
```
Enabling this value will cause TF-controller to use the Pod's subdomain for DNS resolution instead of the default Pod resolution method.
Pod's subdomain resolution requires a Service to be created for the Pod.
The HelmRelease above will create a Service named `tf-runner` in each namespace specified by the `runner.allowedNamespaces` value.

We have provided a HelmRelease to install TF-controller on GKE Autopilot with Pod's subdomain resolution enabled here.

```shell
kubectl apply -f https://raw.githubusercontent.com/weaveworks/tf-controller/main/docs/rc-gke.yaml
```

Tested with GKE Autopilot v1.27.3-gke.100.

### With Branch Planner

```shell
Expand Down
49 changes: 49 additions & 0 deletions docs/rc-gke.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: tf-controller
namespace: flux-system
spec:
interval: 1h0s
type: oci
url: oci://ghcr.io/weaveworks/charts
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: tf-controller
namespace: flux-system
spec:
chart:
spec:
chart: tf-controller
sourceRef:
kind: HelmRepository
name: tf-controller
version: '=0.16.0-rc.3'
interval: 1h0s
releaseName: tf-controller
targetNamespace: flux-system
install:
crds: Create
upgrade:
crds: CreateReplace
values:
replicaCount: 1
concurrency: 24
resources:
limits:
cpu: 1000m
memory: 2Gi
requests:
cpu: 400m
memory: 64Mi
caCertValidityDuration: 24h
certRotationCheckFrequency: 30m
usePodSubdomainResolution: true
image:
tag: v0.16.0-rc.3
runner:
image:
tag: v0.16.0-rc.3

0 comments on commit 1be5e71

Please sign in to comment.