Skip to content

Commit

Permalink
Merge pull request #396 from fidelity/dependabot/go_modules/github.co…
Browse files Browse the repository at this point in the history
…m/fluxcd/pkg/apis/meta-1.1.2

feat: chart to 0.3.35
  • Loading branch information
michael12312 authored Sep 11, 2023
2 parents 476707c + 4504a52 commit bd93ba7
Show file tree
Hide file tree
Showing 23 changed files with 582 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
run: |
[ -z "${GOPATH}" ] && export GOPATH=$HOME/go
PATH="${GOPATH}/bin:${PATH}"
kind create cluster --image kindest/node:v1.25.11
kind create cluster --image kindest/node:v1.26.6
echo "sleep 60s to wait node ready"
sleep 60s
kubectl get node
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.3.34
v0.3.35
4 changes: 2 additions & 2 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
description: A Helm chart for kraan controller
name: kraan-controller
type: application
appVersion: v0.3.34
version: v0.3.34
appVersion: v0.3.35
version: v0.3.35
16 changes: 13 additions & 3 deletions chart/templates/gotk/helm-controller/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
labels:
app.kubernetes.io/instance: {{.Release.Namespace}}
app.kubernetes.io/version: latest
Expand Down Expand Up @@ -286,7 +285,9 @@ spec:
type: string
type: object
interval:
description: Interval at which to reconcile the Helm release.
description: Interval at which to reconcile the Helm release. This
interval is approximate and may be subject to jitter to ensure efficient
use of resources.
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
type: string
kubeConfig:
Expand Down Expand Up @@ -629,6 +630,15 @@ spec:
description: Uninstall holds the configuration for Helm uninstall
actions for this HelmRelease.
properties:
deletionPropagation:
default: background
description: DeletionPropagation specifies the deletion propagation
policy when a Helm uninstall is performed.
enum:
- background
- foreground
- orphan
type: string
disableHooks:
description: DisableHooks prevents hooks from running during the
Helm rollback action.
Expand Down
513 changes: 467 additions & 46 deletions chart/templates/gotk/source-controller/crds.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion chart/templates/kraan/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: addonslayers.kraan.io
spec:
group: kraan.io
Expand Down
4 changes: 4 additions & 0 deletions chart/templates/kraan/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
allowPrivilegeEscalation: false
runAsNonRoot: {{ .Values.kraan.kraanController.runAsNonRoot }}
readOnlyRootFilesystem: {{ .Values.kraan.kraanController.readOnly }}
capabilities:
drop: [ "ALL" ]
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /controller/data
name: data
Expand Down
4 changes: 2 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ gotk:
image:
repository: ghcr.io/fluxcd
name: source-controller
tag: v0.36.1
tag: v1.1.0
imagePullPolicy:

imagePullSecrets:
Expand Down Expand Up @@ -163,7 +163,7 @@ gotk:
image:
repository: ghcr.io/fluxcd
name: helm-controller
tag: v0.32.2
tag: v0.36.0
imagePullPolicy:

