Skip to content

Commit

Permalink
Merge pull request #157 from fluxcd/release-v0.2.0
Browse files Browse the repository at this point in the history
Release v0.2.0
  • Loading branch information
stefanprodan authored Oct 29, 2020
2 parents 5f76a28 + 72a3aa4 commit 3944752
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 37 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

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

## 0.2.0 (2020-10-29)

This is the second MINOR prerelease, it comes with breaking changes:
* the histogram metric `gotk_reconcile_duration` was renamed to `gotk_reconcile_duration_seconds`
* the annotation `fluxcd.io/reconcileAt` was renamed to `reconcile.fluxcd.io/requestedAt`

Improvements:
* Refactor predicates and enqueuers
[#156](https://github.com/fluxcd/kustomize-controller/pull/156)
[#155](https://github.com/fluxcd/kustomize-controller/pull/155)
[#153](https://github.com/fluxcd/kustomize-controller/pull/153)
* Use annotation helpers
[#152](https://github.com/fluxcd/kustomize-controller/pull/152)
* Suppress health check events when no changes made
[#151](https://github.com/fluxcd/kustomize-controller/pull/151)
* Use controller-runtime utils for finalizer and health checks
[#150](https://github.com/fluxcd/kustomize-controller/pull/150)
* Improve remote cluster documentation
[#148](https://github.com/fluxcd/kustomize-controller/pull/148)

## 0.1.2 (2020-10-16)

This prerelease comes with support for
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /workspace

RUN apk add --no-cache ca-certificates curl

RUN kubectl_ver=1.19.2 && \
RUN kubectl_ver=1.19.3 && \
arch=${TARGETPLATFORM:-linux/amd64} && \
if [ "$TARGETPLATFORM" == "linux/arm/v7" ]; then arch="linux/arm"; fi && \
curl -sL https://storage.googleapis.com/kubernetes-release/release/v${kubectl_ver}/bin/${arch}/kubectl \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
IMG ?= fluxcd/kustomize-controller:latest
# Produce CRDs that work back to Kubernetes 1.16
CRD_OPTIONS ?= crd:crdVersions=v1
SOURCE_VER ?= v0.1.1
SOURCE_VER ?= v0.2.0

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -96,7 +96,7 @@ docker-push:

# Set the docker image in-cluster
docker-deploy:
kubectl -n gotk-system set image deployment/kustomize-controller manager=${IMG}
kubectl -n flux-system set image deployment/kustomize-controller manager=${IMG}

# find or download controller-gen
# download controller-gen if necessary
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ to acquire the Kubernetes manifests from Git repositories and S3 compatible stor

### Install the toolkit controllers

Download the [toolkit CLI](https://github.com/fluxcd/toolkit/tree/master/install):
Download the flux CLI:

```bash
curl -s https://toolkit.fluxcd.io/install.sh | sudo bash
```

Install the toolkit controllers in the `gotk-system` namespace:
Install the toolkit controllers in the `flux-system` namespace:

```bash
gotk install
flux install
```

### Define a Git repository source
Expand All @@ -58,7 +58,7 @@ apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: podinfo
namespace: gotk-system
namespace: flux-system
spec:
interval: 1m
url: https://github.com/stefanprodan/podinfo
Expand All @@ -73,13 +73,13 @@ Save the above file and apply it on the cluster.
You can wait for the source controller to assemble an artifact from the head of the repo master branch with:
```bash
kubectl -n gotk-system wait gitrepository/podinfo --for=condition=ready
kubectl -n flux-system wait gitrepository/podinfo --for=condition=ready
```

The source controller will check for new commits in the master branch every minute. You can force a git sync with:

```bash
kubectl -n gotk-system annotate --overwrite gitrepository/podinfo fluxcd.io/reconcileAt="$(date +%s)"
kubectl -n flux-system annotate --overwrite gitrepository/podinfo reconcile.fluxcd.io/requestedAt="$(date +%s)"
```

### Define a kustomization
Expand All @@ -91,7 +91,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: podinfo-dev
namespace: gotk-system
namespace: flux-system
spec:
interval: 5m
path: "./deploy/overlays/dev/"
Expand Down Expand Up @@ -128,13 +128,13 @@ Kustomization object status transitions to a ready state.
You can wait for the kustomize controller to complete the deployment with:

```bash
kubectl -n gotk-system wait kustomization/podinfo-dev --for=condition=ready
kubectl -n flux-system wait kustomization/podinfo-dev --for=condition=ready
```

When the controller finishes the reconciliation, it will log the applied objects:

```bash
kubectl -n gotk-system logs deploy/kustomize-controller | jq .
kubectl -n flux-system logs deploy/kustomize-controller | jq .
```

```json
Expand All @@ -143,7 +143,7 @@ kubectl -n gotk-system logs deploy/kustomize-controller | jq .
"ts": "2020-09-17T07:27:11.921Z",
"logger": "controllers.Kustomization",
"msg": "Kustomization applied in 1.436096591s",
"kustomization": "gotk-system/podinfo-dev",
"kustomization": "flux-system/podinfo-dev",
"output": {
"namespace/dev": "created",
"service/frontend": "created",
Expand All @@ -159,7 +159,7 @@ kubectl -n gotk-system logs deploy/kustomize-controller | jq .
You can trigger a kustomization reconciliation any time with:

```bash
kubectl -n gotk-system annotate --overwrite kustomization/podinfo-dev \
kubectl -n flux-system annotate --overwrite kustomization/podinfo-dev \
fluxcd.io/reconcileAt="$(date +%s)"
```

Expand All @@ -180,7 +180,7 @@ status:

```json
{
"kustomization": "gotk-system/podinfo-dev",
"kustomization": "flux-system/podinfo-dev",
"error": "Error from server (NotFound): error when creating podinfo-dev.yaml: namespaces dev not found"
}
```
Expand All @@ -198,7 +198,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: istio
namespace: gotk-system
namespace: flux-system
spec:
interval: 10m
path: "./istio/system/"
Expand All @@ -215,7 +215,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: podinfo-dev
namespace: gotk-system
namespace: flux-system
spec:
dependsOn:
- name: istio
Expand All @@ -236,7 +236,7 @@ apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: podinfo-releases
namespace: gotk-system
namespace: flux-system
spec:
interval: 5m
url: https://github.com/stefanprodan/podinfo
Expand All @@ -254,7 +254,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: podinfo-production
namespace: gotk-system
namespace: flux-system
spec:
interval: 10m
path: "./deploy/overlays/production/"
Expand All @@ -280,7 +280,7 @@ apiVersion: notification.fluxcd.io/v1beta1
kind: Provider
metadata:
name: slack
namespace: gotk-system
namespace: flux-system
spec:
type: slack
channel: alerts
Expand All @@ -291,7 +291,7 @@ apiVersion: v1
kind: Secret
metadata:
name: slack-url
namespace: gotk-system
namespace: flux-system
data:
address: <encoded-url>
```
Expand All @@ -303,7 +303,7 @@ apiVersion: notification.fluxcd.io/v1beta1
kind: Alert
metadata:
name: on-call
namespace: gotk-system
namespace: flux-system
spec:
providerRef:
name: slack
Expand Down
4 changes: 2 additions & 2 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ resources:
- ../crd
- ../rbac
- ../manager
- github.com/fluxcd/source-controller/config//crd?ref=v0.1.1
- github.com/fluxcd/source-controller/config//manager?ref=v0.1.1
- github.com/fluxcd/source-controller/config//crd?ref=v0.2.0
- github.com/fluxcd/source-controller/config//manager?ref=v0.2.0
- namespace.yaml
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ resources:
images:
- name: fluxcd/kustomize-controller
newName: fluxcd/kustomize-controller
newTag: v0.1.2
newTag: v0.2.0
12 changes: 6 additions & 6 deletions docs/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: istio
namespace: gotk-system
namespace: flux-system
spec:
interval: 5m
url: https://github.com/stefanprodan/gitops-istio
Expand All @@ -110,7 +110,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: istio
namespace: gotk-system
namespace: flux-system
spec:
interval: 10m
path: "./istio/"
Expand All @@ -131,7 +131,7 @@ apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: webapp
namespace: gotk-system
namespace: flux-system
spec:
interval: 1m
url: https://github.com/stefanprodan/podinfo-deploy
Expand All @@ -142,7 +142,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: webapp-common
namespace: gotk-system
namespace: flux-system
spec:
dependsOn:
- name: istio
Expand All @@ -158,7 +158,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: webapp-backend
namespace: gotk-system
namespace: flux-system
spec:
dependsOn:
- name: webapp-common
Expand All @@ -178,7 +178,7 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: webapp-frontend
namespace: gotk-system
namespace: flux-system
spec:
dependsOn:
- name: webapp-backend
Expand Down
4 changes: 2 additions & 2 deletions docs/spec/v1beta1/kustomization.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ by annotating the kustomization object with:
const (
// ReconcileAtAnnotation is the annotation used for triggering a
// reconciliation outside of the defined schedule.
ReconcileAtAnnotation string = "fluxcd.io/reconcileAt"
ReconcileAtAnnotation string = "reconcile.fluxcd.io/requestedAt"
)
```

On-demand execution example:

```bash
kubectl annotate --overwrite kustomization/podinfo fluxcd.io/reconcileAt="$(date +%s)"
kubectl annotate --overwrite kustomization/podinfo reconcile.fluxcd.io/requestedAt="$(date +%s)"
```

## Garbage collection
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ go 1.15
replace github.com/fluxcd/kustomize-controller/api => ./api

require (
github.com/fluxcd/kustomize-controller/api v0.1.2
github.com/fluxcd/kustomize-controller/api v0.2.0
github.com/fluxcd/pkg/apis/meta v0.1.0
github.com/fluxcd/pkg/runtime v0.1.2
github.com/fluxcd/pkg/testserver v0.0.2
github.com/fluxcd/pkg/untar v0.0.5
github.com/fluxcd/source-controller/api v0.1.1
github.com/fluxcd/source-controller/api v0.2.0
github.com/go-logr/logr v0.1.0
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c
github.com/onsi/ginkgo v1.12.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ github.com/fluxcd/pkg/testserver v0.0.2 h1:SoaMtO9cE5p/wl2zkGudzflnEHd9mk68CGjZO
github.com/fluxcd/pkg/testserver v0.0.2/go.mod h1:pgUZTh9aQ44FSTQo+5NFlh7YMbUfdz1B80DalW7k96Y=
github.com/fluxcd/pkg/untar v0.0.5 h1:UGI3Ch1UIEIaqQvMicmImL1s9npQa64DJ/ozqHKB7gk=
github.com/fluxcd/pkg/untar v0.0.5/go.mod h1:O6V9+rtl8c1mHBafgqFlJN6zkF1HS5SSYn7RpQJ/nfw=
github.com/fluxcd/source-controller/api v0.1.1 h1:BYxl9qc8pCx3/Bn1885TlkJPwvXqz+rAL9mzpnCrj9A=
github.com/fluxcd/source-controller/api v0.1.1/go.mod h1:1ac/vj49YVPKF+xBHTo/9pfFj64TcLc1RLaxi4MwVEM=
github.com/fluxcd/source-controller/api v0.2.0 h1:a+N8+kLDH24lN2hp3klIFGuET3uMhhBWTM9qKdIRhM8=
github.com/fluxcd/source-controller/api v0.2.0/go.mod h1:1ac/vj49YVPKF+xBHTo/9pfFj64TcLc1RLaxi4MwVEM=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
Expand Down

0 comments on commit 3944752

Please sign in to comment.