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

chore(bundle): get rid of bundle (operator-sdk) #89

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions .tools_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ golangci-lint: "1.57.2"
skaffold: "2.11.1"
# renovate: datasource=github-releases depName=go-delve/delve
dlv: "1.22.1"
# renovate: datasource=github-releases depName=operator-framework/operator-sdk
operator-sdk: "1.23.0"
# renovate: datasource=github-releases depName=mikefarah/yq
yq: "4.43.1"
# renovate: datasource=github-releases depName=gotestyourself/gotestsum
Expand Down
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif

PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))

TOOLS_VERSIONS_FILE = .tools_versions.yaml
TOOLS_VERSIONS_FILE = $(PROJECT_DIR)/.tools_versions.yaml

.PHONY: tools
tools: kic-role-generator controller-gen kustomize client-gen golangci-lint gotestsum skaffold yq crd-ref-docs
Expand All @@ -54,7 +54,7 @@ KIC_WEBHOOKCONFIG_GENERATOR = $(PROJECT_DIR)/bin/kic-webhook-config-generator
kic-webhook-config-generator:
( cd ./hack/generators/kic/webhook-config-generator && go build -o $(KIC_WEBHOOKCONFIG_GENERATOR) . )

export MISE_DATA_DIR = bin/
export MISE_DATA_DIR = $(PROJECT_DIR)/bin/

CONTROLLER_GEN_VERSION = $(shell yq -ojson -r '.controller-tools' < $(TOOLS_VERSIONS_FILE))
CONTROLLER_GEN = $(PROJECT_DIR)/bin/installs/kube-controller-tools/$(CONTROLLER_GEN_VERSION)/bin/controller-gen
Expand Down Expand Up @@ -84,13 +84,6 @@ golangci-lint: mise ## Download golangci-lint locally if necessary.
@$(MISE) plugin install --yes -q golangci-lint
@$(MISE) install -q golangci-lint@$(GOLANGCI_LINT_VERSION)

OPERATOR_SDK_VERSION = $(shell yq -ojson -r '.operator-sdk' < $(TOOLS_VERSIONS_FILE))
OPERATOR_SDK = $(PROJECT_DIR)/bin/installs/operator-sdk/$(OPERATOR_SDK_VERSION)/bin/operator-sdk
.PHONY: operator-sdk
operator-sdk: mise ## Download operator-sdk locally if necessary.
@$(MISE) plugin install --yes -q operator-sdk https://github.com/Medium/asdf-operator-sdk.git
@$(MISE) install -q operator-sdk@$(OPERATOR_SDK_VERSION)

GOTESTSUM_VERSION = $(shell yq -ojson -r '.gotestsum' < $(TOOLS_VERSIONS_FILE))
GOTESTSUM = $(PROJECT_DIR)/bin/installs/gotestsum/$(GOTESTSUM_VERSION)/bin/gotestsum
.PHONY: gotestsum
Expand Down
2 changes: 1 addition & 1 deletion config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resources:
- gateway.yaml
- gatewayconfiguration.yaml
- controlplane.yaml
# NOTE: Exclude AIGateway sample becuase it's not included in the bundle yet
# NOTE: Exclude AIGateway sample because it's not included in the bundle yet
# and that causes the following bundle generation error:
# /Users/[email protected]/code_/gateway-operator-enterprise/gateway-operator/bin/operator-sdk bundle validate bundle --select-optional suite=operatorframework
# ERRO[0000] Error: Value gateway-operator.konghq.com/v1alpha1, Kind=AIGateway: CRD "gateway-operator.konghq.com/v1alpha1, Kind=AIGateway" is present in bundle "kong-gateway-operator.v1.2.0-alpha.2" but not defined in CSV
Expand Down
2 changes: 1 addition & 1 deletion controllers/dataplane/controller_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func generateDataPlaneImage(dataplane *operatorv1beta1.DataPlane, defaultImage s

if relatedKongImage := os.Getenv("RELATED_IMAGE_KONG"); relatedKongImage != "" {
// RELATED_IMAGE_KONG is set by the operator-sdk when building the operator bundle.
// https://github.com/Kong/gateway-operator/issues/261
// https://github.com/Kong/gateway-operator-archive/issues/261
return relatedKongImage, nil
}

Expand Down
2 changes: 1 addition & 1 deletion controllers/pkg/controlplane/controlplane.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func GenerateImage(opts *operatorv1beta1.ControlPlaneOptions, validators ...vers

if relatedKongControllerImage := os.Getenv("RELATED_IMAGE_KONG_CONTROLLER"); relatedKongControllerImage != "" {
// RELATED_IMAGE_KONG_CONTROLLER is set by the operator-sdk when building the operator bundle.
// https://github.com/Kong/gateway-operator/issues/261
// https://github.com/Kong/gateway-operator-archive/issues/261
return relatedKongControllerImage, nil
}

Expand Down
2 changes: 1 addition & 1 deletion modules/manager/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (m *webhookManager) createCertificateConfigJobs(ctx context.Context) error
jobCertificateConfigImage := consts.WebhookCertificateConfigBaseImage
if relatedJobImage := os.Getenv("RELATED_IMAGE_CERTIFICATE_CONFIG"); relatedJobImage != "" {
// RELATED_IMAGE_CERTIFICATE_CONFIG is set by the operator-sdk when building the operator bundle.
// https://github.com/Kong/gateway-operator/issues/261
// https://github.com/Kong/gateway-operator-archive/issues/261
jobCertificateConfigImage = relatedJobImage
}
job := k8sresources.GenerateNewWebhookCertificateConfigJob(
Expand Down
Loading