forked from kubernetes/cloud-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 24
SPLAT-2337: tests/ote: Introduce openshift test extension binary #117
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,6 @@ e2e.test | |
| .idea/ | ||
| **/*.swp | ||
| .DS_Store | ||
|
|
||
| # OpenShift hack | ||
| /aws-cloud-controller-manager-tests-ext | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,33 @@ | ||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.21 AS builder | ||
|
|
||
| # | ||
| # CCM binary builder | ||
| # | ||
| WORKDIR /build | ||
| COPY . . | ||
| RUN GO111MODULE=on CGO_ENABLED=0 GOOS=${GOOS} GOPROXY=${GOPROXY} go build \ | ||
| -ldflags="-w -s -X 'main.version=${VERSION}'" \ | ||
| -o=aws-cloud-controller-manager \ | ||
| cmd/aws-cloud-controller-manager/main.go | ||
|
|
||
| # | ||
| # OpenShift Tests Extension binary builder | ||
| # | ||
| RUN pushd tests/aws-cloud-controller-manager-tests-ext && \ | ||
| GO111MODULE=on CGO_ENABLED=0 GOOS=${GOOS} GOPROXY=${GOPROXY} go build \ | ||
| -trimpath \ | ||
| -ldflags="-w -s -X 'main.version=${VERSION}'" \ | ||
| -o=/build/aws-cloud-controller-manager-tests-ext . && \ | ||
| gzip /build/aws-cloud-controller-manager-tests-ext | ||
|
|
||
| # | ||
| # Main stage | ||
| # | ||
| FROM registry.ci.openshift.org/ocp/4.21:base-rhel9 | ||
|
|
||
| LABEL description="AWS Cloud Controller Manager" | ||
|
|
||
| COPY --from=builder /build/aws-cloud-controller-manager /bin/aws-cloud-controller-manager | ||
| COPY --from=builder /build/aws-cloud-controller-manager-tests-ext.gz /bin/aws-cloud-controller-manager-tests-ext.gz | ||
|
|
||
| ENTRYPOINT [ "/bin/aws-cloud-controller-manager" ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| GOOS ?= $(shell go env GOOS) | ||
| GOARCH ?= $(shell go env GOARCH) | ||
| GOPROXY ?= $(shell go env GOPROXY) | ||
| GIT_VERSION ?= $(shell git describe --dirty --tags --match='v*') | ||
| VERSION ?= $(GIT_VERSION) | ||
| LDFLAGS ?= -w -s -X k8s.io/component-base/version.gitVersion=$(VERSION) -X main.gitVersion=$(VERSION) | ||
|
|
||
| .PHONY: aws-cloud-controller-manager-tests-ext | ||
| aws-cloud-controller-manager-tests-ext: | ||
| pushd tests/aws-cloud-controller-manager-tests-ext && \ | ||
| GO111MODULE=on CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) GOPROXY=$(GOPROXY) go build \ | ||
| -trimpath \ | ||
| -ldflags="$(LDFLAGS)" \ | ||
| -o=../../aws-cloud-controller-manager-tests-ext . | ||
|
|
||
| .PHONY: image | ||
| image: | ||
| podman build -f Dockerfile.openshift \ | ||
| --authfile $(PULL_SECRET_FILE) \ | ||
| --build-arg VERSION=$(VERSION) \ | ||
| -t aws-cloud-controller-manager:$(VERSION) . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # OpenShift hacking | ||
|
|
||
| ## OpenShift Tests Extension (OTE) binary | ||
|
|
||
| ### Building | ||
|
|
||
| Chose one of the steps below to build the OTE binary from root of the project. | ||
|
|
||
| To build the OTE binary you can run: | ||
|
|
||
| ```sh | ||
| make -f openshift-hack/Makefile aws-cloud-controller-manager-tests-ext | ||
| ``` | ||
|
|
||
| To build the container image you can run: | ||
|
|
||
| ```sh | ||
| podman build --authfile $PULL_SECRET_FILE -f Dockerfile.openshift -t ccm-local:devel . | ||
|
|
||
| # OR | ||
|
|
||
| make -f openshift-hack/Makefile image | ||
| ``` | ||
|
|
||
| where: | ||
|
|
||
| - `$PULL_SECRET_FILE` is the path to the registry credentials ('pull-secret') | ||
|
|
||
| ### Using OTE | ||
|
|
||
| List the existing tests: | ||
|
|
||
| ```sh | ||
| ./aws-cloud-controller-manager-tests-ext list tests | jq .[].name | ||
| ``` | ||
|
|
||
| List suites: | ||
|
|
||
| ```sh | ||
| ./aws-cloud-controller-manager-tests-ext list suites | jq .[].name | ||
| ``` | ||
|
|
||
| Run a specific test: | ||
|
|
||
| ```sh | ||
| ./aws-cloud-controller-manager-tests-ext run-test -n "[cloud-provider-aws-e2e] loadbalancer CLB internal should be reachable with hairpinning traffic [Suite:openshift/conformance/parallel]" | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| module k8s.io/cloud-provider-aws/tests/openshift-tests-ext-ccm-aws | ||
|
|
||
| go 1.24.0 | ||
|
|
||
| require ( | ||
| github.com/openshift-eng/openshift-tests-extension v0.0.0-20250916161632-d81c09058835 | ||
| github.com/sirupsen/logrus v1.9.3 | ||
| github.com/spf13/cobra v1.10.1 | ||
| k8s.io/api v0.34.0 | ||
| k8s.io/client-go v1.5.2 | ||
| k8s.io/cloud-provider-aws/tests/e2e v0.0.0-00010101000000-000000000000 | ||
| k8s.io/kubernetes v1.34.0 | ||
| ) | ||
|
|
||
| require ( | ||
| cel.dev/expr v0.24.0 // indirect | ||
| github.com/antlr4-go/antlr/v4 v4.13.0 // indirect | ||
| github.com/aws/aws-sdk-go-v2 v1.36.3 // indirect | ||
| github.com/aws/aws-sdk-go-v2/config v1.29.14 // indirect | ||
| github.com/aws/aws-sdk-go-v2/credentials v1.17.67 // indirect | ||
| github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect | ||
| github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.45.2 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect | ||
| github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect | ||
| github.com/aws/smithy-go v1.22.2 // indirect | ||
| github.com/beorn7/perks v1.0.1 // indirect | ||
| github.com/blang/semver/v4 v4.0.0 // indirect | ||
| github.com/cenkalti/backoff/v4 v4.3.0 // indirect | ||
| github.com/cespare/xxhash/v2 v2.3.0 // indirect | ||
| github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect | ||
| github.com/distribution/reference v0.6.0 // indirect | ||
| github.com/emicklei/go-restful/v3 v3.12.2 // indirect | ||
| github.com/felixge/httpsnoop v1.0.4 // indirect | ||
| github.com/fxamacker/cbor/v2 v2.9.0 // indirect | ||
| github.com/go-logr/logr v1.4.2 // indirect | ||
| github.com/go-logr/stdr v1.2.2 // indirect | ||
| github.com/go-openapi/jsonpointer v0.21.0 // indirect | ||
| github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
| github.com/go-openapi/swag v0.23.0 // indirect | ||
| github.com/go-task/slim-sprig/v3 v3.0.0 // indirect | ||
| github.com/gogo/protobuf v1.3.2 // indirect | ||
| github.com/google/cel-go v0.26.0 // indirect | ||
| github.com/google/gnostic-models v0.7.0 // indirect | ||
| github.com/google/go-cmp v0.7.0 // indirect | ||
| github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect | ||
| github.com/google/uuid v1.6.0 // indirect | ||
| github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect | ||
| github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect | ||
| github.com/inconshreveable/mousetrap v1.1.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/moby/spdystream v0.5.0 // indirect | ||
| github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
| github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect | ||
| github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
| github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect | ||
| github.com/onsi/ginkgo/v2 v2.21.0 // indirect | ||
| github.com/onsi/gomega v1.35.1 // indirect | ||
| github.com/opencontainers/go-digest v1.0.0 // indirect | ||
| github.com/pkg/errors v0.9.1 // indirect | ||
| github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect | ||
| github.com/prometheus/client_golang v1.22.0 // indirect | ||
| github.com/prometheus/client_model v0.6.1 // indirect | ||
| github.com/prometheus/common v0.62.0 // indirect | ||
| github.com/prometheus/procfs v0.15.1 // indirect | ||
| github.com/spf13/pflag v1.0.10 // indirect | ||
| github.com/stoewer/go-strcase v1.3.0 // indirect | ||
| github.com/x448/float16 v0.8.4 // indirect | ||
| go.opentelemetry.io/auto/sdk v1.1.0 // indirect | ||
| go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect | ||
| go.opentelemetry.io/otel v1.35.0 // indirect | ||
| go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect | ||
| go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect | ||
| go.opentelemetry.io/otel/metric v1.35.0 // indirect | ||
| go.opentelemetry.io/otel/sdk v1.34.0 // indirect | ||
| go.opentelemetry.io/otel/trace v1.35.0 // indirect | ||
| go.opentelemetry.io/proto/otlp v1.5.0 // indirect | ||
| go.yaml.in/yaml/v2 v2.4.2 // indirect | ||
| go.yaml.in/yaml/v3 v3.0.4 // indirect | ||
| golang.org/x/crypto v0.36.0 // indirect | ||
| golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect | ||
| golang.org/x/net v0.38.0 // indirect | ||
| golang.org/x/oauth2 v0.27.0 // indirect | ||
| golang.org/x/sync v0.12.0 // indirect | ||
| golang.org/x/sys v0.31.0 // indirect | ||
| golang.org/x/term v0.30.0 // indirect | ||
| golang.org/x/text v0.23.0 // indirect | ||
| golang.org/x/time v0.9.0 // indirect | ||
| golang.org/x/tools v0.26.0 // indirect | ||
| google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect | ||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect | ||
| google.golang.org/grpc v1.72.1 // indirect | ||
| google.golang.org/protobuf v1.36.5 // indirect | ||
| gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect | ||
| gopkg.in/inf.v0 v0.9.1 // indirect | ||
| gopkg.in/yaml.v3 v3.0.1 // indirect | ||
| k8s.io/apiextensions-apiserver v0.0.0 // indirect | ||
| k8s.io/apimachinery v0.34.0 // indirect | ||
| k8s.io/apiserver v0.34.0 // indirect | ||
| k8s.io/cloud-provider v0.33.0 // indirect | ||
| k8s.io/component-base v0.34.0 // indirect | ||
| k8s.io/component-helpers v0.34.0 // indirect | ||
| k8s.io/controller-manager v0.34.0 // indirect | ||
| k8s.io/klog/v2 v2.130.1 // indirect | ||
| k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect | ||
| k8s.io/kubectl v0.33.0 // indirect | ||
| k8s.io/kubelet v0.34.0 // indirect | ||
| k8s.io/pod-security-admission v0.34.0 // indirect | ||
| k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect | ||
| sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect | ||
| sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect | ||
| sigs.k8s.io/randfill v1.0.0 // indirect | ||
| sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect | ||
| sigs.k8s.io/yaml v1.6.0 // indirect | ||
| ) | ||
|
|
||
| replace ( | ||
| github.com/onsi/ginkgo/v2 => github.com/openshift/onsi-ginkgo/v2 v2.6.1-0.20241205171354-8006f302fd12 | ||
| k8s.io/api => k8s.io/api v0.34.0 | ||
| k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.34.0 | ||
| k8s.io/apimachinery => k8s.io/apimachinery v0.34.0 | ||
| k8s.io/apiserver => k8s.io/apiserver v0.34.0 | ||
| k8s.io/cli-runtime => k8s.io/cli-runtime v0.34.0 | ||
| k8s.io/client-go => k8s.io/client-go v0.34.0 | ||
| k8s.io/cloud-provider => k8s.io/cloud-provider v0.34.0 | ||
| k8s.io/cloud-provider-aws/tests/e2e => ../e2e | ||
| k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.34.0 | ||
| k8s.io/code-generator => k8s.io/code-generator v0.34.0 | ||
| k8s.io/component-base => k8s.io/component-base v0.34.0 | ||
| k8s.io/component-helpers => k8s.io/component-helpers v0.34.0 | ||
| k8s.io/controller-manager => k8s.io/controller-manager v0.34.0 | ||
| k8s.io/cri-api => k8s.io/cri-api v0.34.0 | ||
| k8s.io/cri-client => k8s.io/cri-client v0.34.0 | ||
| k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.34.0 | ||
| k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.34.0 | ||
| k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.34.0 | ||
| k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.34.0 | ||
| k8s.io/kube-proxy => k8s.io/kube-proxy v0.34.0 | ||
| k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.34.0 | ||
| k8s.io/kubectl => k8s.io/kubectl v0.34.0 | ||
| k8s.io/kubelet => k8s.io/kubelet v0.34.0 | ||
| k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.34.0 | ||
| k8s.io/metrics => k8s.io/metrics v0.34.0 | ||
| k8s.io/mount-utils => k8s.io/mount-utils v0.34.0 | ||
| k8s.io/node-api => k8s.io/node-api v0.34.0 | ||
| k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.34.0 | ||
| k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.34.0 | ||
| k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.34.0 | ||
| k8s.io/sample-controller => k8s.io/sample-controller v0.34.0 | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.