Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Koperator e2e test - external consumer producer #991

Merged
merged 27 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6df5501
test(docs/install): added install e2e test
pregnor May 19, 2023
bd41f3b
test(docs/install): added localversion 4 Koperator
pregnor May 21, 2023
bdce649
feat(e2e): added uninstall koperator and dep
bartam1 May 28, 2023
d9331f2
Refactor after Pregnor PR merge
bartam1 Jun 14, 2023
b796dcd
fix based on review Panyuenlau
bartam1 Jun 14, 2023
9d78d96
fix: _kubectlRemoveWarnings
bartam1 Jun 14, 2023
2cd5d0d
add: description for utils
bartam1 Jun 15, 2023
5dd0266
refactor filenames and utils
bartam1 Jun 16, 2023
46b2d71
update: go.mod
bartam1 Jun 16, 2023
16f2904
fix: _test suffix and listAllK8sResources
bartam1 Jun 16, 2023
2b05149
fix: using --output not -o
bartam1 Jun 16, 2023
c315b37
remove: checkExistenceOfK8sResource
bartam1 Jun 16, 2023
1d66fe3
fix: fn description and extend log
bartam1 Jun 16, 2023
d68b2ca
fix: check returned error for waitK8sResourceCondition
bartam1 Jun 16, 2023
53694b9
refactor: topic and consume produce
bartam1 Jun 16, 2023
cc6b1fc
fix: union to instersect
bartam1 Jun 16, 2023
63ed2cd
refactor: uninstall into helmDescriptior
bartam1 Jun 16, 2023
3addfae
refactor: using dynamically dependencies CRDs
bartam1 Jun 19, 2023
3efc5f9
fix: missing error checks
bartam1 Jun 19, 2023
abea29c
formatting: waitK8sResourceCondition
bartam1 Jun 19, 2023
b6683a2
refactor: move version type into const.go
bartam1 Jun 19, 2023
917afad
formatting: waitK8sResourceCondition
bartam1 Jun 19, 2023
0e03f84
add(e2e-test): external consume produce plaintext/SSL
bartam1 Jun 19, 2023
256f273
Merge branch 'master' into test/de2e-koperator-externalCP
bartam1 Jun 20, 2023
c7679fc
Merge branch 'master' into test/de2e-koperator-externalCP
bartam1 Jun 22, 2023
61584fd
refactor: getting external listeners name
bartam1 Jun 22, 2023
28ac827
Merge branch 'master' into test/de2e-koperator-externalCP
bartam1 Jun 22, 2023
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
4 changes: 2 additions & 2 deletions pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,14 @@ func GetClientTLSConfig(client clientCtrl.Reader, secretNamespaceName types.Name
return nil, err
}

config, err := createTLSConfigFromSecret(tlsKeys)
config, err := CreateTLSConfigFromSecret(tlsKeys)
if err != nil {
return nil, errorfactory.New(errorfactory.InternalError{}, err, fmt.Sprintf("could not get client certificate for kafka client, name: %s namespace: %s", secretNamespaceName.Name, secretNamespaceName.Namespace))
}
return config, nil
}

func createTLSConfigFromSecret(tlsKeys *corev1.Secret) (*tls.Config, error) {
func CreateTLSConfigFromSecret(tlsKeys *corev1.Secret) (*tls.Config, error) {
rootCAs := x509.NewCertPool()
if err := cert.CheckSSLCertSecret(tlsKeys); err != nil {
return nil, err
Expand Down
9 changes: 6 additions & 3 deletions tests/e2e/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ const (
kubectlArgGoTemplateKindNameNamespace = `-o=go-template='{{range .items}}{{.kind}}{{"/"}}{{.metadata.name}}{{if .metadata.namespace}}{{"."}}{{.metadata.namespace}}{{end}}{{"\n"}}{{end}}'`
kubectlArgGoTemplateInternalListenersName = `-o=go-template='{{range $key,$value := .status.listenerStatuses.internalListeners}}{{$key}}{{"\n"}}{{end}}`
kubectlArgGoTemplateInternalListenerAddressesTemplate = `-o=go-template='{{range .status.listenerStatuses.internalListeners.%s}}{{.address}}{{"\n"}}{{end}}`
// kubectlArgGoTemplateExternalListenersName = `-o=go-template='{{range $key,$value := .status.listenerStatuses.externallListeners}}{{$key}}{{"\n"}}{{end}}`
// kubectlArgGoTemplateExternalListenerAddressesTemplate = `-o=go-template='{{range .status.listenerStatuses.externalListeners.%s}}{{.address}}{{"\n"}}{{end}}`
kubectlArgGoTemplateExternalListenersName = `-o=go-template='{{range $key,$value := .status.listenerStatuses.externalListeners}}{{$key}}{{"\n"}}{{end}}`
kubectlArgGoTemplateExternalListenerAddressesTemplate = `-o=go-template='{{range .status.listenerStatuses.externalListeners.%s}}{{.address}}{{"\n"}}{{end}}`


crdKind = "customresourcedefinitions.apiextensions.k8s.io"
kafkaKind = "kafkaclusters.kafka.banzaicloud.io"
kafkaTopicKind = "kafkatopics.kafka.banzaicloud.io"
kafkaClusterName = "kafka"
testTopicName = "topic-test"
testExternalTopicName = "topic-test-external"
testInternalTopicName = "topic-test-internal"

kcatPodName = "kcat"
zookeeperKind = "zookeeperclusters.zookeeper.pravega.io"
zookeeperClusterName = "zookeeper-server"
Expand Down
37 changes: 24 additions & 13 deletions tests/e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,31 @@ require (
github.com/gruntwork-io/terratest v0.41.24
github.com/onsi/ginkgo/v2 v2.9.5
github.com/onsi/gomega v1.27.6
github.com/twmb/franz-go v1.13.5
k8s.io/apiextensions-apiserver v0.27.2
k8s.io/apimachinery v0.27.2
sigs.k8s.io/yaml v1.3.0
)

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/banzaicloud/istio-client-go v0.0.17 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/twmb/franz-go/pkg/kmsg v1.4.0 // indirect
sigs.k8s.io/controller-runtime v0.14.6 // indirect
)

require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/aws/aws-sdk-go v1.44.122 // indirect
github.com/banzaicloud/koperator/api v0.28.2
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/cert-manager/cert-manager v1.11.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
Expand All @@ -33,22 +46,20 @@ require (
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gruntwork-io/go-commons v0.8.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/spdystream v0.2.0 // indirect
Expand All @@ -62,11 +73,11 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.1 // indirect
github.com/urfave/cli v1.22.2 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.1.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
Expand Down
Loading