Skip to content

Commit

Permalink
Upgrade operator-sdk (#982)
Browse files Browse the repository at this point in the history
* Upgrading operator-sdk

Signed-off-by: Yuri Sa <[email protected]>

* Upgrading operator-sdk

Signed-off-by: Yuri Sa <[email protected]>

* Upgrading operator-sdk

Signed-off-by: Yuri Sa <[email protected]>

* Changing api docs

Signed-off-by: Yuri Sa <[email protected]>

* Changing annotations

Signed-off-by: Yuri Sa <[email protected]>

* Changing annotations

Signed-off-by: Yuri Sa <[email protected]>

* Upgrading scorecard version

Signed-off-by: Yuri Sa <[email protected]>

* Removing curl-bash commands and kustomization file changes

Signed-off-by: Yuri Sa <[email protected]>

* Removing curl-bash commands and kustomization file changes

Signed-off-by: Yuri Sa <[email protected]>

* Adding kube-rbac-proxy changes

Signed-off-by: Yuri Sa <[email protected]>
  • Loading branch information
yuriolisa authored Jul 19, 2022
1 parent 9bc0080 commit f8c2849
Show file tree
Hide file tree
Showing 13 changed files with 1,359 additions and 1,271 deletions.
33 changes: 23 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,19 @@ endif
KUBE_VERSION ?= 1.24
KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml

OPERATOR_SDK_VERSION ?= 1.17.0
OPERATOR_SDK_VERSION ?= 1.22.1

CERTMANAGER_VERSION ?= 1.8.0

ifndef ignore-not-found
ignore-not-found = false
endif

## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)

.PHONY: ensure-generate-is-noop
ensure-generate-is-noop: VERSION=$(OPERATOR_VERSION)
ensure-generate-is-noop: USER=open-telemetry
Expand Down Expand Up @@ -218,20 +223,28 @@ cmctl:
rm -rf $$TMP_DIR ;\
}

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
.PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen,v0.8.0)
KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v4.5.5
CONTROLLER_TOOLS_VERSION ?= v0.8.0


KUSTOMIZE = $(shell pwd)/bin/kustomize
.PHONY: kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3,v3.8.7)
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4,$(KUSTOMIZE_VERSION))

.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

ENVTEST = $(shell pwd)/bin/setup-envtest
.PHONY: envtest
envtest: ## Download envtest-setup locally if necessary.
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,latest)
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

CRDOC = $(shell pwd)/bin/crdoc
.PHONY: crdoc
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=opentelemetry-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.22.1
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

Expand Down
43 changes: 23 additions & 20 deletions bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ metadata:
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
createdAt: "2020-12-16T13:37:00+00:00"
description: Provides the OpenTelemetry components, including the Collector
operators.operatorframework.io/builder: operator-sdk-v1.16.0+git
operators.operatorframework.io/builder: operator-sdk-v1.22.1
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: github.com/open-telemetry/opentelemetry-operator
support: OpenTelemetry Community
Expand Down Expand Up @@ -261,7 +261,10 @@ spec:
- create
serviceAccountName: opentelemetry-operator-controller-manager
deployments:
- name: opentelemetry-operator-controller-manager
- label:
app.kubernetes.io/name: opentelemetry-operator
control-plane: controller-manager
name: opentelemetry-operator-controller-manager
spec:
replicas: 1
selector:
Expand All @@ -276,24 +279,6 @@ spec:
control-plane: controller-manager
spec:
containers:
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
- args:
- --metrics-addr=127.0.0.1:8080
- --enable-leader-election
Expand Down Expand Up @@ -326,6 +311,24 @@ spec:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
- --logtostderr=true
- --v=0
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0
name: kube-rbac-proxy
ports:
- containerPort: 8443
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
serviceAccountName: opentelemetry-operator-controller-manager
terminationGracePeriodSeconds: 10
volumes:
Expand Down
Loading

0 comments on commit f8c2849

Please sign in to comment.