Skip to content

Commit f0d8cf0

Browse files
committed
wip
1 parent fc22ebf commit f0d8cf0

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

charts/Makefile

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,60 @@ CONFIG_DIR := $(shell dirname $(REPO_CONFIG_LOCATION))
77
CHART_DIRS := $(wildcard $(REPO_BASE_DIR)/charts/*/)
88

99
.PHONY: .check-helmfile-installed
10-
.check-helmfile-installed:
10+
.check-helmfile-installed: ## Checks if helmfile is installed
1111
@if ! command -v helmfile >/dev/null 2>&1; then \
1212
echo "'helmfile' is not installed. Install it to continue ...";\
1313
fi
1414

15-
helmfile.yaml: simcore-charts/helmfile.yaml
15+
helmfile.yaml: simcore-charts/helmfile.yaml ## Copies the helmfile.yaml to the charts directory
1616
cp $(CONFIG_DIR)/$@ $(REPO_BASE_DIR)/charts/helmfile.yaml
1717

18-
simcore-charts/helmfile.yaml:
18+
simcore-charts/helmfile.yaml: ## Copies the simcore helmfile to the charts directory
1919
cp $(CONFIG_DIR)/helmfile.simcore.yaml $(REPO_BASE_DIR)/charts/$@
2020

2121
.PHONY: helmfile-lint
22-
helmfile-lint: .check-helmfile-installed helmfile.yaml
22+
helmfile-lint: .check-helmfile-installed helmfile.yaml ## Lints the helmfile
2323
set -a; source $(REPO_CONFIG_LOCATION); set +a; \
2424
helmfile lint
2525

2626
.PHONY: .helmfile-local-post-install
27-
.helmfile-local-post-install:
27+
.helmfile-local-post-install: ## Post install steps for local helmfile deployment
2828
@$(MAKE) -s configure-local-hosts
2929
@echo "";
3030
@echo "Cluster has been deployed locally: http://$(MACHINE_FQDN)";
3131
@echo " For secure connections self-signed certificates are used.";
32-
@echo " Install their root-ca certificate in your system for smooth experience.";
33-
@echo " For insecure connections make sure to disable automatic https redirects in your browser.";
32+
@echo "
3433

3534
.PHONY: helmfile-apply
36-
helmfile-apply: .check-helmfile-installed helmfile.yaml
35+
helmfile-apply: .check-helmfile-installed helmfile.yaml ## Applies the helmfile configuration
3736
set -a; source $(REPO_CONFIG_LOCATION); set +a; \
3837
helmfile -f $(REPO_BASE_DIR)/charts/helmfile.yaml apply
3938

4039
@if [ "$(MACHINE_FQDN)" = "osparc.local" ]; then \
4140
$(MAKE) -s .helmfile-local-post-install; \
4241
fi
4342

43+
.PHONY: helmfile-sync
44+
helmfile-sync: .check-helmfile-installed helmfile.yaml ## Syncs the helmfile configuration
45+
set -a; source $(REPO_CONFIG_LOCATION); set +a; \
46+
helmfile -f $(REPO_BASE_DIR)/charts/helmfile.yaml sync
47+
48+
@if [ "$(MACHINE_FQDN)" = "osparc.local" ]; then \
49+
$(MAKE) -s .helmfile-local-post-install; \
50+
fi
51+
52+
4453
.PHONY: configure-local-hosts
45-
configure-local-hosts:
46-
@echo "Addings $(MACHINE_FQDN) hosts to /etc/hosts ..."
54+
configure-local-hosts: ## Adds local hosts entries for the machine
55+
@echo "Adding $(MACHINE_FQDN) hosts to /etc/hosts ..."
4756
@grep -q '127.0.0.1 k8s.monitoring.$(MACHINE_FQDN)' /etc/hosts || echo '127.0.0.1 k8s.monitoring.$(MACHINE_FQDN)' | sudo tee -a /etc/hosts
4857

4958
.PHONY: helmfile-diff
50-
helmfile-diff: .check-helmfile-installed helmfile.yaml
59+
helmfile-diff: .check-helmfile-installed helmfile.yaml ## Shows the differences that would be applied by helmfile
5160
@set -a; source $(REPO_CONFIG_LOCATION); set +a; \
5261
helmfile -f $(REPO_BASE_DIR)/charts/helmfile.yaml diff
5362

5463
.PHONY: helmfile-delete
55-
helmfile-delete: .check-helmfile-installed helmfile.yaml
64+
helmfile-delete: .check-helmfile-installed helmfile.yaml ## Deletes the helmfile configuration
5665
@set -a; source $(REPO_CONFIG_LOCATION); set +a; \
5766
helmfile -f $(REPO_BASE_DIR)/charts/helmfile.yaml delete

charts/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ source: https://kind.sigs.k8s.io/docs/user/quick-start
2323

2424
Follow the instructions here: https://helm.sh/docs/intro/install/
2525

26+
Install the helm-diff plugin: `helm plugin install https://github.com/databus23/helm-diff`
27+
28+
`via https://doc.traefik.io/traefik/user-guides/crd-acme/#ingressroute-definition`
29+
Install traefik-v3 CRDs: `kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.1/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml`
30+
31+
`via https://doc.traefik.io/traefik/user-guides/crd-acme/#ingressroute-definition`
32+
Install traefik-v3 RBAC: `kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.1/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml`
33+
2634
#### helmfile
2735

2836
If you have a different OS / architecture, pick a different link from [release artifacts](https://github.com/helmfile/helmfile/releases)

0 commit comments

Comments
 (0)