Skip to content

Commit

Permalink
Add visualizer app to CAPI Tilt
Browse files Browse the repository at this point in the history
  • Loading branch information
Jont828 committed Jul 13, 2022
1 parent 0f2f85c commit 835c589
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,15 @@ def deploy_observability():
k8s_yaml(read_file("./.tiltbuild/yaml/prometheus.observability.yaml"), allow_duplicates = True)
k8s_resource(workload = "prometheus-server", new_name = "prometheus", port_forwards = "9090", extra_pod_selectors = [{"app": "prometheus"}], labels = ["observability"])

if "visualizer" in settings.get("deploy_observability", []):
k8s_yaml(read_file("./.tiltbuild/yaml/visualizer.observability.yaml"), allow_duplicates = True)
k8s_resource(
workload = "capi-visualizer",
new_name = "visualizer",
port_forwards = [port_forward(local_port = 8000, container_port = 8081, name = "View visualization")],
labels = ["observability"],
)

def prepare_all():
allow_k8s_arg = ""
if settings.get("allowed_contexts"):
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/developer/tilt.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ kustomize_substitutions:
{{#/tabs }}

**deploy_observability** ([string], default=[]): If set, installs on the dev cluster one of more observability
tools. Supported values are `grafana`, `loki`, `promtail` and/or `prometheus` (Note: the UI for `grafana` and `prometheus` will be accessible via a link in the tilt console).
tools. Supported values are `grafana`, `loki`, `visualizer`, `promtail` and/or `prometheus` (Note: the UI for `grafana`, `prometheus`, and `visualizer` will be accessible via a link in the tilt console).
Important! This feature requires the `helm` command to be available in the user's path.

**debug** (Map{string: Map} default{}): A map of named configurations for the provider. The key is the name of the provider.
Expand Down
9 changes: 9 additions & 0 deletions hack/observability/visualizer/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
resources:
- ../namespace.yaml

helmCharts:
- name: cluster-api-visualizer
repo: https://raw.githubusercontent.com/Jont828/cluster-api-visualizer/main/helm/repo
releaseName: visualizer
namespace: observability
valuesFile: values.yaml
12 changes: 12 additions & 0 deletions hack/observability/visualizer/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
replicas: 1

image:
repository: ghcr.io/jont828
name: cluster-api-visualizer
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.1.0-alpha.2"

label:
key: app
value: visualizer

0 comments on commit 835c589

Please sign in to comment.