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

Release Flux v1.10.1 #1734

Merged
merged 45 commits into from
Feb 13, 2019
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
02feeea
Use AKS Service Principal credentials for ACR
ellieayla Jan 29, 2019
a351ad1
Fix imports
ellieayla Jan 29, 2019
b210248
A []string map can't be declared const.
ellieayla Jan 29, 2019
63f148b
Use ioutil.ReadFile higher-level abstraction
ellieayla Jan 29, 2019
d93a890
Helm chart custom SSH secret fix #1709
stefanprodan Feb 6, 2019
9f1e8e7
Helm chart fix deployment key comment
stefanprodan Feb 6, 2019
db8e82d
Add changelog entry for Helm operator v0.6.0
hiddeco Feb 6, 2019
6269072
Update Helm operator manifests to '0.6.0'
hiddeco Feb 6, 2019
1f8fe86
Merge pull request #1710 from weaveworks/helm-fix
stefanprodan Feb 6, 2019
a57b3a4
add "skipDepUpdate" config parameter to HelmRelease
betmix-matt Feb 7, 2019
d1a398e
Upgrade Flux to v1.10.0 and helm-op to v0.6.0
stefanprodan Feb 7, 2019
ac6082a
Release Helm chart v0.6.1
stefanprodan Feb 7, 2019
892b549
Add exclude image PR in changelog
stefanprodan Feb 7, 2019
79d00c1
Merge pull request #1711 from weaveworks/release/helm-0.6.0
hiddeco Feb 7, 2019
6e4402f
Merge pull request #1714 from weaveworks/release/1.10.x
squaremo Feb 7, 2019
9c751cf
Merge pull request #1715 from weaveworks/release/helm-0.6.x
squaremo Feb 7, 2019
e9e3101
Add Flux and helm-op versions to changelog
stefanprodan Feb 7, 2019
d48d244
Merge pull request #1713 from weaveworks/chart-v0.6.1
stefanprodan Feb 7, 2019
43824b6
Add image pull secret options to Helm chart
stefanprodan Feb 8, 2019
c892902
Update changelog
stefanprodan Feb 8, 2019
116e2c9
Merge pull request #1718 from weaveworks/helm-priv
stefanprodan Feb 8, 2019
09757f9
Merge pull request #1712 from yinzara/feature/skip-dep-up
stefanprodan Feb 8, 2019
3cb2179
gofmt only
ellieayla Feb 8, 2019
df5ca66
Make previously-Exported ACR-centric functions private to the package.
ellieayla Feb 8, 2019
0ce0668
Add AKS-ACR SP HostPath mount to helm chart.
ellieayla Feb 8, 2019
cf30277
Documentation in FAQ alongside AWS
ellieayla Feb 8, 2019
cde10c1
adding image repo / secret for flux and memcached
jimangel Feb 10, 2019
294d3e1
Fix helm-op allow namespace flag mapping
stefanprodan Feb 11, 2019
76d70da
Merge pull request #1724 from weaveworks/chart-fix
hiddeco Feb 11, 2019
393bf40
Release Helm chart v0.6.2
stefanprodan Feb 11, 2019
3f6f1e0
Merge pull request #1725 from weaveworks/chart-v0.6.2
stefanprodan Feb 11, 2019
c0e02e5
adding helm pull secret
jimangel Feb 11, 2019
bd0bec7
Merge pull request #1721 from jimangel/patch-1
stefanprodan Feb 11, 2019
c42a800
Make port forward label selector configurable
hiddeco Feb 11, 2019
f0a4cc7
Update chart/flux/templates/deployment.yaml
hiddeco Feb 11, 2019
f84405b
Adding Azure DevOps Git host support in flux
sarath-p Feb 11, 2019
2ca1803
Merge pull request #1694 from alanjcastonguay/aks-credentials-for-acr
hiddeco Feb 12, 2019
9fa5c88
Merge pull request #1729 from sarath-p/azuredevops
stefanprodan Feb 12, 2019
8d499b2
Prioritize configured label selectors
hiddeco Feb 12, 2019
b8a3c76
Fixing 'how do I use use private git host' link faq page
sarath-p Feb 12, 2019
5cf6cc0
Merge pull request #1731 from sarath-p/faqbrokenlink
hiddeco Feb 13, 2019
0824e19
Merge pull request #1727 from weaveworks/1700-fluxctl-label-selector
hiddeco Feb 13, 2019
5963c69
Add changelog entry for Flux v1.10.1
Feb 13, 2019
79adfc2
Refine changelog entry for Flux v1.10.1
Feb 13, 2019
5817e7e
Bump flux image in reference manifest
Feb 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG-helmop.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
## 0.5.4 (TBA)
## 0.6.0 (2019-02-07)

