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

Update operator-sdk to v1.18 #164

Merged
merged 2 commits into from
Nov 2, 2023
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
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ KO_OPTS ?= -B -t ${TAG} --sbom=${SBOM}
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION)

# BUNDLE_GEN_FLAGS are the flags passed to the operator-sdk generate bundle command
BUNDLE_GEN_FLAGS ?= -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)

# USE_IMAGE_DIGESTS defines if images are resolved via tags or digests
# You can enable this value if you would like to use SHA Based Digests
# To enable set flag to true
USE_IMAGE_DIGESTS ?= false
ifeq ($(USE_IMAGE_DIGESTS), true)
BUNDLE_GEN_FLAGS += --use-image-digests
endif

# Image URL to use all building/pushing image targets
IMG ?= $(IMAGE_TAG_BASE):$(TAG)
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
Expand Down Expand Up @@ -221,7 +232,7 @@ endef
.PHONY: bundle
bundle: manifests kustomize operator-sdk ko ## Generate bundle manifests and metadata, then validate generated files.
$(OPERATOR_SDK) generate kustomize manifests --interactive=false -q
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
$(OPERATOR_SDK) bundle validate ./bundle

.PHONY: verify-bundle
Expand Down
2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=shipwright-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.16.0+git
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.17.0+git
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ spec:
targetPort: https
selector:
app: shipwright-operator
control-plane: controller-manager
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ metadata:
certified: "false"
containerImage: ko://github.com/shipwright-io/operator
description: Shipwright is a framework for building container images on Kubernetes.
operators.operatorframework.io/builder: operator-sdk-v1.16.0+git
operators.operatorframework.io/builder: operator-sdk-v1.17.0+git
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/shipwright-io/operator
support: The Shipwright Contributors
Expand Down Expand Up @@ -759,13 +759,15 @@ spec:
selector:
matchLabels:
app: shipwright-operator
control-plane: controller-manager
strategy: {}
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: operator
kubectl.kubernetes.io/default-container: manager
labels:
app: shipwright-operator
control-plane: controller-manager
spec:
containers:
- args:
Expand Down Expand Up @@ -800,7 +802,7 @@ spec:
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: operator
name: manager
readinessProbe:
httpGet:
path: /readyz
Expand Down
2 changes: 1 addition & 1 deletion bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ annotations:
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: shipwright-operator
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.16.0+git
operators.operatorframework.io.metrics.builder: operator-sdk-v1.17.0+git
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3

Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
requests:
cpu: 5m
memory: 64Mi
- name: operator
- name: manager
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=127.0.0.1:8080"
Expand Down
7 changes: 5 additions & 2 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ metadata:
namespace: system
labels:
app: shipwright-operator
control-plane: controller-manager
spec:
selector:
matchLabels:
app: shipwright-operator
control-plane: controller-manager
replicas: 1
template:
metadata:
annotations:
kubectl.kubernetes.io/default-container: operator
kubectl.kubernetes.io/default-container: manager
labels:
app: shipwright-operator
control-plane: controller-manager
spec:
securityContext:
runAsNonRoot: true
Expand All @@ -33,7 +36,7 @@ spec:
- name: USE_MANAGED_WEBHOOK_CERTS
value: "true"
image: ko://github.com/shipwright-io/operator
name: operator
name: manager
securityContext:
allowPrivilegeEscalation: false
livenessProbe:
Expand Down
2 changes: 2 additions & 0 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ kind: ServiceMonitor
metadata:
labels:
app: shipwright-operator
control-plane: controller-manager
name: operator-metrics-monitor
namespace: system
spec:
Expand All @@ -18,3 +19,4 @@ spec:
selector:
matchLabels:
app: shipwright-operator
control-plane: controller-manager
1 change: 1 addition & 0 deletions config/rbac/auth_proxy_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ spec:
targetPort: https
selector:
app: shipwright-operator
control-plane: controller-manager
2 changes: 1 addition & 1 deletion hack/install-operator-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
set -e

DEST="${1:-bin/operator-sdk}"
SDK_VERSION="${SDK_VERSION:-1.17.0}"
SDK_VERSION="${SDK_VERSION:-1.18.0}"

OS="${OS:-linux}"
ARCH="${ARCH:-amd64}"
Expand Down