-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: addon refactored to an opeator (#12)
triggering PR: RHEcosystemAppEng/regional-dr-trigger-operator#25 buddy PR: RHEcosystemAppEng/regional-dr-trigger-operator#36 Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com> Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
- Loading branch information
Showing
38 changed files
with
461 additions
and
952 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
bin | ||
*.tgz | ||
operator_tmp | ||
regional-dr-trigger-operator* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.* | ||
*.tgz | ||
regional-dr-trigger-operator* | ||
bin | ||
opeartor_tmp | ||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2023 Red Hat, Inc. | ||
|
||
apiVersion: v2 | ||
name: regional-dr-trigger-operator | ||
description: This Operator will use ODF's Regional DR API for triggering a Failover process for all Applications affiliated with a cluster which is reported as not available by ACM's Managed Cluster API. | ||
version: 1.0.0 | ||
appVersion: "0.1.0" | ||
home: https://github.com/RHEcosystemAppEng/regional-dr-trigger-operator | ||
keywords: | ||
- acm | ||
- odf | ||
- openshift | ||
- regional dr | ||
- disaster recovery | ||
icon: https://raw.githubusercontent.com/RHEcosystemAppEng/regional-dr-trigger-operator/main/hack/logo-rh-icon-standard-rgb.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,50 @@ | ||
# Copyright (c) 2023 Red Hat, Inc. | ||
|
||
################################################ | ||
###### Regional DR Trigger Operator Chart ###### | ||
################################################ | ||
LOCALBIN = $(shell pwd)/bin | ||
OS_ARCH = $(shell go env GOOS)-$(shell go env GOARCH) | ||
$(LOCALBIN): | ||
mkdir -p $(LOCALBIN) | ||
|
||
OS=$(shell go env GOOS) | ||
ARCH=$(shell go env GOARCH) | ||
|
||
BIN_CURL ?= curl | ||
BIN_YQ ?= yq | ||
|
||
BIN_HELM ?= $(LOCALBIN)/helm | ||
HELM_VERSION := v3.13.0 | ||
HELM_URL := https://get.helm.sh/helm-$(HELM_VERSION)-$(OS_ARCH).tar.gz | ||
VERSION_HELM = v3.14.0 | ||
|
||
OPERATOR_REPO ?= https://github.com/RHEcosystemAppEng/regional-dr-trigger-operator | ||
OPERATOR_BRANCH =? main | ||
|
||
CHART_VERSION ?= $(shell $(BIN_YQ) '.version' Chart.yaml) | ||
|
||
TEMP_FOLDER = operator_tmp # ignored by git | ||
|
||
.PHONY: lint | ||
lint: $(LOCALBIN) $(BIN_HELM) | ||
@$(BIN_HELM) lint multicluster-resiliency-addon | ||
lint: $(BIN_HELM) | ||
$(BIN_HELM) lint . | ||
|
||
.PHONY: package | ||
package: $(LOCALBIN) $(BIN_HELM) | ||
@$(BIN_HELM) package multicluster-resiliency-addon | ||
package: $(BIN_HELM) | ||
$(BIN_HELM) package . | ||
|
||
.PHONY: test | ||
test: $(LOCALBIN) $(BIN_HELM) | ||
@$(BIN_HELM) template multicluster-resiliency-addon > /dev/null | ||
test: $(BIN_HELM) | ||
$(BIN_HELM) template . > /dev/null | ||
|
||
.PHONY: install | ||
install: $(LOCALBIN) $(BIN_HELM) | ||
@$(BIN_HELM) install --generate-name multicluster-resiliency-addon | ||
install: $(BIN_HELM) | ||
$(BIN_HELM) install --generate-name . | ||
|
||
$(BIN_HELM): | ||
curl -sSL "$(HELM_URL)" | tar xzf - -C $(LOCALBIN) --strip-components=1 --wildcards '*/helm' | ||
.PHONY: generate | ||
generate: | ||
rm -rf $(TEMP_FOLDER) | ||
git clone --branch $(OPERATOR_BRANCH) $(OPERATOR_REPO) $(TEMP_FOLDER) | ||
cd $(TEMP_FOLDER) && $(MAKE) generate/chart CHART_VERSION=$(CHART_VERSION) CHART_TARGET=$(PWD) | ||
rm -rf $(TEMP_FOLDER) | ||
|
||
$(LOCALBIN): | ||
mkdir -p $(LOCALBIN) | ||
$(BIN_HELM): $(LOCALBIN) | ||
$(BIN_CURL) -sSL https://get.helm.sh/helm-$(VERSION_HELM)-$(OS)-$(ARCH).tar.gz | tar xzf - -C $(LOCALBIN) --strip-components=1 --wildcards '*/helm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
# MultiCluster Resiliency Addon Chart | ||
# Regional DR Trigger Operator Helm Chart | ||
|
||
_Helm Chart_ for the [MultiCluster Resiliency Addon][mcra] for [ACM][acm]. | ||
This chart is generated automatically, see [Makefile](Makefile). Please do not attempt to contribute to the chart | ||
elements directly. Instead, check the [Regional DR Operator repository](https://github.com/RHEcosystemAppEng/regional-dr-trigger-operator) | ||
for the scripts used to generate this chart. | ||
|
||
|
||
<!--LINKS--> | ||
[acm]: https://www.redhat.com/en/technologies/management/advanced-cluster-management | ||
[mcra]: https://github.com/RHEcosystemAppEng/multicluster-resiliency-addon | ||
This chart is used as part of the [Regional Resiliency Pattern](https://github.com/RHEcosystemAppEng/regional-resiliency-pattern). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
104 changes: 0 additions & 104 deletions
104
multicluster-resiliency-addon/crds/appeng.ecosystem.redhat.com_resilientclusters.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
multicluster-resiliency-addon/templates/addondeploymentconfig.yaml
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
multicluster-resiliency-addon/templates/clustermanagementaddon.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.