### Improvements

- Add option to limit the Helm operator to a single namespace
[weaveworks/flux#1664](https://github.com/weaveworks/flux/pull/1664)

### Thanks

Without the contributions of @brandon-bethke-neudesic, @errordeveloper,
@ncabatoff, @stefanprodan, @squaremo, and feedback of our
[#flux](https://slack.weave.works/) inhabitants this release would not
have been possible -- thanks to all of you!

## 0.5.3 (2019-01-14)

### Improvements
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
This is the changelog for the Flux daemon; the changelog for the Helm
operator is in [./CHANGELOG-helmop.md](./CHANGELOG-helmop.md).

## 1.10.1 (2019-02-11)

This release provides a deeper integration with Azure (DevOps Git hosts
and ACR) and comes with other minor improvements.

### Improvements

- Support Azure DevOps Git hosts
[weaveworks/flux#1729][#1729]
[weaveworks/flux#1731][#1731]
- Use AKS credentials for ACR
[weaveworks/flux#1694][#1694]
- Make port forward label selector configurable
[weaveworks/flux#1727][#1727]
- Add image repo and pull secret to chart readme
hiddeco marked this conversation as resolved.
Show resolved Hide resolved
[weaveworks/flux#1721][#1721]
- Add "skipDepUpdate" config parameter to HelmRelease
hiddeco marked this conversation as resolved.
Show resolved Hide resolved
[weaveworks/flux#1712][#1712]
- Add image pull secret options to Helm chart
hiddeco marked this conversation as resolved.
Show resolved Hide resolved
[weaveworks/flux#1718][#1718]

### Thanks

Lots of thanks to @alanjcastonguay, @hiddeco, @jimangel, @sarath-p and
@yinzara for their contributions to this release.

[#1694]: https://github.com/weaveworks/flux/pull/1694
[#1712]: https://github.com/weaveworks/flux/pull/1712
[#1718]: https://github.com/weaveworks/flux/pull/1718
[#1721]: https://github.com/weaveworks/flux/pull/1721
[#1727]: https://github.com/weaveworks/flux/pull/1727
[#1729]: https://github.com/weaveworks/flux/pull/1729
[#1731]: https://github.com/weaveworks/flux/pull/1731

## 1.10.0 (2019-02-07)

This release adds the `--registry-exclude-image` flag for excluding
Expand Down
6 changes: 3 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 24 additions & 1 deletion chart/flux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
## 0.6.1 (TBA)
## 0.6.2 (2019-02-11)

### Improvements

- Allow chart images to be pulled from a private container registry
[weaveworks/flux#1718](https://github.com/weaveworks/flux/pull/1718)

### Bug fixes

- Fix helm-op allow namespace flag mapping
[weaveworks/flux#1724](https://github.com/weaveworks/flux/pull/1724)

## 0.6.1 (2019-02-07)

### Improvements

- Updated Flux to `1.10.0` and Helm operator to `0.6.0`
[weaveworks/flux#1713](https://github.com/weaveworks/flux/pull/1713)
- Add option to exclude container images
[weaveworks/flux#1659](https://github.com/weaveworks/flux/pull/1659)
- Add option to mount custom `repositories.yaml`
[weaveworks/flux#1671](https://github.com/weaveworks/flux/pull/1671)
- Add option to limit the Helm operator to a single namespace
[weaveworks/flux#1664](https://github.com/weaveworks/flux/pull/1664)

### Bug fixes

- Fix custom SSH secret mapping
[weaveworks/flux#1710](https://github.com/weaveworks/flux/pull/1710)

## 0.6.0 (2019-01-14)

**Note** To fix the connectivity problems between Flux and memcached we've changed the
Expand Down
4 changes: 2 additions & 2 deletions chart/flux/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
appVersion: "1.9.0"
version: 0.6.0
appVersion: "1.10.0"
version: 0.6.2
kubeVersion: ">=1.9.0-0"
name: flux
description: Flux is a tool that automatically ensures that the state of a cluster matches what is specified in version control
Expand Down
6 changes: 6 additions & 0 deletions chart/flux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ The following tables lists the configurable parameters of the Weave Flux chart a
| `image.tag` | Image tag | `<VERSION>`
| `replicaCount` | Number of flux pods to deploy, more than one is not desirable. | `1`
| `image.pullPolicy` | Image pull policy | `IfNotPresent`
| `image.pullSecret` | Image pull secret | `None`
| `resources.requests.cpu` | CPU resource requests for the flux deployment | `50m`
| `resources.requests.memory` | Memory resource requests for the flux deployment | `64Mi`
| `resources.limits` | CPU/memory resource limits for the flux deployment | `None`
Expand Down Expand Up @@ -222,16 +223,21 @@ The following tables lists the configurable parameters of the Weave Flux chart a
| `registry.ecr.region` | Restrict ECR scanning to these AWS regions; if empty, only the cluster's region will be scanned | `None`
| `registry.ecr.includeId` | Restrict ECR scanning to these AWS account IDs; if empty, all account IDs that aren't excluded may be scanned | `None`
| `registry.ecr.excludeId` | Do not scan ECR for images in these AWS account IDs; the default is to exclude the EKS system account | `602401143452`
| `registry.acr.enabled` | Mount `azure.json` via HostPath into the Flux Pod, enabling Flux to use AKS's service principal for ACR authentication | `false`
| `registry.acr.hostPath` | Alternative location of `azure.json` on the host | `/etc/kubernetes/azure.json`
| `memcached.verbose` | Enable request logging in memcached | `false`
| `memcached.maxItemSize` | Maximum size for one item | `1m`
| `memcached.maxMemory` | Maximum memory to use, in megabytes | `64`
| `memcached.pullSecret` | Image pull secret | `None`
| `memcached.repository` | Image repository | `memcached`
| `memcached.resources` | CPU/memory resource requests/limits for memcached | `None`
| `helmOperator.create` | If `true`, install the Helm operator | `false`
| `helmOperator.createCRD` | Create the `v1beta1` and `v1alpha2` flux CRDs. Dependent on `helmOperator.create=true` | `true`
| `helmOperator.repository` | Helm operator image repository | `quay.io/weaveworks/helm-operator`
| `helmOperator.tag` | Helm operator image tag | `<VERSION>`
| `helmOperator.replicaCount` | Number of helm operator pods to deploy, more than one is not desirable. | `1`
| `helmOperator.pullPolicy` | Helm operator image pull policy | `IfNotPresent`
| `helmOperator.pullSecret` | Image pull secret | `None`
| `helmOperator.updateChartDeps` | Update dependencies for charts | `true`
| `helmOperator.git.pollInterval` | Period at which to poll git repo for new commits | `git.pollInterval`
| `helmOperator.git.timeout` | Duration after which git operations time out | `git.timeout`
Expand Down
17 changes: 16 additions & 1 deletion chart/flux/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ spec:
release: {{ .Release.Name }}
spec:
serviceAccountName: {{ template "flux.serviceAccountName" . }}
{{- if .Values.image.pullSecret }}
imagePullSecrets:
- name: {{ .Values.image.pullSecret }}
{{- end }}
volumes:
- name: kubedir
configMap:
Expand All @@ -45,6 +49,12 @@ spec:
- name: git-keygen
emptyDir:
medium: Memory
{{- if .Values.registry.acr.enabled }}
- name: acr-credentials
hostPath:
path: "{{ .Values.registry.acr.hostPath }}"
type: ""
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand All @@ -66,6 +76,11 @@ spec:
readOnly: true
- name: git-keygen
mountPath: /var/fluxd/keygen
{{- if .Values.registry.acr.enabled }}
- name: acr-credentials
mountPath: /etc/kubernetes/azure.json
readOnly: true
{{- end }}
env:
- name: KUBECONFIG
value: /root/.kubectl/config
Expand All @@ -74,7 +89,7 @@ spec:
{{- end }}
args:
- --ssh-keygen-dir=/var/fluxd/keygen
- --k8s-secret-name={{ template "flux.fullname" . }}-git-deploy
- --k8s-secret-name={{ .Values.git.secretName | default (printf "%s-git-deploy" (include "flux.fullname" .)) }}
- --memcached-hostname={{ template "flux.fullname" . }}-memcached
{{- if .Values.memcached.createClusterIP }}
- --memcached-service=
Expand Down
6 changes: 5 additions & 1 deletion chart/flux/templates/helm-operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ spec:
release: {{ .Release.Name }}
spec:
serviceAccountName: {{ template "flux.serviceAccountName" . }}
{{- if .Values.helmOperator.pullSecret }}
imagePullSecrets:
- name: {{ .Values.helmOperator.pullSecret }}
{{- end }}
volumes:
{{- if .Values.ssh.known_hosts }}
- name: sshdir
Expand Down Expand Up @@ -100,7 +104,7 @@ spec:
- --charts-sync-interval={{ .Values.helmOperator.chartsSyncInterval }}
- --update-chart-deps={{ .Values.helmOperator.updateChartDeps }}
- --log-release-diffs={{ .Values.helmOperator.logReleaseDiffs }}
{{- if .Values.helmOperator.namespace }}
{{- if .Values.helmOperator.allowNamespace }}
- --allow-namespace={{ .Values.helmOperator.allowNamespace }}
{{- end }}
- --tiller-namespace={{ .Values.helmOperator.tillerNamespace }}
Expand Down
4 changes: 4 additions & 0 deletions chart/flux/templates/memcached.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
app: {{ template "flux.name" . }}-memcached
release: {{ .Release.Name }}
spec:
{{- if .Values.memcached.pullSecret }}
imagePullSecrets:
- name: {{ .Values.memcached.pullSecret }}
{{- end }}
containers:
- name: memcached
image: {{ .Values.memcached.repository }}:{{ .Values.memcached.tag }}
Expand Down
15 changes: 11 additions & 4 deletions chart/flux/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ replicaCount: 1

image:
repository: quay.io/weaveworks/flux
tag: 1.9.0
tag: 1.10.0
pullPolicy: IfNotPresent
pullSecret:

service:
type: ClusterIP
Expand All @@ -19,8 +20,9 @@ helmOperator:
create: false
createCRD: true
repository: quay.io/weaveworks/helm-operator
tag: 0.5.3
tag: 0.6.0
pullPolicy: IfNotPresent
pullSecret:
# Limit the operator scope to a single namespace
allowNamespace:
# Update dependencies for charts
Expand Down Expand Up @@ -52,7 +54,7 @@ helmOperator:
# generate a SSH key named identity: ssh-keygen -q -N "" -f ./identity
# create a Kubernetes secret: kubectl -n flux create secret generic helm-ssh --from-file=./identity
# delete the private key: rm ./identity
# add ./identity.pub as a read-only deployment key in your GitHub repo where the charts are
# add ./identity.pub as a read-only deployment key in your Git repo where the charts are
# set the secret name (helm-ssh) below
secretName: ""
# Additional environment variables to set
Expand Down Expand Up @@ -114,7 +116,7 @@ git:
# generate a SSH key named identity: ssh-keygen -q -N "" -f ./identity
# create a Kubernetes secret: kubectl -n flux create secret generic flux-ssh --from-file=./identity
# delete the private key: rm ./identity
# add ./identity.pub as a read-only deployment key in your GitHub repo where the charts are
# add ./identity.pub as a deployment key with write access in your Git repo
# set the secret name (flux-ssh) below
secretName: ""

Expand All @@ -138,10 +140,15 @@ registry:
region:
includeId:
excludeId:
# Azure ACR settings
acr:
enabled: false
hostPath: /etc/kubernetes/azure.json

memcached:
repository: memcached
tag: 1.4.25
pullSecret:
createClusterIP: true
verbose: false
maxItemSize: 1m
Expand Down
24 changes: 13 additions & 11 deletions cmd/fluxctl/root_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type rootOpts struct {
URL string
Token string
Namespace string
Labels map[string]string
API api.Server
}

Expand Down Expand Up @@ -51,6 +52,7 @@ Workflow:
const (
envVariableURL = "FLUX_URL"
envVariableNamespace = "FLUX_FORWARD_NAMESPACE"
envVariableLabels = "FLUX_FORWARD_LABELS"
envVariableToken = "FLUX_SERVICE_TOKEN"
envVariableCloudToken = "WEAVE_CLOUD_TOKEN"
defaultURLGivenToken = "https://cloud.weave.works/api/flux"
Expand All @@ -67,6 +69,8 @@ func (opts *rootOpts) Command() *cobra.Command {

cmd.PersistentFlags().StringVar(&opts.Namespace, "k8s-fwd-ns", "default",
fmt.Sprintf("Namespace in which fluxd is running, for creating a port forward to access the API. No port forward will be created if a URL or token is given. You can also set the environment variable %s", envVariableNamespace))
cmd.PersistentFlags().StringToStringVar(&opts.Labels, "k8s-fwd-labels", map[string]string{"app": "flux"},
fmt.Sprintf("Labels used to select the fluxd pod a port forward should be created for. You can also set the environment variable %s", envVariableLabels))
cmd.PersistentFlags().StringVarP(&opts.URL, "url", "u", "",
fmt.Sprintf("Base URL of the flux API (defaults to %q if a token is provided); you can also set the environment variable %s", defaultURLGivenToken, envVariableURL))
cmd.PersistentFlags().StringVarP(&opts.Token, "token", "t", "",
Expand Down Expand Up @@ -98,27 +102,26 @@ func (opts *rootOpts) PersistentPreRunE(cmd *cobra.Command, _ []string) error {
return nil
}

opts.Namespace = getFromEnvIfNotSet(cmd.Flags(), "k8s-fwd-ns", opts.Namespace, envVariableNamespace)
opts.Token = getFromEnvIfNotSet(cmd.Flags(), "token", opts.Token, envVariableToken, envVariableCloudToken)
opts.URL = getFromEnvIfNotSet(cmd.Flags(), "url", opts.URL, envVariableURL)
setFromEnvIfNotSet(cmd.Flags(), "k8s-fwd-ns", envVariableNamespace)
setFromEnvIfNotSet(cmd.Flags(), "k8s-fwd-labels", envVariableLabels)
setFromEnvIfNotSet(cmd.Flags(), "token", envVariableToken, envVariableCloudToken)
setFromEnvIfNotSet(cmd.Flags(), "url", envVariableURL)

if opts.Token != "" && opts.URL == "" {
opts.URL = defaultURLGivenToken
}

if opts.URL == "" {
portforwarder, err := tryPortforwards(opts.Namespace, metav1.LabelSelector{
MatchLabels: opts.Labels,
}, metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
metav1.LabelSelectorRequirement{
Key: "name",
Operator: metav1.LabelSelectorOpIn,
Values: []string{"flux", "fluxd", "weave-flux-agent"},
},
},
}, metav1.LabelSelector{
MatchLabels: map[string]string{
"app": "flux",
},
})
if err != nil {
return err
Expand All @@ -135,14 +138,13 @@ func (opts *rootOpts) PersistentPreRunE(cmd *cobra.Command, _ []string) error {
return nil
}

func getFromEnvIfNotSet(flags *pflag.FlagSet, flagName, value string, envNames ...string) string {
func setFromEnvIfNotSet(flags *pflag.FlagSet, flagName string, envNames ...string) {
if flags.Changed(flagName) {
return value
return
}
for _, envName := range envNames {
if env := os.Getenv(envName); env != "" {
return env
flags.Set(flagName, env)
}
}
return value // not changed, so presumably the default
}
2 changes: 2 additions & 0 deletions deploy-helm/flux-helm-release-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ spec:
format: int64
resetValues:
type: boolean
skipDepUpdate:
type: boolean
valueFileSecrets:
type: array
properties:
Expand Down
2 changes: 1 addition & 1 deletion deploy-helm/helm-operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
# There are no ":latest" images for helm-operator. Find the most recent
# release or image version at https://quay.io/weaveworks/helm-operator
# and replace the tag here.
image: quay.io/weaveworks/helm-operator:0.5.3
image: quay.io/weaveworks/helm-operator:0.6.0
imagePullPolicy: IfNotPresent
ports:
- name: http
Expand Down
2 changes: 1 addition & 1 deletion deploy-helm/weave-cloud-helm-operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
secretName: flux-git-deploy
containers:
- name: flux-helm-operator
image: quay.io/weaveworks/helm-operator:0.5.3
image: quay.io/weaveworks/helm-operator:0.6.0
imagePullPolicy: IfNotPresent
args:
- --git-timeout=20s
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.flux
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apk add --no-cache openssh ca-certificates tini 'git>=2.3.0'

# Add git hosts to known hosts file so we can use
# StrickHostKeyChecking with git+ssh
RUN ssh-keyscan github.com gitlab.com bitbucket.org >> /etc/ssh/ssh_known_hosts
RUN ssh-keyscan github.com gitlab.com bitbucket.org ssh.dev.azure.com >> /etc/ssh/ssh_known_hosts

# Verify newly added known_hosts (man-in-middle mitigation)
ADD ./verify_known_hosts.sh /home/flux/verify_known_hosts.sh
Expand Down
Loading