proxy: true
Expand Down
1 change: 0 additions & 1 deletion config/crd/bases/kraan.io_addonslayers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
creationTimestamp: null
name: addonslayers.kraan.io
spec:
group: kraan.io
Expand Down
1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
Expand Down
17 changes: 9 additions & 8 deletions controllers/addons_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import (
"time"

helmctlv2 "github.com/fluxcd/helm-controller/api/v2beta1"
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
sourcev1beta2 "github.com/fluxcd/source-controller/api/v1beta2"
"github.com/go-logr/logr"
"github.com/google/go-cmp/cmp"
"github.com/pkg/errors"
Expand Down Expand Up @@ -77,13 +78,13 @@ func (r *AddonsLayerReconciler) SetupWithManagerAndOptions(mgr ctrl.Manager, opt

addonsLayer := &kraanv1alpha1.AddonsLayer{}
hr := &helmctlv2.HelmRelease{}
hrepo := &sourcev1.HelmRepository{}
hrepo := &sourcev1beta2.HelmRepository{}

if err := mgr.GetFieldIndexer().IndexField(r.Context, &helmctlv2.HelmRelease{}, hrOwnerKey, r.indexHelmReleaseByOwner); err != nil {
return errors.Wrap(err, "failed setting up FieldIndexer for HelmRelease owner")
}

if err := mgr.GetFieldIndexer().IndexField(r.Context, &sourcev1.HelmRepository{}, hrOwnerKey, r.indexHelmRepoByOwner); err != nil {
if err := mgr.GetFieldIndexer().IndexField(r.Context, &sourcev1beta2.HelmRepository{}, hrOwnerKey, r.indexHelmRepoByOwner); err != nil {
return errors.Wrap(err, "failed setting up FieldIndexer for HelmRepository owner")
}

Expand All @@ -98,7 +99,7 @@ func (r *AddonsLayerReconciler) SetupWithManagerAndOptions(mgr ctrl.Manager, opt
return errors.Wrap(err, "error creating controller")
}
err = ctl.Watch(
&source.Kind{Type: &sourcev1.GitRepository{}},
source.Kind(mgr.GetCache(), &sourcev1.GitRepository{}),
handler.EnqueueRequestsFromMapFunc(r.repoMapperFunc),
predicate.Funcs{
CreateFunc: func(e event.CreateEvent) bool {
Expand Down Expand Up @@ -176,7 +177,7 @@ func (r *AddonsLayerReconciler) SetupWithManagerAndOptions(mgr ctrl.Manager, opt
return errors.Wrap(err, "error creating controller")
}
err = ctl.Watch(
&source.Kind{Type: &kraanv1alpha1.AddonsLayer{}},
source.Kind(mgr.GetCache(), &kraanv1alpha1.AddonsLayer{}),
handler.EnqueueRequestsFromMapFunc(r.layerMapperFunc),
predicate.Funcs{
CreateFunc: func(e event.CreateEvent) bool {
Expand Down Expand Up @@ -886,7 +887,7 @@ func (r *AddonsLayerReconciler) update(ctx context.Context, a *kraanv1alpha1.Add
return nil
}

func (r *AddonsLayerReconciler) repoMapperFunc(o client.Object) []reconcile.Request { //nolint:gocyclo //ok
func (r *AddonsLayerReconciler) repoMapperFunc(ctx context.Context, o client.Object) []reconcile.Request { //nolint:gocyclo //ok
logging.TraceCall(r.Log)
defer logging.TraceExit(r.Log)

Expand Down Expand Up @@ -937,7 +938,7 @@ func (r *AddonsLayerReconciler) repoMapperFunc(o client.Object) []reconcile.Requ
return addons
}

func (r *AddonsLayerReconciler) layerMapperFunc(o client.Object) []reconcile.Request {
func (r *AddonsLayerReconciler) layerMapperFunc(ctx context.Context, o client.Object) []reconcile.Request {
logging.TraceCall(r.Log)
defer logging.TraceExit(r.Log)

Expand Down Expand Up @@ -1000,7 +1001,7 @@ func (r *AddonsLayerReconciler) indexHelmRepoByOwner(o client.Object) []string {
defer logging.TraceExit(r.Log)

r.Log.V(2).Info("indexing", logging.GetObjKindNamespaceName(o)...)
hr, ok := o.(*sourcev1.HelmRepository)
hr, ok := o.(*sourcev1beta2.HelmRepository)
if !ok {
r.Log.Error(fmt.Errorf("failed to cast to helmrepository"), "unable cast object to expected kind",
logging.GetObjKindNamespaceName(o)...)
Expand Down
40 changes: 19 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ module github.com/fidelity/kraan
go 1.19

require (
github.com/fluxcd/helm-controller/api v0.32.2
github.com/fluxcd/pkg/apis/meta v1.1.1
github.com/fluxcd/helm-controller/api v0.36.0
github.com/fluxcd/pkg/apis/meta v1.1.2
github.com/fluxcd/pkg/untar v0.3.0
github.com/fluxcd/source-controller/api v0.36.1
github.com/fluxcd/source-controller/api v1.1.0
github.com/go-logr/logr v1.2.4
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.5.9
github.com/paulcarlton-ww/goutils/pkg/testutils v0.1.42
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
go.uber.org/zap v1.24.0
golang.org/x/mod v0.11.0
k8s.io/api v0.26.3
k8s.io/apiextensions-apiserver v0.26.3
k8s.io/apimachinery v0.27.3
k8s.io/client-go v0.26.3
sigs.k8s.io/controller-runtime v0.14.6
go.uber.org/zap v1.25.0
golang.org/x/mod v0.12.0
k8s.io/api v0.27.4
k8s.io/apiextensions-apiserver v0.27.4
k8s.io/apimachinery v0.27.4
k8s.io/client-go v0.27.4
sigs.k8s.io/controller-runtime v0.15.1
)

require (
Expand All @@ -31,10 +31,10 @@ require (
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fluxcd/pkg/apis/acl v0.1.0 // indirect
github.com/fluxcd/pkg/apis/kustomize v1.0.0 // indirect
github.com/fluxcd/pkg/apis/kustomize v1.1.1 // indirect
github.com/fluxcd/pkg/tar v0.2.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
Expand All @@ -54,26 +54,24 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/paulcarlton-ww/goutils/pkg/logging v0.0.3 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.8.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/component-base v0.26.3 // indirect
k8s.io/component-base v0.27.4 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
Expand Down
Loading

0 comments on commit bd93ba7

Please sign in to comment.