Skip to content

Commit

Permalink
bump version to v0.11.0, update docs, and changelog
Browse files Browse the repository at this point in the history
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
  • Loading branch information
chanwit committed Aug 11, 2022
1 parent 2664b41 commit 125ec0d
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 13 deletions.
22 changes: 18 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes of this project are documented in this file.

# v0.11.0

**Release date:** 2022-08-12

This release is another milestone of the project as it is the first release of TF-controller
that supports Flux's OCIRepository.

New Features and Bug Fixing:
* Added support for Flux's OCIRepository (@chanwit)
* Fixed EnvVars to pick up `valueFrom` to work with Secrets and ConfigMaps (@Nalum)
* Fixed tfctl to show plan in the working directory (@github-vincent-miszczak)
* Updated tfexec to v0.16.1 for the force-lock option (@chanwit)
* Updated the Source controller to v0.26.1 (@chanwit)

# v0.10.1

**Release date:** 2022-08-05
Expand Down Expand Up @@ -42,7 +56,7 @@ This pre-release contains the following changes.
New Features:
* Update Terraform binary to 1.1.9 (@chanwit)
* Allow runner pod metadata customization (@tomhuang12)
* Support runner pod environment variables specification (@nalum)
* Support runner pod environment variables specification (@Nalum)
* Implement `.spec.refreshBeforeApply` to refresh the state before apply (@chanwit)
* Use controller runtime logging library in runner (@chanwit)

Expand All @@ -58,11 +72,11 @@ Bug Fixing:
This pre-release contains the following changes.

New Features and Bug Fixing:
* Fix Helm chart to support image pull secrets for `tf-runner` Service Accounts (@nalum)
* Fix Helm chart to support image pull secrets for `tf-runner` Service Accounts (@Nalum)
* Upgrade Source Controller API to v0.22.4 (@tomhuang12)
* Fix json bytes encoding (@phoban01)
* Add Helm chart an option to specify AWS Security Group policy (@nalum)
* Move plan revision from labels to annotations (@nalum)
* Add Helm chart an option to specify AWS Security Group policy (@Nalum)
* Move plan revision from labels to annotations (@Nalum)
* Update images to include fix for CVE-2022-28391 (@chanwit)
* Update Terraform binary to 1.1.8 (@chanwit)

Expand Down
4 changes: 2 additions & 2 deletions charts/tf-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: tf-controller
description: The Helm chart for Weave GitOps Terraform Controller
type: application
version: 0.4.2
appVersion: "v0.11.0-rc.3"
version: 0.4.3
appVersion: "v0.11.0"
4 changes: 2 additions & 2 deletions charts/tf-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ image:
repository: ghcr.io/weaveworks/tf-controller
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.11.0-rc.3"
tag: "v0.11.0"
# extraEnv -- Additional container environment variables.
extraEnv: {}
imagePullSecrets: []
Expand All @@ -27,7 +27,7 @@ serviceAccount:
runner:
image:
repository: ghcr.io/weaveworks/tf-runner
tag: "v0.11.0-rc.3"
tag: "v0.11.0"
serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ generatorOptions:
images:
- name: weaveworks/tf-controller
newName: ghcr.io/weaveworks/tf-controller
newTag: v0.11.0-rc.3
newTag: v0.11.0
6 changes: 3 additions & 3 deletions docs/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
sourceRef:
kind: HelmRepository
name: tf-controller
version: '>=0.3.0'
version: '>=0.4.3'
interval: 1h0s
releaseName: tf-controller
targetNamespace: flux-system
Expand All @@ -41,7 +41,7 @@ spec:
caCertValidityDuration: 24h
certRotationCheckFrequency: 30m
image:
tag: v0.10.1
tag: v0.11.0
runner:
image:
tag: v0.10.1
tag: v0.11.0
49 changes: 48 additions & 1 deletion docs/use_cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,4 +451,51 @@ spec:
image: registry.io/tf-runner:xyz
```

You can use [`runner.Dockerfile`](https://github.com/weaveworks/tf-controller/blob/main/runner.Dockerfile) as a basis of customizing runner pod image.
You can use [`runner.Dockerfile`](https://github.com/weaveworks/tf-controller/blob/main/runner.Dockerfile) as a basis of customizing runner pod image.

## Using OCI Artifact as Source

To use OCI artifacts as the source of TF-controller, you need Flux2 version v0.32.0 or higher.

Assuming that you have Terraform files (your root module may contain sub-modules) under ./modules,
you can use Flux CLI to create an OCI artifact for your Terraform modules
by running the following commands:

```bash
flux push artifact oci://ghcr.io/tf-controller/helloworld:$(git rev-parse --short HEAD) \
--path="./modules" \
--source="$(git config --get remote.origin.url)" \
--revision="$(git branch --show-current)/$(git rev-parse HEAD)"
flux tag artifact oci://ghcr.io/tf-controller/helloworld:$(git rev-parse --short HEAD) \
--tag main
```

Then you define a source (`OCIRepository`), and use it as the `sourceRef` of your Terraform object.

```yaml
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
name: helloworld-oci
spec:
interval: 1m
url: oci://ghcr.io/tf-controller/helloworld
ref:
tag: main
---
apiVersion: infra.contrib.fluxcd.io/v1alpha1
kind: Terraform
metadata:
name: helloworld-tf-oci
spec:
path: ./
approvePlan: "auto"
interval: 1m
sourceRef:
kind: OCIRepository
name: helloworld-oci
writeOutputsToSecret:
name: helloworld-outputs
```

0 comments on commit 125ec0d

Please sign in to comment.