Skip to content

Commit

Permalink
fix(#504): Improve secret volume mounts
Browse files Browse the repository at this point in the history
- Allow to bind multiple secrets to a test
- Bind secrets by its name to the test via runtime configuration or command line argument
- Only add secret content as test variables for .properties files
- Add secret content to test classpath so test is able to load the content on demand
- Update Golang 1.22
- Update codegen and controller_gen versions
- Update dependencies versions
  • Loading branch information
christophd committed Jun 13, 2024
1 parent f25a208 commit 4c7d25f
Show file tree
Hide file tree
Showing 47 changed files with 790 additions and 706 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ OPERATOR_VERSION := $(subst -SNAPSHOT,,$(VERSION))
LAST_RELEASED_IMAGE_NAME := yaks-operator
LAST_RELEASED_VERSION := 0.19.0

CONTROLLER_GEN_VERSION := v0.6.1
CODEGEN_VERSION := v0.25.6
CONTROLLER_GEN_VERSION := v0.15.0
CODEGEN_VERSION := v0.30.2
OPERATOR_SDK_VERSION := v1.28.0
KUSTOMIZE_VERSION := v4.5.4
DEFAULT_IMAGE := docker.io/citrusframework/yaks
Expand Down
20 changes: 12 additions & 8 deletions config/crd/bases/yaks.citrusframework.org_instances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ metadata:
labels:
app: yaks
annotations:
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: instances.yaks.citrusframework.org
spec:
group: yaks.citrusframework.org
Expand Down Expand Up @@ -54,14 +53,19 @@ spec:
description: Instance is the Schema for the yaks instance.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down
26 changes: 16 additions & 10 deletions config/crd/bases/yaks.citrusframework.org_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ metadata:
labels:
app: yaks
annotations:
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.15.0
name: tests.yaks.citrusframework.org
spec:
group: yaks.citrusframework.org
Expand Down Expand Up @@ -66,14 +65,19 @@ spec:
description: Test is the Schema for the tests API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -120,8 +124,10 @@ spec:
verbose:
type: boolean
type: object
secret:
type: string
secrets:
items:
type: string
type: array
selenium:
description: SeleniumSpec --.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
labels:
app: yaks
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
name: instances.yaks.citrusframework.org
spec:
group: yaks.citrusframework.org
Expand Down Expand Up @@ -54,14 +53,19 @@ spec:
description: Instance is the Schema for the yaks instance.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -92,9 +96,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
labels:
app: yaks
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
name: tests.yaks.citrusframework.org
spec:
group: yaks.citrusframework.org
Expand Down Expand Up @@ -66,14 +65,19 @@ spec:
description: Test is the Schema for the tests API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
Expand Down Expand Up @@ -120,8 +124,10 @@ spec:
verbose:
type: boolean
type: object
secret:
type: string
secrets:
items:
type: string
type: array
selenium:
description: SeleniumSpec --.
properties:
Expand Down Expand Up @@ -206,9 +212,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
75 changes: 37 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/citrusframework/yaks

go 1.21
go 1.22

require (
github.com/Masterminds/semver v1.5.0
Expand All @@ -11,30 +11,30 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/mapstructure v1.5.0
// go get github.com/openshift/[email protected]
github.com/openshift/api v0.0.0-20240304080513-3e8192a10b13
github.com/openshift/api v0.0.0-20240228005710-4511c790cc60
github.com/operator-framework/api v0.20.0
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1
github.com/rs/xid v1.4.0
github.com/rs/xid v1.5.0
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.18.2
github.com/spf13/viper v1.19.0
github.com/stoewer/go-strcase v1.3.0
github.com/stretchr/testify v1.9.0
go.uber.org/multierr v1.10.0
go.uber.org/zap v1.26.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.27.7
k8s.io/apiextensions-apiserver v0.27.7
k8s.io/apimachinery v0.27.7
k8s.io/client-go v0.27.7
k8s.io/api v0.28.8
k8s.io/apiextensions-apiserver v0.28.8
k8s.io/apimachinery v0.28.8
k8s.io/client-go v0.28.8
k8s.io/klog/v2 v2.120.1
k8s.io/kubectl v0.27.7
knative.dev/eventing v0.39.3
sigs.k8s.io/controller-runtime v0.15.2
k8s.io/kubectl v0.28.8
knative.dev/eventing v0.40.3
sigs.k8s.io/controller-runtime v0.16.5
)

require (
Expand All @@ -49,21 +49,21 @@ require (
github.com/cloudevents/sdk-go/sql/v2 v2.13.0 // indirect
github.com/cloudevents/sdk-go/v2 v2.15.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.7.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-ini/ini v1.67.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // 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/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect
Expand All @@ -76,18 +76,17 @@ require (
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/minio-go v6.0.14+incompatible // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/statsd_exporter v0.22.7 // indirect
github.com/rickb777/date v1.13.0 // indirect
github.com/rickb777/plural v1.2.1 // indirect
Expand All @@ -102,31 +101,31 @@ require (
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.153.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/api v0.171.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/component-base v0.27.7 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/component-base v0.28.8 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect
knative.dev/pkg v0.0.0-20231023151236-29775d7c9e5c // indirect
knative.dev/pkg v0.0.0-20240116073220-b488e7be5902 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309 // Required by Helm
Loading

0 comments on commit 4c7d25f

Please sign in to comment.