Skip to content

Commit

Permalink
chore: prepare for release of v0.1.0 (#469)
Browse files Browse the repository at this point in the history
* chore: prepare for release of v0.1.0

Signed-off-by: John Pitman <[email protected]>
  • Loading branch information
jopit authored Nov 8, 2021
1 parent 8779d99 commit b5c30f9
Show file tree
Hide file tree
Showing 83 changed files with 55,239 additions and 140 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ COPY controllers/ controllers/
COPY version/ version/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
ARG LD_FLAGS
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$LD_FLAGS" -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
41 changes: 38 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ IMG ?= $(IMAGE_TAG_BASE):v$(VERSION)
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"

LD_FLAGS = "-X github.com/argoproj-labs/argocd-operator/version.Version=$(VERSION)"

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
Expand Down Expand Up @@ -91,13 +93,13 @@ test: manifests generate fmt vet envtest ## Run tests.
##@ Build

build: generate fmt vet ## Build manager binary.
go build -o bin/manager main.go
go build -ldflags=$(LD_FLAGS) -o bin/manager main.go

run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go
go run -ldflags=$(LD_FLAGS) ./main.go

docker-build: test ## Build docker image with the manager.
docker build -t ${IMG} .
docker build --build-arg LD_FLAGS=$(LD_FLAGS) -t ${IMG} .

docker-push: ## Push docker image with the manager.
docker push ${IMG}
Expand Down Expand Up @@ -151,6 +153,10 @@ bundle: manifests kustomize ## Generate bundle manifests and metadata, then vali
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
operator-sdk bundle validate ./bundle
rm -fr deploy/olm-catalog/argocd-operator/$(VERSION)
mkdir -p deploy/olm-catalog/argocd-operator/$(VERSION)
cp -r bundle/manifests/* deploy/olm-catalog/argocd-operator/$(VERSION)/
mv deploy/olm-catalog/argocd-operator/$(VERSION)/argocd-operator.clusterserviceversion.yaml deploy/olm-catalog/argocd-operator/$(VERSION)/argocd-operator.v$(VERSION).clusterserviceversion.yaml

.PHONY: bundle-build
bundle-build: ## Build the bundle image.
Expand All @@ -160,6 +166,35 @@ bundle-build: ## Build the bundle image.
bundle-push: ## Push the bundle image.
$(MAKE) docker-push IMG=$(BUNDLE_IMG)

# UTIL_IMG defines the image:tag used for the utility image (for backup).
# You can use it as an arg. (E.g make bundle-build UTIL_IMG=<some-registry>/<project-name-bundle>:<tag>)
UTIL_IMG ?= $(IMAGE_TAG_BASE)-util:v$(VERSION)

.PHONY: util-build
util-build: ## Build the util container image (for backup)
docker build --no-cache -t $(UTIL_IMG) build/util

.PHONY: util-push
util-push: ## Push the util container image
$(MAKE) docker-push IMG=$(UTIL_IMG)

# REGISTRY_IMG defines the image:tag used for the (legacy) registry container image.
# You can use it as an arg. (E.g make bundle-build UTIL_IMG=<some-registry>/<project-name-bundle>:<tag>)
REGISTRY_IMG ?= $(IMAGE_TAG_BASE)-registry:v$(VERSION)

.PHONY: registry-build
registry-build: ## Build the registry container image
rm -fr build/_output
mkdir -p build/_output/registry
cp -r deploy/registry/* build/_output/registry/
mkdir -p build/_output/registry/manifests
cp -r deploy/olm-catalog/argocd-operator build/_output/registry/manifests/
docker build -t $(REGISTRY_IMG) build/_output/registry

.PHONY: registry-push
registry-push: ## Push the util container image
$(MAKE) docker-push IMG=$(REGISTRY_IMG)

.PHONY: opm
OPM = ./bin/opm
opm: ## Download opm locally if necessary.
Expand Down
4 changes: 2 additions & 2 deletions build/util/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Argo CD v2.0.0
FROM argoproj/argocd@sha256:8d1d58ef963f615da97e0b2c54dbe243801d5e7198b98393ab36b7a5768f72a4
# Argo CD v2.1.6
FROM quay.io/argoproj/argocd@sha256:0bbcd97134f2d7c28293d4b717317f32aaf8fa816a1ffe764c1ebc390c4646d3

USER root

Expand Down
3 changes: 2 additions & 1 deletion bundle/manifests/argocd-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
image: quay.io/argoprojlabs/argocd-operator:v0.1.0
image: quay.io/argoprojlabs/argocd-operator@sha256:36a65debc06ec68237e5cb6ce9dd2e5076407b00b05d511654e152bd03f2496a
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -1047,4 +1047,5 @@ spec:
maturity: alpha
provider:
name: Argo CD Community
replaces: argocd-operator.v0.0.15
version: 0.1.0
8 changes: 4 additions & 4 deletions common/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ const (
ArgoCDDefaultApplicationInstanceLabelKey = "app.kubernetes.io/instance"

// ArgoCDDefaultArgoImage is the ArgoCD container image to use when not specified.
ArgoCDDefaultArgoImage = "argoproj/argocd"
ArgoCDDefaultArgoImage = "quay.io/argoproj/argocd"

// ArgoCDDefaultArgoVersion is the Argo CD container image digest to use when version not specified.
ArgoCDDefaultArgoVersion = "sha256:2e0e725c9282bfb7b08bea7dbbfd8dbce6410d670e3f8addd9b6540d818ad520" // v2.1.2
ArgoCDDefaultArgoVersion = "sha256:0bbcd97134f2d7c28293d4b717317f32aaf8fa816a1ffe764c1ebc390c4646d3" // v2.1.6

// ArgoCDDefaultBackupKeyLength is the length of the generated default backup key.
ArgoCDDefaultBackupKeyLength = 32
Expand Down Expand Up @@ -110,10 +110,10 @@ const (
ArgoCDDefaultDexVersion = "sha256:77bfea96e8d8f3e4197b9f6020c8f5dedbb701245c19afd69a15747ae4bf2804" // v2.28.0

// ArgoCDDefaultExportJobImage is the export job container image to use when not specified.
ArgoCDDefaultExportJobImage = "quay.io/jmckind/argocd-operator-util"
ArgoCDDefaultExportJobImage = "quay.io/argoprojlabs/argocd-operator-util"

// ArgoCDDefaultExportJobVersion is the export job container image tag to use when not specified.
ArgoCDDefaultExportJobVersion = "sha256:dd0b52626828629ebf614ec86ed7914119e7f1efcfebcb5da52502582e0797a1" // v0.0.15
ArgoCDDefaultExportJobVersion = "sha256:0c779eea3f08ffa75fe9d06852b9ab7aed445cb5ac96831c2429b0ed98444324" // v0.1.0

// ArgoCDDefaultExportLocalCapicity is the default capacity to use for local export.
ArgoCDDefaultExportLocalCapicity = "2Gi"
Expand Down
4 changes: 2 additions & 2 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ configMapGenerator:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
- digest: sha256:36a65debc06ec68237e5cb6ce9dd2e5076407b00b05d511654e152bd03f2496a
name: controller
newName: quay.io/argoprojlabs/argocd-operator
newTag: v0.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -660,4 +660,5 @@ spec:
maturity: alpha
provider:
name: Argo CD Community
replaces: argocd-operator.v0.0.15
version: 0.0.0
2 changes: 1 addition & 1 deletion deploy/catalog_source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ metadata:
name: argocd-catalog
spec:
sourceType: grpc
image: quay.io/argoprojlabs/argocd-operator:v0.1.0
image: quay.io/argoprojlabs/argocd-operator-registry@sha256:7cbeac22c6c4b98f525d6114664c953d13d68c26a861a4604bf544dc5f8f113d
displayName: Argo CD Operators
publisher: Argo CD Community
Loading

0 comments on commit b5c30f9

Please sign in to comment.