Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fluxcd/helm-controller
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.15.0
Choose a base ref
...
head repository: fluxcd/helm-controller
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.16.0
Choose a head ref

Commits on Jan 11, 2022

  1. use go install instead of go get in Makefile

    Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
    Sanskar Jaiswal committed Jan 11, 2022
    Copy the full SHA
    a0929b5 View commit details
  2. Merge pull request #391 from aryan9600/aryan9600/go-install-tool

    Use go install instead of go get in Makefile
    stefanprodan authored Jan 11, 2022
    Copy the full SHA
    e3643ce View commit details
  3. use go-install-tool for gen-crd-api-reference-docs

    Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
    Sanskar Jaiswal committed Jan 11, 2022
    Copy the full SHA
    80b5631 View commit details
  4. Copy the full SHA
    3805507 View commit details

Commits on Jan 14, 2022

  1. Use patch instead of update when adding finalizers

    Signed-off-by: Kingdon Barrett <kingdon@weave.works>
    Kingdon Barrett committed Jan 14, 2022
    Copy the full SHA
    0498e9e View commit details
  2. Merge pull request #395 from kingdonb/patch-finalizers

    Use patch instead of update when adding finalizers
    stefanprodan authored Jan 14, 2022
    Copy the full SHA
    0246b7d View commit details

Commits on Jan 17, 2022

  1. Fuzzing: Initial commit

    Signed-off-by: AdamKorcz <adam@adalogics.com>
    AdamKorcz authored and Paulo Gomes committed Jan 17, 2022
    Copy the full SHA
    c4d5123 View commit details
  2. Refactor fuzzing

    Structure the fuzz implementation to be closer to what go native will support.
    Add Makefile target to enable smoketesting fuzzers.
    Add smoketest as CI workflow.
    
    Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
    Paulo Gomes committed Jan 17, 2022
    Copy the full SHA
    5572b8a View commit details

Commits on Jan 19, 2022

  1. Merge pull request #396 from pjbgf/fuzz

    Refactor Fuzz implementation
    stefanprodan authored Jan 19, 2022
    Copy the full SHA
    836f84c View commit details
  2. Update dev docs

    Signed-off-by: Yiannis <yiannis.triantafyllopoulos@gmail.com>
    yiannistri committed Jan 19, 2022
    Copy the full SHA
    6cda0a9 View commit details
  3. Merge pull request #397 from yiannistri/dev-docs

    Update development documentation
    stefanprodan authored Jan 19, 2022
    Copy the full SHA
    bc5e26a View commit details

Commits on Jan 20, 2022

  1. Bump golang.org/x/text to v0.3.7

    Co-authored-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
    Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
    Paulo Gomes and Sanskar Jaiswal committed Jan 20, 2022
    Copy the full SHA
    89ba4f5 View commit details
  2. security: Drop capabilities and enable seccomp

    Further restricts the SecurityContext that the controller runs under, by
    enabling the default seccomp profile and dropping all linux capabilities.
    This was set at container-level to ensure backwards compatibility with
    use cases in which sidecars are injected into the source-controller pod
    without setting less restrictive settings.
    
    BREAKING CHANGE: The use of new seccomp API requires Kubernetes 1.19.
    
    Co-authored-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
    Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
    Paulo Gomes and Sanskar Jaiswal committed Jan 20, 2022
    Copy the full SHA
    3134d10 View commit details
  3. Enforce runAsNonRoot

    BREAKING CHANGE: the controller container is now executed under 65534:65534 (userid:groupid). This change may break deployments that hard-coded the user name 'controller' in their PodSecurityPolicy.
    
    Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
    Paulo Gomes committed Jan 20, 2022
    Copy the full SHA
    ae3f157 View commit details
  4. Merge pull request #385 from pjbgf/security-context

    security: Drop capabilities, set userid and enable seccomp
    stefanprodan authored Jan 20, 2022
    Copy the full SHA
    38916bc View commit details

Commits on Jan 24, 2022

  1. Fix the missing protocol for the first port in manager config

    Signed-off-by: Maksym Voitko <max.voitko@gmail.com>
    mvoitko committed Jan 24, 2022
    Copy the full SHA
    0feff7c View commit details

Commits on Jan 25, 2022

  1. Merge pull request #405 from mvoitko/fix/missing-port-protocol-in-man…

    …ager-config
    
    Fix the missing protocol for the first port in manager config
    stefanprodan authored Jan 25, 2022
    Copy the full SHA
    ab9e4f8 View commit details

Commits on Jan 26, 2022

  1. Publish SBOM and sign release artifacts

    Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
    stefanprodan committed Jan 26, 2022
    Copy the full SHA
    413d60f View commit details
  2. Merge pull request #401 from fluxcd/sbom-cosign

    Publish SBOM and sign release artifacts
    stefanprodan authored Jan 26, 2022
    Copy the full SHA
    f0175d5 View commit details

