Skip to content
This repository was archived by the owner on Nov 1, 2022. It is now read-only.

Commit db8dff6

Browse files
authored
Release 1.0.0-rc2 (#59)
Release 1.0.0-rc2
2 parents a25fa8d + 0fd1347 commit db8dff6

30 files changed

+608
-100
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
- deploy:
7878
name: Maybe push release image
7979
command: |
80-
if echo "${CIRCLE_TAG}" | grep -Eq "^[0-9]+(\.[0-9]+)*(-[a-z]+)?$"; then
80+
if echo "${CIRCLE_TAG}" | grep -Eq "^[0-9]+(\.[0-9]+)*(-[a-z0-9]+)?$"; then
8181
echo "$DOCKER_FLUXCD_PASSWORD" | docker login --username "$DOCKER_FLUXCD_USER" --password-stdin
8282
docker push "docker.io/fluxcd/helm-operator:${CIRCLE_TAG}"
8383
fi

CHANGELOG.md

+56
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
## 1.0.0-rc2 (2019-10-02)
2+
3+
> **Notice:** upgrading to this version from `<=0.10.x` by just
4+
> updating your Helm Operator image tag is not possible as the
5+
> CRD domain and version have changed. An upgrade guide can be
6+
> found [here](./docs/guides/upgrading-to-ga.md).
7+
8+
This is the second release candidate.
9+
10+
### Bug fixes
11+
12+
- Fix permissions on chart directory creation for non-root users
13+
[fluxcd/helm-operator#31][#31]
14+
- Filter out `nil` resources during parsing of released resources,
15+
as it caused confusion due to a harmless `Object 'Kind' is missing
16+
in 'null'` error being logged
17+
[fluxcd/helm-operator#47][#47]
18+
- Make `OwnedByHelmRelease` default to `true`, to work around some
19+
edge case scenarios where no resources are present for the release,
20+
or they are all skipped
21+
[fluxcd/helm-operator#56][#56]
22+
23+
### Improvements
24+
25+
- Add `--status-update-interval` flag, for configuring the interval
26+
at which the operator consults Tiller for the status of a release
27+
[fluxcd/helm-operator#44][#44]
28+
- Expand the list of public Helm repositories in the default config
29+
[fluxcd/helm-operator#53][#53]
30+
31+
### Maintenance and documentation
32+
33+
- Build: avoid spurious diffs in generated files by fixing their
34+
modtimes to Unix epoch [fluxcd/helm-operator#50][#50]
35+
- Build: update Flux dependency to `v1.15.0`
36+
[fluxcd/helm-operator#58][#58]
37+
- Documentation: Kustomize installation tutorial and various fixes
38+
[fluxcd/helm-operator#32][#32]
39+
- Documentation: add Helm v3 (alpha) workshop to `README.md`
40+
[fluxcd/helm-operator#52][#52]
41+
42+
### Thanks
43+
44+
Many thanks to @knackaron, @stefanprodan, @hiddeco, @swade1987
45+
for contributions to this release.
46+
47+
[#31]: https://github.com/fluxcd/helm-operator/pull/31
48+
[#32]: https://github.com/fluxcd/helm-operator/pull/32
49+
[#44]: https://github.com/fluxcd/helm-operator/pull/44
50+
[#47]: https://github.com/fluxcd/helm-operator/pull/47
51+
[#50]: https://github.com/fluxcd/helm-operator/pull/50
52+
[#52]: https://github.com/fluxcd/helm-operator/pull/52
53+
[#53]: https://github.com/fluxcd/helm-operator/pull/53
54+
[#56]: https://github.com/fluxcd/helm-operator/pull/56
55+
[#58]: https://github.com/fluxcd/helm-operator/pull/58
56+
157
## 1.0.0-rc1 (2019-08-14)
258

359
> **Notice:** upgrading to this version by just updating your Helm

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![CircleCI](https://circleci.com/gh/fluxcd/helm-operator.svg?style=svg)](https://circleci.com/gh/fluxcd/helm-operator)
44
[![GoDoc](https://godoc.org/github.com/fluxcd/helm-operator?status.svg)](https://godoc.org/github.com/fluxcd/helm-operator)
5-
[![Documentation](https://img.shields.io/badge/latest-documentation-informational)](https://docs.fluxcd.io/en/latest/)
5+
[![Documentation](https://img.shields.io/badge/latest-documentation-informational)](https://docs.fluxcd.io/projects/helm-operator/en/latest/)
66

77
The Helm Operator provides an extension to [Flux](https://github.com/fluxcd/flux)
88
that automates Helm Chart releases in a GitOps manner.
@@ -25,13 +25,14 @@ and the Helm Operator makes sure Helm charts are released as specified in the re
2525
## Get started with the Helm Operator
2626

2727
Get started [installing the Helm operator](/chart/helm-operator/README.md)
28-
or just [browse through the documentation](https://docs.fluxcd.io/en/latest/helm-operator/).
28+
or just [browse through the documentation](https://docs.fluxcd.io/projects/helm-operator/en/latest/).
2929

3030
### Integrations
3131

3232
As Flux Helm Operator is Open Source, integrations are very straight-forward. Here are
3333
a few popular ones you might want to check out:
3434

35+
- [Progressive Delivery workshop (Helm v3 alpha)](https://helm.workshop.flagger.dev/)
3536
- [Managing Helm releases the GitOps way](https://github.com/fluxcd/helm-operator-get-started)
3637
- [GitOps for Istio Canary deployments](https://github.com/stefanprodan/gitops-istio)
3738

chart/helm-operator/CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## 0.1.1 (2019-09-15)
2+
3+
### Improvements
4+
5+
- Restart operator on helm repositories changes
6+
[fluxcd/helm-operator#30](https://github.com/fluxcd/helm-operator/pull/30)
7+
- Add liveness and readiness probes
8+
[fluxcd/helm-operator#30](https://github.com/fluxcd/helm-operator/pull/30)
9+
- Add `HelmRelease` example to chart notes
10+
[fluxcd/helm-operator#30](https://github.com/fluxcd/helm-operator/pull/30)
11+
12+
### Bug fixes
13+
14+
- Fix SSH key mapping
15+
[fluxcd/helm-operator#30](https://github.com/fluxcd/helm-operator/pull/30)
16+
17+
## 0.1.0 (2019-09-14)
18+
19+
Initial chart release with Helm Operator [1.0.0-rc1](https://github.com/fluxcd/helm-operator/blob/master/CHANGELOG.md#100-rc1-2019-08-14)

chart/helm-operator/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v1
2-
appVersion: "1.0.0-rc1"
3-
version: 1.0.0
2+
appVersion: "1.0.0-rc2"
3+
version: 0.1.1
44
kubeVersion: ">=1.11.0-0"
55
name: helm-operator
66
description: Flux Helm Operator is a CRD controller for declarative helming

chart/helm-operator/README.md

+33-5
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ helm upgrade -i helm-operator fluxcd/helm-operator \
3939
--namespace fluxcd \
4040
--set configureRepositories.enable=true \
4141
--set configureRepositories.repositories[0].name=stable \
42-
--set configureRepositories.repositories[0].url=ttps://kubernetes-charts.storage.googleapis.com \
42+
--set configureRepositories.repositories[0].url=https://kubernetes-charts.storage.googleapis.com \
4343
--set configureRepositories.repositories[1].name=podinfo \
4444
--set configureRepositories.repositories[1].url=https://stefanprodan.github.io/podinfo
4545
```
@@ -134,6 +134,28 @@ spec:
134134
replicaCount: 1
135135
```
136136
137+
## Use Flux's Git deploy key
138+
139+
You can configure the Helm Operator to use the Git SSH key generated by Flux.
140+
141+
Assuming you've installed Flux with:
142+
143+
```sh
144+
helm upgrade -i flux fluxcd/flux \
145+
--namespace fluxcd \
146+
--set [email protected]:org/repo
147+
```
148+
149+
when installing Helm Operator, you can refer the Flux deploy key by its Kubernetes Secret name:
150+
151+
```sh
152+
helm -i helm-operator fluxcd/helm-operator \
153+
--namespace fluxcd \
154+
--set git.ssh.secret=flux-git-deploy
155+
```
156+
157+
The deploy key naming convention is `<Flux Release Name>-git-deploy`.
158+
137159
## Uninstall
138160

139161
To uninstall/delete the `helm-operator` deployment:
@@ -142,7 +164,10 @@ To uninstall/delete the `helm-operator` deployment:
142164
helm delete --purge helm-operator
143165
```
144166

145-
The command removes all the Kubernetes components associated with the chart and deletes the release.
167+
The command removes all the Kubernetes components associated with the chart and deletes the release.
168+
169+
Note that `helm delete` will not remove the `HelmRelease` CRD.
170+
Deleting the CRD will trigger a cascade delete of all Helm release objects.
146171

147172
## Configuration
148173

@@ -167,14 +192,17 @@ The following tables lists the configurable parameters of the Flux chart and the
167192
| `serviceAccount.create` | `true` | If `true`, create a new service account
168193
| `serviceAccount.name` | `flux` | Service account to be used
169194
| `clusterRole.create` | `true` | If `false`, Helm Operator will be restricted to the namespace where is deployed
170-
| `createCRD` | `true` | Create the HelmRelease CRD
195+
| `createCRD` | `false` | Create the HelmRelease CRD
171196
| `updateChartDeps` | `true` | Update dependencies for charts
172197
| `git.pollInterval` | `git.pollInterval` | Period on which to poll git chart sources for changes
173198
| `git.timeout` | `git.timeout` | Duration after which git operations time out
174199
| `git.ssh.secretName` | `None` | The name of the kubernetes secret with the SSH private key, supercedes `git.secretName`
175200
| `git.ssh.known_hosts` | `None` | The contents of an SSH `known_hosts` file, if you need to supply host key(s)
176-
| `chartsSyncInterval` | `3m` | Interval at which to check for changed charts
177-
| `workers` | `None` | (Experimental) amount of workers processing releases
201+
| `git.ssh.configMapName` | `None` | The name of a kubernetes config map containing the ssh config
202+
| `git.ssh.configMapKey` | `config` | The name of the key in the kubernetes config map specified above
203+
| `chartsSyncInterval` | `3m` | Period on which to reconcile the Helm releases with `HelmRelease` resources
204+
| `statusUpdateInterval` | `None` | Period on which to update the Helm release status in `HelmRelease` resources
205+
| `workers` | `None` | Amount of workers processing releases
178206
| `logFormat` | `fmt` | Log format (fmt or json)
179207
| `logReleaseDiffs` | `false` | Helm operator should log the diff when a chart release diverges (possibly insecure)
180208
| `allowNamespace` | `None` | If set, this limits the scope to a single namespace. If not specified, all namespaces will be watched
+39
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
11
Flux Helm Operator docs https://docs.fluxcd.io
22

3+
Example:
4+
5+
AUTH_VALUES=$(cat <<-END
6+
usePassword: true
7+
password: "redis_pass"
8+
usePasswordFile: true
9+
END
10+
)
11+
12+
kubectl create secret generic redis-auth --from-literal=values.yaml="$AUTH_VALUES"
13+
14+
cat <<EOF | kubectl apply -f -
15+
apiVersion: helm.fluxcd.io/v1
16+
kind: HelmRelease
17+
metadata:
18+
name: redis
19+
namespace: default
20+
spec:
21+
releaseName: redis
22+
chart:
23+
repository: https://kubernetes-charts.storage.googleapis.com
24+
name: redis
25+
version: 9.0.2
26+
valuesFrom:
27+
- secretKeyRef:
28+
name: redis-auth
29+
values:
30+
master:
31+
persistence:
32+
enabled: false
33+
volumePermissions:
34+
enabled: true
35+
metrics:
36+
enabled: true
37+
cluster:
38+
enabled: false
39+
EOF
40+
41+
watch kubectl get hr

chart/helm-operator/templates/deployment.yaml

+35-5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ spec:
1616
template:
1717
metadata:
1818
annotations:
19+
checksum/repositories: {{ include (print $.Template.BasePath "/helm-repositories.yaml") . | sha256sum | quote }}
1920
{{- if .Values.prometheus.enabled }}
2021
prometheus.io/scrape: "true"
2122
{{- end }}
@@ -33,7 +34,7 @@ spec:
3334
{{- end }}
3435
volumes:
3536
{{- if .Values.git.ssh.known_hosts }}
36-
- name: sshdir
37+
- name: sshknownhosts
3738
configMap:
3839
name: {{ template "helm-operator.fullname" . }}-ssh-config
3940
defaultMode: 0600
@@ -44,10 +45,19 @@ spec:
4445
secretName: {{ include "git.config.secretName" . }}
4546
defaultMode: 0400
4647
{{- end }}
48+
{{- if .Values.git.ssh.configMapName }}
49+
- name: sshconfig
50+
configMap:
51+
name: {{ .Values.git.ssh.configMapName }}
52+
items:
53+
- key: {{ .Values.git.ssh.configMapKey | default "config" }}
54+
path: config
55+
defaultMode: 0400
56+
{{- end }}
4757
- name: git-key
4858
secret:
49-
{{- if .Values.git.secretName }}
50-
secretName: {{ .Values.git.secretName }}
59+
{{- if .Values.git.ssh.secretName }}
60+
secretName: {{ .Values.git.ssh.secretName }}
5161
{{- else }}
5262
secretName: {{ template "helm-operator.fullname" . }}-git-deploy
5363
{{- end }}
@@ -78,13 +88,30 @@ spec:
7888
ports:
7989
- name: http
8090
containerPort: 3030
91+
livenessProbe:
92+
httpGet:
93+
port: 3030
94+
path: /healthz
95+
initialDelaySeconds: 1
96+
timeoutSeconds: 5
97+
readinessProbe:
98+
httpGet:
99+
port: 3030
100+
path: /healthz
101+
initialDelaySeconds: 1
102+
timeoutSeconds: 5
81103
volumeMounts:
82104
{{- if .Values.git.ssh.known_hosts }}
83-
- name: sshdir
105+
- name: sshknownhosts
84106
mountPath: /root/.ssh/known_hosts
85107
subPath: known_hosts
86108
readOnly: true
87109
{{- end }}
110+
{{- if .Values.git.ssh.configMapName }}
111+
- name: sshconfig
112+
mountPath: /root/.ssh/
113+
readOnly: true
114+
{{- end }}
88115
{{- if .Values.git.config.enabled }}
89116
- name: git-config
90117
mountPath: /root/.gitconfig
@@ -115,10 +142,13 @@ spec:
115142
args:
116143
{{- if .Values.logFormat }}
117144
- --log-format={{ .Values.logFormat }}
118-
{{end}}
145+
{{- end }}
119146
- --git-timeout={{ .Values.git.timeout }}
120147
- --git-poll-interval={{ .Values.git.pollInterval }}
121148
- --charts-sync-interval={{ .Values.chartsSyncInterval }}
149+
{{- if .Values.statusUpdateInterval }}
150+
- --status-update-interval={{ .Values.statusUpdateInterval }}
151+
{{- end }}
122152
- --update-chart-deps={{ .Values.updateChartDeps }}
123153
- --log-release-diffs={{ .Values.logReleaseDiffs }}
124154
{{- if .Values.workers }}

chart/helm-operator/templates/git-secret.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if not .Values.git.secretName -}}
1+
{{- if not .Values.git.ssh.secretName -}}
22
apiVersion: v1
33
kind: Secret
44
metadata:

chart/helm-operator/values.yaml

+22-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fullnameOverride: ""
55

66
image:
77
repository: docker.io/fluxcd/helm-operator
8-
tag: 1.0.0-rc1
8+
tag: 1.0.0-rc2
99
pullPolicy: IfNotPresent
1010
pullSecret:
1111

@@ -19,8 +19,10 @@ updateChartDeps: true
1919
logFormat: fmt
2020
# Log the diff when a chart release diverges
2121
logReleaseDiffs: false
22-
# Interval at which to check for changed charts
22+
# Period on which to reconcile the Helm releases with `HelmRelease` resources
2323
chartsSyncInterval: "3m"
24+
# Period on which to update the Helm release status in `HelmRelease` resources
25+
statusUpdateInterval:
2426
# Amount of workers processing releases
2527
workers: 2
2628

@@ -55,6 +57,7 @@ configureRepositories:
5557

5658
# For charts stored in Git repos set the SSH private key secret
5759
git:
60+
# Period on which to poll git chart sources for changes
5861
pollInterval: "5m"
5962
timeout: "20s"
6063
# Overrides for git over SSH. If you use your own git server, you
@@ -67,6 +70,23 @@ git:
6770
# set the secret name (helm-ssh) below
6871
secretName: ""
6972
known_hosts: ""
73+
# You may want to configure access to multiple repositories via multiple deploy keys
74+
# flux-helm-operator is configured in /etc/ssh/ssh_config to use for all hosts the file /etc/fluxd/ssh/identity
75+
# this file is mounted from the above secret
76+
# all entries in the secret are mounted in the same place /etc/fluxd/ssh/
77+
# so we can add more entries by providing this config map with a key of config that refer to other files in /etc/fluxd/ssh/
78+
# e.g. in the above secret create another key for example myprivatehelmrepo
79+
# in the below config map create a key config and input the following
80+
#
81+
# Host *
82+
# StrictHostKeyChecking yes
83+
# IdentityFile /etc/fluxd/ssh/identity
84+
# IdentityFile /var/fluxd/keygen/identity
85+
# IdentityFile /var/fluxd/keygen/myprivatehelmrepo
86+
# LogLevel error
87+
#
88+
# add the public key to the other repository as a deploy key and enjoy
89+
configMapName: ""
7090
# Global Git configuration See https://git-scm.com/docs/git-config for more details.
7191
config:
7292
enabled: false

0 commit comments

Comments
 (0)