-
Notifications
You must be signed in to change notification settings - Fork 7
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
First release #1
Changes from 1 commit
e9b325a
47426ad
c5d94f2
d86f809
f0cd7b8
cc03b39
e0b31c0
0fb9df0
17040a2
65acd70
a1fda54
f188303
bb8f3b0
f550f55
74159e1
2a95a04
9e6729e
a536f4c
f649912
40f86ea
bd559b8
b1b3a1d
26e3e49
d6caecc
e807512
721e35a
0057b48
0642138
8fb81f0
ff54cc2
e0da9bc
c8d0f5a
63642c0
3624f0f
9a95983
a34a2d2
c26cecb
f156da2
0804a16
807f1bd
031c9eb
46a9a81
264d98e
bbc9757
0900762
ea3bcb7
e403bbf
3505d3a
322ede8
d7ee0f5
cce0229
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL) | |
# IMAGE_TAG_BASE defines the docker.io namespace and part of the image name for remote images. | ||
# This variable is used to construct full image tags for bundle and catalog images. | ||
# | ||
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both | ||
# parodos.dev/operator-bundle:$VERSION and parodos.dev/operator-catalog:$VERSION. | ||
IMAGE_TAG_BASE ?= quay.io/parodos-dev/orchestrator-controller | ||
IMAGE_TAG_BASE ?= quay.io/orchestrator/controller-manager | ||
|
||
# BUNDLE_IMG defines the image:tag used for the bundle. | ||
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>) | ||
|
@@ -48,7 +46,7 @@ endif | |
|
||
# Set the Operator SDK version to use. By default, what is installed on the system is used. | ||
# This is useful for CI or a project to utilize a specific version of the operator-sdk toolkit. | ||
OPERATOR_SDK_VERSION ?= v1.34.1 | ||
OPERATOR_SDK_VERSION ?= v1.33.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why a lower version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There seems to be an issue with 1.34.1 on running the bundle target ( |
||
|
||
# Image URL to use all building/pushing image targets | ||
IMG ?= $(IMAGE_TAG_BASE):latest | ||
|
@@ -95,11 +93,14 @@ docker-push: ## Push docker image with the manager. | |
# To properly provided solutions that supports more than one platform you should use this option. | ||
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le | ||
.PHONY: docker-buildx | ||
docker-buildx: ## Build and push docker image for the manager for cross-platform support | ||
docker-buildx: test ## Build and push docker image for the manager for cross-platform support | ||
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile | ||
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross | ||
- docker buildx create --name project-v3-builder | ||
docker buildx use project-v3-builder | ||
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile . | ||
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . | ||
- docker buildx rm project-v3-builder | ||
rm Dockerfile.cross | ||
|
||
##@ Deployment | ||
|
||
|
@@ -131,7 +132,7 @@ ifeq (,$(shell which kustomize 2>/dev/null)) | |
@{ \ | ||
set -e ;\ | ||
mkdir -p $(dir $(KUSTOMIZE)) ;\ | ||
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.2.1/kustomize_v5.2.1_$(OS)_$(ARCH).tar.gz | \ | ||
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v5.0.1/kustomize_v5.0.1_$(OS)_$(ARCH).tar.gz | \ | ||
tar xzf - -C bin/ ;\ | ||
} | ||
else | ||
|
@@ -147,7 +148,7 @@ ifeq (,$(shell which helm-operator 2>/dev/null)) | |
@{ \ | ||
set -e ;\ | ||
mkdir -p $(dir $(HELM_OPERATOR)) ;\ | ||
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.34.1/helm-operator_$(OS)_$(ARCH) ;\ | ||
curl -sSLo $(HELM_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.33.0/helm-operator_$(OS)_$(ARCH) ;\ | ||
chmod +x $(HELM_OPERATOR) ;\ | ||
} | ||
else | ||
|
@@ -156,7 +157,7 @@ endif | |
endif | ||
|
||
.PHONY: operator-sdk | ||
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk | ||
OPERATOR_SDK ?= ./bin/operator-sdk | ||
operator-sdk: ## Download operator-sdk locally if necessary. | ||
ifeq (,$(wildcard $(OPERATOR_SDK))) | ||
ifeq (, $(shell which operator-sdk 2>/dev/null)) | ||
|
@@ -187,7 +188,7 @@ bundle-push: ## Push the bundle image. | |
$(MAKE) docker-push IMG=$(BUNDLE_IMG) | ||
|
||
.PHONY: opm | ||
OPM = $(LOCALBIN)/opm | ||
OPM = ./bin/opm | ||
opm: ## Download opm locally if necessary. | ||
ifeq (,$(wildcard $(OPM))) | ||
ifeq (,$(shell which opm 2>/dev/null)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/component: kube-rbac-proxy | ||
app.kubernetes.io/created-by: orchestrator-operator | ||
app.kubernetes.io/instance: controller-manager-metrics-service | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: service | ||
app.kubernetes.io/part-of: orchestrator-operator | ||
control-plane: controller-manager | ||
name: orchestrator-operator-metrics-service | ||
spec: | ||
ports: | ||
- name: https | ||
port: 8443 | ||
protocol: TCP | ||
targetPort: https | ||
selector: | ||
control-plane: controller-manager | ||
status: | ||
loadBalancer: {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/component: kube-rbac-proxy | ||
app.kubernetes.io/created-by: orchestrator-operator | ||
app.kubernetes.io/instance: metrics-reader | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: clusterrole | ||
app.kubernetes.io/part-of: orchestrator-operator | ||
name: orchestrator-operator-metrics-reader | ||
rules: | ||
- nonResourceURLs: | ||
- /metrics | ||
verbs: | ||
- get |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use
orchestrator-operator
as image name instead? if this is the default name generated by the SDK, and has a wider effect on the rest of the generated code, we can use it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's defined here:
https://github.com/jordigilh/orchestrator-helm-operator/blob/d7ee0f512ce88cfe76e79b216a184d6af6a86357/PROJECT#L10-L12
We can set the value we want anyway. I'll change it to
orchestrator-operator
as suggested.