Commits on Jan 27, 2022

  1. fix: Update helm to 3.7.2

    Signed-off-by: Casey Buto <cbuto@d2iq.com>
    cbuto committed Jan 27, 2022
    Copy the full SHA
    7869dbe View commit details
  2. Merge pull request #407 from cbuto/fix/update-helm

    Update helm to 3.7.2
    stefanprodan authored Jan 27, 2022
    Copy the full SHA
    413717a View commit details

Commits on Jan 28, 2022

  1. Update Helm to patched 3.8.0

    This updates Helm to a manually patched 3.8.0 release to include the
    memory/goroutine leak fix:
    https://github.com/hiddeco/helm/commits/3.8.x
    
    Signed-off-by: Hidde Beydals <hello@hidde.co>
    hiddeco committed Jan 28, 2022
    Copy the full SHA
    bfb283c View commit details
  2. build: set --load as BUILD_ARGS default

    Otherwise overwriting it with e.g. `--push` is not possible as the
    combination with `--load` results in an error.
    
    Signed-off-by: Hidde Beydals <hello@hidde.co>
    hiddeco committed Jan 28, 2022
    Copy the full SHA
    0c73fa5 View commit details
  3. Copy the full SHA
    f6bbf63 View commit details

Commits on Jan 29, 2022

  1. Add flag to disable cross namespace references

    Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
    somtochiama committed Jan 29, 2022
    Copy the full SHA
    acf164c View commit details

Commits on Jan 31, 2022

  1. Merge pull request #408 from SomtochiAma/no-cross-namespace-refs

    Allow disabling cross-namespace references
    stefanprodan authored Jan 31, 2022
    Copy the full SHA
    5a293d2 View commit details
  2. Allow setting a default service account for impersonation

    Introduce the flag `--default-service-account` for allowing cluster admins to enforce impersonation for resources reconciliation.
    
    Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
    stefanprodan committed Jan 31, 2022
    Copy the full SHA
    0173eaa View commit details
  3. Copy the full SHA
    05a1e00 View commit details

Commits on Feb 1, 2022

  1. Release v0.16.0

    Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
    stefanprodan committed Feb 1, 2022
    Copy the full SHA
    4013de6 View commit details
  2. Merge pull request #410 from fluxcd/release-v0.16.0

    Release v0.16.0
    stefanprodan authored Feb 1, 2022
    Copy the full SHA
    770f4e8 View commit details
24 changes: 24 additions & 0 deletions .github/workflows/cifuzz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CIFuzz
on:
pull_request:
branches:
- main

permissions:
contents: read # for actions/checkout to fetch code

jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore Go cache
uses: actions/cache@v1
with:
path: /home/runner/work/_temp/_github_home/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Smoke test Fuzzers
run: make fuzz-smoketest
8 changes: 6 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: e2e

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- "feature/**"

permissions:
contents: read # for actions/checkout to fetch code

jobs:
kind:
runs-on: ubuntu-latest
@@ -70,7 +73,8 @@ jobs:
make docker-build IMG=test/helm-controller:latest \
BUILD_PLATFORMS=linux/amd64 \
BUILD_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max"
--cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max \
--load"
- # Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
3 changes: 3 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@ on:
- cron: '0 0 * * *'
workflow_dispatch:

permissions:
contents: read # for actions/checkout to fetch code

env:
REPOSITORY: ${{ github.repository }}

57 changes: 33 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,11 @@ on:
default: 'rc'
required: true

permissions:
contents: write # needed to write releases
id-token: write # needed for keyless signing
packages: write # needed for ghcr access

env:
CONTROLLER: ${{ github.event.repository.name }}

