Skip to content

Commit

Permalink
Merge pull request #225 from alebedev87/bump-n-rebase
Browse files Browse the repository at this point in the history
NE-1802: Bump Golang, k8s.io, OpenShift API, and controller-runtime
  • Loading branch information
openshift-merge-bot[bot] authored Sep 17, 2024
2 parents b2a62fe + f1b2155 commit 63fb086
Show file tree
Hide file tree
Showing 2,361 changed files with 197,769 additions and 128,880 deletions.
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-8-release-golang-1.19-openshift-4.12
tag: rhel-8-release-golang-1.22-openshift-4.17
10 changes: 6 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ run:
concurrency: 4

# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 1m
timeout: 10m

# exit code when at least one issue was found, default is 1
issues-exit-code: 1
Expand All @@ -24,8 +24,9 @@ run:
# from this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work
# on Windows.
skip-dirs:
- vendor
issues:
exclude-dirs:
- vendor

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
Expand All @@ -50,7 +51,8 @@ run:
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
# default is "colored-line-number"
format: tab
formats:
- format: tab

# print lines of code with issue, default is true
print-issued-lines: true
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.19 as builder
FROM golang:1.22 as builder

WORKDIR /opt/app-root/src
COPY . .
Expand Down
13 changes: 0 additions & 13 deletions Dockerfile.openshift

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ endif

CONTROLLER_GEN := go run sigs.k8s.io/controller-tools/cmd/controller-gen
SETUP_ENVTEST := go run sigs.k8s.io/controller-runtime/tools/setup-envtest
KUSTOMIZE := go run sigs.k8s.io/kustomize/kustomize/v4
K8S_ENVTEST_VERSION := 1.21.4
KUSTOMIZE := go run sigs.k8s.io/kustomize/kustomize/v5
K8S_ENVTEST_VERSION := 1.30.0

PACKAGE=github.com/openshift/external-dns-operator

Expand Down Expand Up @@ -112,7 +112,7 @@ vet: ## Run go vet against code.
ENVTEST_ASSETS_DIR ?= $(shell pwd)/testbin
test: manifests generate fmt vet ## Run tests.
mkdir -p "$(ENVTEST_ASSETS_DIR)"
KUBEBUILDER_ASSETS="$(shell $(SETUP_ENVTEST) use "$(K8S_ENVTEST_VERSION)" --print path --bin-dir "$(ENVTEST_ASSETS_DIR)")" go test ./... -race -covermode=atomic -coverprofile coverage.out
KUBEBUILDER_ASSETS="$(shell $(SETUP_ENVTEST) use "$(K8S_ENVTEST_VERSION)" --print path --bin-dir "$(ENVTEST_ASSETS_DIR)")" CGO_ENABLED=1 go test ./... -race -covermode=atomic -coverprofile coverage.out

.PHONY: test-e2e
test-e2e:
Expand Down Expand Up @@ -218,7 +218,7 @@ endef
.PHONY: lint
## Checks the code with golangci-lint
lint: $(GOLANGCI_LINT_BIN)
$(GOLANGCI_LINT_BIN) run -c .golangci.yaml --deadline=30m
$(GOLANGCI_LINT_BIN) run -c .golangci.yaml

$(GOLANGCI_LINT_BIN):
mkdir -p $(BIN_DIR)
Expand Down
18 changes: 12 additions & 6 deletions api/v1beta1/webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metrics "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"
)

// These tests use Ginkgo (BDD-style Go testing framework). Refer to
Expand Down Expand Up @@ -85,12 +87,16 @@ var _ = BeforeSuite(func() {
// start webhook server using Manager
webhookInstallOptions := &testEnv.WebhookInstallOptions
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme,
Host: webhookInstallOptions.LocalServingHost,
Port: webhookInstallOptions.LocalServingPort,
CertDir: webhookInstallOptions.LocalServingCertDir,
LeaderElection: false,
MetricsBindAddress: "0",
Scheme: scheme,
WebhookServer: webhook.NewServer(webhook.Options{
Host: webhookInstallOptions.LocalServingHost,
Port: webhookInstallOptions.LocalServingPort,
CertDir: webhookInstallOptions.LocalServingCertDir,
}),
LeaderElection: false,
Metrics: metrics.Options{
BindAddress: "0",
},
})
Expect(err).NotTo(HaveOccurred())

Expand Down
8 changes: 4 additions & 4 deletions api/v1beta1/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
)

func makeExternalDNS(name string, domains []ExternalDNSDomain) *ExternalDNS {
Expand Down Expand Up @@ -139,7 +139,7 @@ var _ = Describe("ExternalDNS admission webhook", func() {
{
ExternalDNSDomainUnion: ExternalDNSDomainUnion{
MatchType: DomainMatchTypeRegex,
Pattern: pointer.String(`(.*\.test.com`),
Pattern: ptr.To[string](`(.*\.test.com`),
},
FilterType: FilterTypeInclude,
},
Expand All @@ -166,14 +166,14 @@ var _ = Describe("ExternalDNS admission webhook", func() {
{
ExternalDNSDomainUnion: ExternalDNSDomainUnion{
MatchType: DomainMatchTypeExact,
Name: pointer.String("abc.test.com"),
Name: ptr.To[string]("abc.test.com"),
},
FilterType: FilterTypeInclude,
},
{
ExternalDNSDomainUnion: ExternalDNSDomainUnion{
MatchType: DomainMatchTypeExact,
Name: pointer.String(`(.*)\.test\.com`),
Name: ptr.To[string](`(.*)\.test\.com`),
},
FilterType: FilterTypeInclude,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ spec:
fieldRef:
fieldPath: metadata.namespace
- name: RELATED_IMAGE_EXTERNAL_DNS
value: quay.io/external-dns-operator/external-dns@sha256:51e2acc81c804468932581379d674273fd2e62798be4e81c5c735bf0161590dd
value: quay.io/external-dns-operator/external-dns@sha256:42c9f6d6b01d5e45b7d5064d2d6dea1f7b51346198d80e7f7f9821bd7fd072cf
- name: TRUSTED_CA_CONFIGMAP_NAME
image: quay.io/openshift/origin-external-dns-operator:latest
name: external-dns-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down Expand Up @@ -789,11 +791,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down Expand Up @@ -791,11 +793,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down
6 changes: 3 additions & 3 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ spec:
fieldRef:
fieldPath: metadata.namespace
- name: RELATED_IMAGE_EXTERNAL_DNS
# openshift/external-dns commit: 441588e482514db7722f5c793cf70348b68d952d
# manifest link: https://quay.io/repository/external-dns-operator/external-dns/manifest/sha256:51e2acc81c804468932581379d674273fd2e62798be4e81c5c735bf0161590dd
value: quay.io/external-dns-operator/external-dns@sha256:51e2acc81c804468932581379d674273fd2e62798be4e81c5c735bf0161590dd
# openshift/external-dns commit: 8da2509b922d50ef7b1b8ea2297758888f32448d
# manifest link: https://quay.io/repository/external-dns-operator/external-dns/manifest/sha256:42c9f6d6b01d5e45b7d5064d2d6dea1f7b51346198d80e7f7f9821bd7fd072cf
value: quay.io/external-dns-operator/external-dns@sha256:42c9f6d6b01d5e45b7d5064d2d6dea1f7b51346198d80e7f7f9821bd7fd072cf
- name: TRUSTED_CA_CONFIGMAP_NAME
securityContext:
capabilities:
Expand Down
Loading

0 comments on commit 63fb086

Please sign in to comment.