forked from syndesisio/syndesis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate out Makefile contents into individual directories
* All sync functions placed inside directories as own sub-makefiles * Part of release, replaces makefiles which stubs so that make calls in command makefile are neutralised * Main makefile included in release along with created yml files and kustomizations * release.sh * Syncs directories, stubs makefiles then creates tar archive for upload to github
- Loading branch information
1 parent
a2a35ff
commit 9bf5908
Showing
13 changed files
with
447 additions
and
167 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**/*.yml | ||
release/syndesis* | ||
release/*.tar.gz |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ASSETS := ../../pkg/generator/assets | ||
CR := ./syndesis-cr.yml | ||
|
||
.PHONY: sync | ||
|
||
# | ||
# Copy the go template from the src directory | ||
# Convert the go template to a formatted yaml file: | ||
# - Remove any range/end sections (not required) | ||
# | ||
sync: | ||
cp $(ASSETS)/install/app.yml.tmpl $(CR) | ||
sed -i '/{{- range/,/{{- end }}\|{{end}}/d' $(CR) |
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,10 @@ | ||
ASSETS := ../../../pkg/generator/assets | ||
CRD := ./syndesis-crd.yml | ||
|
||
.PHONY: sync | ||
|
||
# | ||
# Copy the go template from the src directory | ||
# | ||
sync: | ||
cp $(ASSETS)/install/cluster/syndesis.yml $(CRD) |
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,37 @@ | ||
ASSETS := ../../../pkg/generator/assets | ||
DB_IMAGE ?= centos/postgresql-10-centos7 | ||
DEPLOYMENT := ./deployment.yml | ||
IMAGE ?= docker.io/syndesis/syndesis-operator | ||
NAMESPACE ?= syndesis | ||
OPERATOR_INSTALL := ./operator-install.yml | ||
ROLENAME ?= syndesis-operator | ||
TAG ?= latest | ||
|
||
.PHONY: sync | ||
|
||
# | ||
# Copy the go template from the src directory | ||
# Convert the go template to a formatted yaml file: | ||
# - Delete any line beginning with '{{' | ||
# - Delete any empty lines | ||
# - Convert go-style array '- xxx' to yaml format: '---\n' & remove double-spaces at start of lines | ||
# - Replace Role, Namespace, Tag, Image placeholders | ||
# - Delete DevSupport conditional, ImageStreamTag line, else and end codewords | ||
# | ||
sync: | ||
cp $(ASSETS)/install/operator_install.yml.tmpl $(OPERATOR_INSTALL) | ||
sed -i '/^{{\|^$$/d' $(OPERATOR_INSTALL) | ||
sed -i 's/^- /\n---\n/' $(OPERATOR_INSTALL) | ||
sed -i 's/^ //' $(OPERATOR_INSTALL) | ||
sed -i 's/{{ .Role }}/$(ROLENAME)/' $(OPERATOR_INSTALL) | ||
sed -i 's/{{.Namespace}}/$(NAMESPACE)/' $(OPERATOR_INSTALL) | ||
sed -i 's/{{.Tag}}/$(TAG)/' $(OPERATOR_INSTALL) | ||
sed -i 's_{{.Image}}_$(IMAGE)_' $(OPERATOR_INSTALL) | ||
sed -i '/{{if .DevSupport}}/d' $(OPERATOR_INSTALL) | ||
sed -i '/kind: ImageStreamTag/d' $(OPERATOR_INSTALL) | ||
sed -i '/{{else}}\|{{end}}/d' $(OPERATOR_INSTALL) | ||
cp $(ASSETS)/install/operator_deployment.yml.tmpl $(DEPLOYMENT) | ||
sed -i '/{{- if/,/{{- end}}\|{{end}}/d' $(DEPLOYMENT) | ||
sed -i 's/{{.Tag}}/$(TAG)/' $(DEPLOYMENT) | ||
sed -i 's_{{.Image}}_$(IMAGE)_' $(DEPLOYMENT) | ||
sed -i 's_{{.DatabaseImage}}_$(DB_IMAGE)_' $(DEPLOYMENT) |
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,41 @@ | ||
ASSETS := ../../../pkg/generator/assets | ||
GRANT := ./grant.yml | ||
GRANT_JAEGER := ./grant-jaeger.yml | ||
GRANT_KAFKA := ./grant-kafka.yml | ||
GRANT_OLM := ./grant-olm.yml | ||
GRANT_PUBLIC_API := ./grant-public-api.yml | ||
KUBE_USER ?= developer | ||
NAMESPACE ?= syndesis | ||
ROLENAME ?= syndesis-operator | ||
|
||
.PHONY: sync | ||
|
||
# | ||
# Copy the go template from the src directory | ||
# Convert the go template to a formatted yaml file: | ||
# - Replace Kind, Role, User, Namespace placeholders | ||
# - Delete any if & end codeword lines | ||
# | ||
sync: | ||
cp $(ASSETS)/install/grant/grant_role.yml.tmpl $(GRANT) | ||
sed -i 's/{{ .Kind }}/Role/' $(GRANT) | ||
sed -i 's/{{ .Role }}/$(ROLENAME)/' $(GRANT) | ||
sed -i 's/{{ .User }}/$(KUBE_USER)/' $(GRANT) | ||
sed -i 's/{{ .Namespace }}/$(NAMESPACE)/' $(GRANT) | ||
sed -i '/{{- if\|{{- end/d' $(GRANT) | ||
cp $(ASSETS)/install/grant/grant_cluster_role_jaeger.yml.tmpl $(GRANT_JAEGER) | ||
sed -i '/^{{\|^$$/d' $(GRANT_JAEGER) | ||
sed -i 's/^- /\n---\n/' $(GRANT_JAEGER) | ||
sed -i 's/^ //' $(GRANT_JAEGER) | ||
sed -i 's/{{ .Namespace }}/$(NAMESPACE)/' $(GRANT_JAEGER) | ||
sed -i 's/{{ .User }}/$(KUBE_USER)/' $(GRANT_JAEGER) | ||
cp $(ASSETS)/install/grant/grant_cluster_role_kafka.yml.tmpl $(GRANT_KAFKA) | ||
sed -i 's/{{ .Namespace }}/$(NAMESPACE)/' $(GRANT_KAFKA) | ||
cp $(ASSETS)/install/grant/grant_cluster_role_olm.yml.tmpl $(GRANT_OLM) | ||
sed -i '/^{{\|^$$/d' $(GRANT_OLM) | ||
sed -i 's/^- /\n---\n/' $(GRANT_OLM) | ||
sed -i 's/^ //' $(GRANT_OLM) | ||
sed -i 's/{{ .Role }}/$(ROLENAME)/' $(GRANT_OLM) | ||
sed -i 's/{{ .User }}/$(KUBE_USER)/' $(GRANT_OLM) | ||
cp $(ASSETS)/install/grant/grant_cluster_role_public_api.yml.tmpl $(GRANT_PUBLIC_API) | ||
sed -i 's/{{.Namespace}}/$(NAMESPACE)/' $(GRANT_PUBLIC_API) |
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,14 @@ | ||
ASSETS := ../../../pkg/generator/assets | ||
JAEGER_CRD := ./jaeger-crd.yml | ||
|
||
.PHONY: sync | ||
|
||
# | ||
# Copy the go template from the src directory | ||
# Convert the go template to a formatted yaml file: | ||
# - Delete any line beginning with '{{' | ||
# - Delete any empty lines and comments | ||
# | ||
sync: | ||
cp $(ASSETS)/install/cluster/jaeger.yml.tmpl $(JAEGER_CRD) | ||
sed -i '/^{{\|^#\|^$$/d' $(JAEGER_CRD) |
2 changes: 2 additions & 0 deletions
2
install/operator/kustomize/bases/jaeger-crd/kustomization.yaml
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,2 @@ | ||
resources: | ||
- jaeger-crd.yml |
Oops, something went wrong.