@@ -31,13 +36,9 @@ jobs:
echo ::set-output name=VERSION::${VERSION}
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: "--debug"
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
@@ -49,43 +50,51 @@ jobs:
with:
username: fluxcdbot
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
- name: Publish multi-arch container image
- name: Generate images meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
fluxcd/${{ env.CONTROLLER }}
ghcr.io/fluxcd/${{ env.CONTROLLER }}
tags: |
type=raw,value=${{ steps.prep.outputs.VERSION }}
- name: Publish images
uses: docker/build-push-action@v2
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm/v7,linux/arm64
tags: |
ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
labels: |
org.opencontainers.image.title=${{ github.event.repository.name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.url=${{ github.event.repository.html_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.version=${{ steps.prep.outputs.VERSION }}
org.opencontainers.image.created=${{ steps.prep.outputs.BUILD_DATE }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Check images
run: |
docker buildx imagetools inspect docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
docker buildx imagetools inspect ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
docker pull docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
docker pull ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
- name: Generate release manifests
- uses: sigstore/cosign-installer@main
- name: Sign images
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign sign fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
cosign sign ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
- name: Generate release artifacts
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir -p config/release
kustomize build ./config/crd > ./config/release/${{ env.CONTROLLER }}.crds.yaml
kustomize build ./config/manager > ./config/release/${{ env.CONTROLLER }}.deployment.yaml
- name: Create release
echo '[CHANGELOG](https://github.com/fluxcd/${{ env.CONTROLLER }}/blob/main/CHANGELOG.md)' > ./config/release/notes.md
- uses: anchore/sbom-action/download-syft@v0
- name: Create release and SBOM
if: startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
uses: goreleaser/goreleaser-action@v2
with:
prerelease: true
artifacts: "config/release/*.yaml"
artifactContentType: "text/plain"
body: |
[CHANGELOG](https://github.com/fluxcd/${{ env.CONTROLLER }}/blob/main/CHANGELOG.md)
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: release --release-notes=config/release/notes.md --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Scan

on:
push:
branches: [ main ]
@@ -8,6 +7,10 @@ on:
schedule:
- cron: '18 10 * * 3'

permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for codeQL to write security events

jobs:
fossa:
name: FOSSA
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@
*.so
*.dylib
bin
testbin

# Test binary, build with `go test -c`
*.test
@@ -22,3 +21,5 @@ testbin
*.swp
*.swo
*~

build/
39 changes: 39 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
project_name: helm-controller

builds:
- skip: true

release:
prerelease: "true"
extra_files:
- glob: config/release/*.yaml

checksum:
extra_files:
- glob: config/release/*.yaml

source:
enabled: true
name_template: "{{ .ProjectName }}_{{ .Version }}_source_code"

sboms:
- id: source
artifacts: source
documents:
- "{{ .ProjectName }}_{{ .Version }}_sbom.spdx.json"

# signs the checksum file
# all files (including the sboms) are included in the checksum
# https://goreleaser.com/customization/sign
signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
certificate: "${artifact}.pem"
args:
- sign-blob
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
artifacts: checksum
output: true
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
# Changelog

## 0.16.0

**Release date:** 2022-02-01

This prerelease comes with security improvements for multi-tenant clusters:
- Platform admins can enforce impersonation across the cluster using the `--default-service-account` flag.
When the flag is set, all `HelmReleases`, which don't have `spec.serviceAccountName` specified,
use the service account name provided by `--default-service-account=<SA Name>` in the namespace of the object.
- Platform admins can disable cross-namespace references with the `--no-cross-namespace-refs=true` flag.
When this flag is set, `HelmReleases` can only refer to sources (`HelmRepositories`, `GitRepositories` and `Buckets`)
in the same namespace as the `HelmRelease` object, preventing tenants from accessing another tenant's repositories.

In addition, the controller comes with a temporary fork of Helm v3.8.0 with a patch applied from
[helm/pull/10486](https://github.com/helm/helm/pull/10486) to solve a memory leak.

The controller container images are signed with
[Cosign and GitHub OIDC](https://github.com/sigstore/cosign/blob/22007e56aee419ae361c9f021869a30e9ae7be03/KEYLESS.md),
and a Software Bill of Materials in [SPDX format](https://spdx.dev) has been published on the release page.

Starting with this version, the controller deployment conforms to the
Kubernetes [restricted pod security standard](https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted):
- all Linux capabilities were dropped
- the root filesystem was set to read-only
- the seccomp profile was set to the runtime default
- run as non-root was enabled
- the user and group ID was set to 65534

**Breaking changes**:
- The use of new seccomp API requires Kubernetes 1.19.
- The controller container is now executed under 65534:65534 (userid:groupid).
This change may break deployments that hard-coded the user ID of 'controller' in their PodSecurityPolicy.
- When both `spec.kubeConfig` and `spec.ServiceAccountName` are specified, the controller will impersonate
the service account on the target cluster, previously the controller ignored the service account.

Features:
- Allow setting a default service account for impersonation
[#406](https://github.com/fluxcd/helm-controller/pull/406)
- Allow disabling cross-namespace references
[#408](https://github.com/fluxcd/helm-controller/pull/408)

Improvements:
- Update Helm to patched 3.8.0
[#409](https://github.com/fluxcd/helm-controller/pull/409)
- Publish SBOM and sign release artifacts
[#401](https://github.com/fluxcd/helm-controller/pull/401)
- Drop capabilities, set userid and enable seccomp
[#385](https://github.com/fluxcd/helm-controller/pull/385)
- Update development documentation
[#397](https://github.com/fluxcd/helm-controller/pull/397)
- Refactor Fuzz implementation
[#396](https://github.com/fluxcd/helm-controller/pull/396)

Fixes:
- Use patch instead of update when adding finalizers
[#395](https://github.com/fluxcd/helm-controller/pull/395)
- Fix the missing protocol for the first port in manager config
[#405](https://github.com/fluxcd/helm-controller/pull/405)
- Use go-install-tool for gen-crd-api-reference-docs
[#392](https://github.com/fluxcd/helm-controller/pull/392)
- Use go install instead of go get in Makefile
[#391](https://github.com/fluxcd/helm-controller/pull/391)

## 0.15.0

**Release date:** 2022-01-10
Loading