mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: sensu
|
||||
version: 0.1.3
|
||||
version: 0.2.0
|
||||
description: Sensu monitoring framework backed by the Redis transport
|
||||
keywords:
|
||||
- sensu
|
||||
|
||||
@@ -3,18 +3,18 @@ Getting Started:
|
||||
|
||||
1. Get the Sensu API URL to visit by running these commands in the same shell:
|
||||
{{- if contains "NodePort" .Values.serviceType }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "sensu.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.serviceType }}
|
||||
**** NOTE: It may take a few minutes for the LoadBalancer IP to be available. ****
|
||||
**** You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}' ****
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
**** You can watch the status of by running 'kubectl get svc -w {{ template "sensu.fullname" . }}' ****
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "sensu.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
|
||||
echo http://$SERVICE_IP:{{ .Values.httpPort }}/login
|
||||
{{- else if contains "ClusterIP" .Values.serviceType }}
|
||||
echo 'API endpoints docs at https://sensuapp.org/docs/0.24/api/health-and-info-api.html'
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "sensu.fullname" . }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
echo http://127.0.0.1:4567/info
|
||||
kubectl port-forward $POD_NAME 4567:4567
|
||||
{{- end }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "name" -}}
|
||||
{{- define "sensu.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -10,7 +10,7 @@ Expand the name of the chart.
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "redis.fullname" -}}
|
||||
{{- define "sensu.redis.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -18,7 +18,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- define "sensu.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
name: {{ template "sensu.fullname" . }}
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
@@ -11,7 +11,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "fullname" . }}
|
||||
app: {{ template "sensu.fullname" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
spec:
|
||||
containers:
|
||||
@@ -28,11 +28,11 @@ spec:
|
||||
- name: API_PORT
|
||||
value: '4567'
|
||||
- name: REDIS_HOST
|
||||
value: {{ template "redis.fullname" . }}
|
||||
value: {{ template "sensu.redis.fullname" . }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "redis.fullname" . }}
|
||||
name: {{ template "sensu.redis.fullname" . }}
|
||||
key: redis-password
|
||||
- name: REDIS_DB
|
||||
value: {{ .Values.REDIS_DB | quote }}
|
||||
@@ -51,11 +51,11 @@ spec:
|
||||
{{ toYaml .Values.api.resources | indent 10 }}
|
||||
env:
|
||||
- name: REDIS_HOST
|
||||
value: {{ template "redis.fullname" . }}
|
||||
value: {{ template "sensu.redis.fullname" . }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "redis.fullname" . }}
|
||||
name: {{ template "sensu.redis.fullname" . }}
|
||||
key: redis-password
|
||||
- name: REDIS_DB
|
||||
value: {{ .Values.REDIS_DB | quote }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}
|
||||
name: {{ template "sensu.fullname" . }}
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
@@ -17,4 +17,4 @@ spec:
|
||||
- port: {{ .Values.httpPort }}
|
||||
targetPort: 4567
|
||||
selector:
|
||||
app: {{ template "fullname" . }}
|
||||
app: {{ template "sensu.fullname" . }}
|
||||
|
||||
Reference in New Issue
Block a user