Skip to content

Commit

Permalink
Merge pull request #9 from vshn/add/comp-function-support
Browse files Browse the repository at this point in the history
Various small improvements
  • Loading branch information
Kidswiss authored May 9, 2023
2 parents 3c6bc2f + 811b29e commit ece898d
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 650 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@ on:
branches:
- master

env:
KIND_CMD: kind # kind is pre-installed in GitHub runners

jobs:
crossplane:
vshnpostgresql:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Run crossplane-setup
run: make crossplane-setup
- name: Run vshnpostgresql
run: make vshnpostgresql
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.kind/
.work/

# Docs
.cache/
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include Makefile.vars.mk
# KIND module
include kind/kind.mk

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

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

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

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

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

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

$(local_pv_sentinel): export KUBECONFIG = $(KIND_KUBECONFIG)
$(local_pv_sentinel):
Expand All @@ -91,5 +94,8 @@ $(prometheus_sentinel): kind-setup-ingress
@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***"
@touch $@

load-comp-image: ## Load the appcat-comp image if it exists
[[ "$$(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

.PHONY: clean
clean: kind-clean ## Clean up local dev environment
23 changes: 0 additions & 23 deletions go.mod

This file was deleted.

593 changes: 0 additions & 593 deletions go.sum

This file was deleted.

23 changes: 23 additions & 0 deletions local-pv/provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -975,3 +975,26 @@ provisioner: openebs.io/local
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ssd-encrypted
annotations:
openebs.io/cas-type: local
cas.openebs.io/config: |
#hostpath type will create a PV by
# creating a sub-directory under the
# BASEPATH provided below.
- name: StorageType
value: "hostpath"
#Specify the location (directory) where
# where PV(volume) data will be saved.
# A sub-directory with pv-name will be
# created. When the volume is deleted,
# the PV sub-directory will be deleted.
#Default value is /var/openebs/local
- name: BasePath
value: "/var/openebs/local/"
provisioner: openebs.io/local
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete
13 changes: 0 additions & 13 deletions renovate.json

This file was deleted.

11 changes: 0 additions & 11 deletions tools.go

This file was deleted.

0 comments on commit ece898d

Please sign in to comment.