-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
237 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
image goldpinger bloomberg/goldpinger:3.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
--- | ||
# Source: goldpinger/templates/serviceaccount.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: goldpinger | ||
labels: | ||
helm.sh/chart: goldpinger-6.1.2 | ||
app.kubernetes.io/name: goldpinger | ||
app.kubernetes.io/instance: goldpinger | ||
app.kubernetes.io/version: "3.9.0" | ||
app.kubernetes.io/managed-by: Helm | ||
--- | ||
# Source: goldpinger/templates/configmap.yaml | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: goldpinger-zap | ||
labels: | ||
helm.sh/chart: goldpinger-6.1.2 | ||
app.kubernetes.io/name: goldpinger | ||
app.kubernetes.io/instance: goldpinger | ||
app.kubernetes.io/version: "3.9.0" | ||
app.kubernetes.io/managed-by: Helm | ||
data: | ||
zap.json: "{\n \"level\": \"info\",\n \"encoding\": \"json\",\n \"outputPaths\": [\n \"stdout\"\n ],\n \"errorOutputPaths\": [\n \"stderr\"\n ],\n \"initialFields\": {\n },\n \"encoderConfig\": {\n \"messageKey\": \"message\",\n \"levelKey\": \"level\",\n \"levelEncoder\": \"lowercase\",\n \"timeKey\": \"ts\",\n \"timeEncoder\": \"ISO8601\",\n \"callerKey\": \"caller\",\n \"callerEncoder\": \"Short\"\n }\n}\n" | ||
--- | ||
# Source: goldpinger/templates/clusterrole.yaml | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: goldpinger-clusterrole | ||
labels: | ||
helm.sh/chart: goldpinger-6.1.2 | ||
app.kubernetes.io/name: goldpinger | ||
app.kubernetes.io/instance: goldpinger | ||
app.kubernetes.io/version: "3.9.0" | ||
app.kubernetes.io/managed-by: Helm | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods"] | ||
verbs: ["list"] | ||
--- | ||
# Source: goldpinger/templates/clusterrolebinding.yaml | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: goldpinger-clusterrolebinding | ||
labels: | ||
helm.sh/chart: goldpinger-6.1.2 | ||
app.kubernetes.io/name: goldpinger | ||
app.kubernetes.io/instance: goldpinger | ||
app.kubernetes.io/version: "3.9.0" | ||
app.kubernetes.io/managed-by: Helm | ||
subjects: | ||
- kind: ServiceAccount | ||
name: goldpinger | ||
namespace: kurl | ||
roleRef: | ||
kind: ClusterRole | ||
name: goldpinger-clusterrole | ||
apiGroup: rbac.authorization.k8s.io | ||
--- | ||
# Source: goldpinger/templates/service.yaml | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: goldpinger | ||
labels: | ||
helm.sh/chart: goldpinger-6.1.2 | ||
app.kubernetes.io/name: goldpinger | ||
app.kubernetes.io/instance: goldpinger | ||
app.kubernetes.io/version: "3.9.0" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 80 | ||
targetPort: 80 | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app.kubernetes.io/name: goldpinger | ||
app.kubernetes.io/instance: goldpinger | ||
--- | ||
# Source: goldpinger/templates/daemonset.yaml | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: goldpinger | ||
labels: | ||
helm.sh/chart: goldpinger-6.1.2 | ||
app.kubernetes.io/name: goldpinger | ||
app.kubernetes.io/instance: goldpinger | ||
app.kubernetes.io/version: "3.9.0" | ||
app.kubernetes.io/managed-by: Helm | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: goldpinger | ||
app.kubernetes.io/instance: goldpinger | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: goldpinger | ||
app.kubernetes.io/instance: goldpinger | ||
spec: | ||
priorityClassName: | ||
serviceAccountName: goldpinger | ||
containers: | ||
- name: goldpinger-daemon | ||
image: "bloomberg/goldpinger:3.9.0" | ||
imagePullPolicy: IfNotPresent | ||
volumeMounts: | ||
- name: zap | ||
mountPath: /config | ||
env: | ||
- name: HOSTNAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: HOST | ||
value: "0.0.0.0" | ||
- name: PORT | ||
value: "80" | ||
- name: LABEL_SELECTOR | ||
value: "app.kubernetes.io/name=goldpinger" | ||
- name: POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
- name: PING_TIMEOUT | ||
value: 2s | ||
- name: CHECK_TIMEOUT | ||
value: 3s | ||
- name: CHECK_ALL_TIMEOUT | ||
value: 10s | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
resources: | ||
limits: | ||
cpu: 50m | ||
memory: 128Mi | ||
requests: | ||
cpu: 20m | ||
memory: 64Mi | ||
volumes: | ||
- name: zap | ||
configMap: | ||
name: goldpinger-zap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
function goldpinger() { | ||
local src="$DIR/addons/goldpinger/3.9.0-6.1.2" | ||
local dst="$DIR/kustomize/goldpinger" | ||
|
||
cp "$src/kustomization.yaml" "$dst/" | ||
cp "$src/goldpinger.yaml" "$dst/" | ||
cp "$src/servicemonitor.yaml" "$dst/" | ||
cp "$src/troubleshoot.yaml" "$dst/" | ||
|
||
if [ -n "${PROMETHEUS_VERSION}" ]; then | ||
insert_resources "$dst/kustomization.yaml" servicemonitor.yaml | ||
fi | ||
|
||
kubectl apply -k "$dst/" | ||
|
||
logStep "Waiting for the Goldpinger Daemonset to be ready" | ||
spinner_until 180 goldpinger_daemonset | ||
logStep "Waiting for the Goldpinger service to be ready" | ||
spinner_until 120 kubernetes_service_healthy kurl goldpinger | ||
logSuccess "Goldpinger is ready and monitoring node network health" | ||
} | ||
|
||
function goldpinger_daemonset() { | ||
local desired=$(kubectl get daemonsets -n kurl goldpinger --no-headers | tr -s ' ' | cut -d ' ' -f2) | ||
local ready=$(kubectl get daemonsets -n kurl goldpinger --no-headers | tr -s ' ' | cut -d ' ' -f4) | ||
local uptodate=$(kubectl get daemonsets -n kurl goldpinger --no-headers | tr -s ' ' | cut -d ' ' -f5) | ||
|
||
if [ "$desired" = "$ready" ] ; then | ||
if [ "$desired" = "$uptodate" ] ; then | ||
return 0 | ||
fi | ||
fi | ||
return 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace: kurl | ||
|
||
resources: | ||
- goldpinger.yaml | ||
- troubleshoot.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: goldpinger-prometheus-servicemonitor | ||
namespace: monitoring | ||
labels: | ||
app.kubernetes.io/name: goldpinger | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: goldpinger | ||
namespaceSelector: | ||
matchNames: | ||
- kurl | ||
endpoints: | ||
- port: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: kurl-goldpinger-supportbundle-spec | ||
labels: | ||
troubleshoot.io/kind: support-bundle | ||
stringData: | ||
support-bundle-spec: | | ||
apiVersion: troubleshoot.sh/v1beta2 | ||
kind: SupportBundle | ||
metadata: | ||
name: goldpinger | ||
spec: | ||
collectors: | ||
- goldpinger: | ||
collectorName: kurl-goldpinger | ||
namespace: kurl | ||
analyzers: | ||
- goldpinger: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters