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/kustomize-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/kustomize-controller
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.15.1
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on Oct 8, 2021

  1. Fix inventory panic for v1beta1 objects

    Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
    stefanprodan committed Oct 8, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    stefanprodan Stefan Prodan
    Copy the full SHA
    cd5b693 View commit details
  2. Merge pull request #445 from fluxcd/fix-inventory-panic

    Fix inventory panic for v1beta1 objects
    stefanprodan authored Oct 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1ad10b1 View commit details
  3. Release v0.15.1

    Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
    stefanprodan committed Oct 8, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    stefanprodan Stefan Prodan
    Copy the full SHA
    481f8af View commit details
  4. Merge pull request #446 from fluxcd/release-v0.15.1

    Release v0.15.1
    stefanprodan authored Oct 8, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5144667 View commit details
Showing with 20 additions and 3 deletions.
  1. +10 −0 CHANGELOG.md
  2. +1 −1 config/manager/kustomization.yaml
  3. +4 −1 controllers/kustomization_controller.go
  4. +4 −0 controllers/kustomization_inventory.go
  5. +1 −1 go.mod
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,16 @@

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

## 0.15.1

**Release date:** 2021-10-08

This prerelease comes with fixes to backwards compatibility with Flux CLI 0.17 and older.

Fixes:
* Fix inventory panic for v1beta1 objects
[#445](https://github.com/fluxcd/kustomize-controller/pull/445)

## 0.15.0

**Release date:** 2021-10-08
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -5,4 +5,4 @@ resources:
images:
- name: fluxcd/kustomize-controller
newName: fluxcd/kustomize-controller
newTag: v0.15.0
newTag: v0.15.1
5 changes: 4 additions & 1 deletion controllers/kustomization_controller.go
Original file line number Diff line number Diff line change
@@ -757,7 +757,10 @@ func (r *KustomizationReconciler) prune(ctx context.Context, manager *ssa.Resour

func (r *KustomizationReconciler) finalize(ctx context.Context, kustomization kustomizev1.Kustomization) (ctrl.Result, error) {
log := logr.FromContext(ctx)
if kustomization.Spec.Prune && !kustomization.Spec.Suspend {
if kustomization.Spec.Prune &&
!kustomization.Spec.Suspend &&
kustomization.Status.Inventory != nil &&
kustomization.Status.Inventory.Entries != nil {
objects, err := ListObjectsInInventory(kustomization.Status.Inventory)

impersonation := NewKustomizeImpersonation(kustomization, r.Client, r.StatusPoller, "")
4 changes: 4 additions & 0 deletions controllers/kustomization_inventory.go
Original file line number Diff line number Diff line change
@@ -57,6 +57,10 @@ func AddObjectsToInventory(inv *kustomizev1.ResourceInventory, objects []*unstru
func ListObjectsInInventory(inv *kustomizev1.ResourceInventory) ([]*unstructured.Unstructured, error) {
objects := make([]*unstructured.Unstructured, 0)

if inv.Entries == nil {
return objects, nil
}

for _, entry := range inv.Entries {
objMetadata, err := object.ParseObjMetadata(entry.ID)
if err != nil {
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ require (
filippo.io/age v1.0.0
github.com/cyphar/filepath-securejoin v0.2.2
github.com/drone/envsubst v1.0.3-0.20200804185402-58bc65f69603
github.com/fluxcd/kustomize-controller/api v0.15.0
github.com/fluxcd/kustomize-controller/api v0.15.1
github.com/fluxcd/pkg/apis/kustomize v0.2.0
github.com/fluxcd/pkg/apis/meta v0.10.1
github.com/fluxcd/pkg/runtime v0.12.2