Skip to content

Commit

Permalink
salt/solutions: Deploy Solutions K8s dependencies
Browse files Browse the repository at this point in the history
Some objects are required for MetalK8s to manage Solutions, notably a
Namespace and ConfigMap for Admin UIs, and the `Environment` CRD.

Issue: #1852
  • Loading branch information
gdemonet committed Oct 14, 2019
1 parent 5b477a5 commit 77a167e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 4 deletions.
6 changes: 4 additions & 2 deletions buildchain/buildchain/salt_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,10 @@ def _get_parts(self) -> Iterator[str]:
Path('salt/metalk8s/addons/ui/deployed/namespace.sls'),
Path('salt/metalk8s/addons/ui/deployed/ui.sls'),

Path('salt/metalk8s/addons/solutions/deployed.sls'),
Path('salt/metalk8s/addons/solutions/environment-crd.sls'),
Path('salt/metalk8s/addons/solutions/deployed/init.sls'),
Path('salt/metalk8s/addons/solutions/deployed/environment-crd.sls'),
Path('salt/metalk8s/addons/solutions/deployed/namespace.sls'),
Path('salt/metalk8s/addons/solutions/deployed/uis-configmap.sls'),

Path('salt/metalk8s/addons/volumes/deployed.sls'),
targets.TemplateFile(
Expand Down
2 changes: 0 additions & 2 deletions salt/metalk8s/addons/solutions/deployed.sls

This file was deleted.

4 changes: 4 additions & 0 deletions salt/metalk8s/addons/solutions/deployed/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include:
- .environment-crd
- .namespace
- .uis-configmap
10 changes: 10 additions & 0 deletions salt/metalk8s/addons/solutions/deployed/namespace.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!kubernetes kubeconfig=/etc/kubernetes/admin.conf&context=kubernetes-admin@kubernetes

apiVersion: v1
kind: Namespace
metadata:
name: metalk8s-solutions
labels:
app.kubernetes.io/managed-by: metalk8s
app.kubernetes.io/part-of: metalk8s
heritage: metalk8s
19 changes: 19 additions & 0 deletions salt/metalk8s/addons/solutions/deployed/uis-configmap.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!jinja | kubernetes kubeconfig=/etc/kubernetes/admin.conf&context=kubernetes-admin@kubernetes

{%- from "metalk8s/map.jinja" import repo with context %}
apiVersion: v1
kind: ConfigMap
metadata:
name: ui-branding
namespace: metalk8s-solutions
data:
config.json: |
{
"url": "https://{{ pillar.metalk8s.api_server.host }}:6443",
"registry_prefix": "{{ repo.registry_endpoint }}"
}
theme.json: |
{
"brand": {"primary": "#403e40", "secondary": "#e99121"}
}

0 comments on commit 77a167e

Please sign in to comment.