Skip to content

Commit

Permalink
Initial implementation (#3)
Browse files Browse the repository at this point in the history
* Initial implementation
* Add alias parameter to the makefile to test the instantiation
  • Loading branch information
bastjan authored Dec 14, 2021
1 parent 45cca39 commit b9de4a1
Show file tree
Hide file tree
Showing 24 changed files with 1,633 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
matrix:
instance:
- defaults
- oidc
- openshift
defaults:
run:
working-directory: ${{ env.COMPONENT_NAME }}
Expand Down
6 changes: 6 additions & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ docs/antora.yml:
key: instance
entries:
- defaults
- oidc
- openshift

Makefile:
includes:
- Makefile.custom.mk
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SHELL := bash
.SUFFIXES:

include Makefile.vars.mk
include Makefile.custom.mk

.PHONY: help
help: ## Show this help
Expand Down
2 changes: 2 additions & 0 deletions Makefile.custom.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Configure instance alias for commodore component compile
commodore_args += --alias $(instance)
37 changes: 36 additions & 1 deletion class/defaults.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@
parameters:
vcluster:
=_metadata: {}
namespace: syn-vcluster
multi_instance: true
namespace: syn-${_instance}

host_service_cidr: null

images:
k3s:
repository: docker.io
image: rancher/k3s
tag: v1.22.2-k3s1
syncer:
repository: docker.io
image: loftsh/vcluster
tag: 0.5.0-alpha.6
kubectl:
repository: quay.io
image: bitnami/kubectl
tag: "1.22.4"

storage:
persistence: true
size: 5Gi
class_name: null

ingress:
host: null
labels: {}
annotations: {}

ocp_route:
host: null

k3s:
additional_args: []
syncer:
additional_args: []
2 changes: 1 addition & 1 deletion class/vcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ parameters:
- input_paths:
- vcluster/component/main.jsonnet
input_type: jsonnet
output_path: vcluster/
output_path: ${_instance}/
5 changes: 3 additions & 2 deletions component/app.jsonnet
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
local kap = import 'lib/kapitan.libjsonnet';
local inv = kap.inventory();
local params = inv.parameters.vcluster;
local instance = inv.parameters._instance;
local argocd = import 'lib/argocd.libjsonnet';

local app = argocd.App('vcluster', params.namespace);
local app = argocd.App(instance, params.namespace);

{
vcluster: app,
[instance]: app,
}
Loading

0 comments on commit b9de4a1

Please sign in to comment.