Skip to content

Commit ece898d

Browse files
authored
Merge pull request #9 from vshn/add/comp-function-support
Various small improvements
2 parents 3c6bc2f + 811b29e commit ece898d

File tree

8 files changed

+37
-650
lines changed

8 files changed

+37
-650
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ on:
88
branches:
99
- master
1010

11-
env:
12-
KIND_CMD: kind # kind is pre-installed in GitHub runners
13-
1411
jobs:
15-
crossplane:
12+
vshnpostgresql:
1613
runs-on: ubuntu-latest
1714
steps:
1815
- uses: actions/checkout@v3
1916

20-
- name: Run crossplane-setup
21-
run: make crossplane-setup
17+
- name: Run vshnpostgresql
18+
run: make vshnpostgresql

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.kind/
2+
.work/
23

34
# Docs
45
.cache/

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ include Makefile.vars.mk
1313
# KIND module
1414
include kind/kind.mk
1515

16-
vshnpostgresql: stackgres-setup certmanager-setup prometheus-setup
16+
vshnpostgresql: stackgres-setup certmanager-setup prometheus-setup ## Install everything needed to use PostgreSQL by VSHN locally
1717

1818
.PHONY: help
1919
help: ## Show this help
@@ -27,19 +27,22 @@ lint: ## All-in-one linting
2727
crossplane-setup: $(crossplane_sentinel) ## Install local Kubernetes cluster and install Crossplane
2828

2929
$(crossplane_sentinel): export KUBECONFIG = $(KIND_KUBECONFIG)
30-
$(crossplane_sentinel): kind-setup local-pv-setup
30+
$(crossplane_sentinel): kind-setup local-pv-setup load-comp-image
3131
helm repo add crossplane https://charts.crossplane.io/stable
3232
helm upgrade --install crossplane --create-namespace --namespace syn-crossplane crossplane/crossplane \
3333
--set "args[0]='--debug'" \
3434
--set "args[1]='--enable-composition-functions'" \
3535
--set "args[2]='--enable-environment-configs'" \
3636
--set "xfn.enabled=true" \
3737
--set "xfn.args={--debug}" \
38+
--set "xfn.image.repository=ghcr.io/vshn/appcat-comp-functions" \
39+
--set "xfn.image.tag=latest" \
3840
--wait
3941
@touch $@
4042

4143
stackgres-setup: export KUBECONFIG = $(KIND_KUBECONFIG)
42-
stackgres-setup: $(crossplane_sentinel)
44+
stackgres-setup: $(crossplane_sentinel) ## Install StackGres
45+
helm repo add stackgres-charts https://stackgres.io/downloads/stackgres-k8s/stackgres/helm/
4346
helm upgrade --install --create-namespace --namespace stackgres stackgres-operator stackgres-charts/stackgres-operator
4447

4548
certmanager-setup: export KUBECONFIG = $(KIND_KUBECONFIG)
@@ -67,7 +70,7 @@ $(k8up_sentinel): kind-setup
6770
kubectl -n k8up-system wait --for condition=Available deployment/k8up --timeout 60s
6871
@touch $@
6972

70-
local-pv-setup: $(local_pv_sentinel)
73+
local-pv-setup: $(local_pv_sentinel) ## Installs an alternative local-pv provider, that has slightly more features
7174

7275
$(local_pv_sentinel): export KUBECONFIG = $(KIND_KUBECONFIG)
7376
$(local_pv_sentinel):
@@ -91,5 +94,8 @@ $(prometheus_sentinel): kind-setup-ingress
9194
@echo -e "***\n*** Installed Prometheus in http://127.0.0.1.nip.io:8088/prometheus/ and AlertManager in http://127.0.0.1.nip.io:8088/alertmanager/.\n***"
9295
@touch $@
9396

97+
load-comp-image: ## Load the appcat-comp image if it exists
98+
[[ "$$(docker images -q ghcr.io/vshn/appcat-comp-functions 2> /dev/null)" != "" ]] && kind load docker-image --name kindev ghcr.io/vshn/appcat-comp-functions || true
99+
94100
.PHONY: clean
95101
clean: kind-clean ## Clean up local dev environment

go.mod

Lines changed: 0 additions & 23 deletions
This file was deleted.

go.sum

Lines changed: 0 additions & 593 deletions
This file was deleted.

local-pv/provisioner.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,3 +975,26 @@ provisioner: openebs.io/local
975975
volumeBindingMode: WaitForFirstConsumer
976976
reclaimPolicy: Delete
977977
---
978+
apiVersion: storage.k8s.io/v1
979+
kind: StorageClass
980+
metadata:
981+
name: ssd-encrypted
982+
annotations:
983+
openebs.io/cas-type: local
984+
cas.openebs.io/config: |
985+
#hostpath type will create a PV by
986+
# creating a sub-directory under the
987+
# BASEPATH provided below.
988+
- name: StorageType
989+
value: "hostpath"
990+
#Specify the location (directory) where
991+
# where PV(volume) data will be saved.
992+
# A sub-directory with pv-name will be
993+
# created. When the volume is deleted,
994+
# the PV sub-directory will be deleted.
995+
#Default value is /var/openebs/local
996+
- name: BasePath
997+
value: "/var/openebs/local/"
998+
provisioner: openebs.io/local
999+
volumeBindingMode: WaitForFirstConsumer
1000+
reclaimPolicy: Delete

renovate.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

tools.go

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)