fix export to statsd
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
FROM python:latest
|
FROM python:latest
|
||||||
|
|
||||||
RUN apt update && apt install -y lm-sensors watch stress
|
RUN apt update && apt install -y lm-sensors watch stress
|
||||||
|
RUN pip install glances bottle statsd pysnmp
|
||||||
|
|
||||||
CMD sleep infinity
|
COPY glances.conf /etc/glances/glances.conf
|
||||||
|
|
||||||
|
CMD glances -w
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
temp:
|
web:
|
||||||
build: .
|
image: hub.ducoterra.net/ducoterra/temp:0.0.7
|
||||||
image: hub.ducoterra.net/ducoterra/temp:0.0.2
|
ports:
|
||||||
|
- 61208:61208
|
||||||
|
command: glances -w
|
||||||
|
exporter:
|
||||||
|
image: hub.ducoterra.net/ducoterra/temp:0.0.7
|
||||||
|
command: glances --export statsd
|
||||||
|
graphite-statsd:
|
||||||
|
image: hub.ducoterra.net/ducoterra/graphite:0.0.1
|
||||||
|
ports:
|
||||||
|
- 8080:80
|
||||||
4
glances.conf
Normal file
4
glances.conf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[statsd]
|
||||||
|
host=graphite-statsd
|
||||||
|
port=8125
|
||||||
|
prefix=mainframe
|
||||||
@@ -13,12 +13,22 @@ spec:
|
|||||||
app: {{ .Release.Name }}
|
app: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Release.Name }}
|
- name: {{ .Release.Name }}-web
|
||||||
image: hub.ducoterra.net/ducoterra/temp:0.0.2
|
image: {{ .Values.image }}
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: 1Mi
|
memory: 1Mi
|
||||||
cpu: 1m
|
cpu: 1m
|
||||||
limits:
|
limits:
|
||||||
memory: 1Gi
|
memory: 256Mi
|
||||||
cpu: '48'
|
cpu: "24"
|
||||||
|
- name: {{ .Release.Name }}-exporter
|
||||||
|
image: {{ .Values.image }}
|
||||||
|
command: ["glances", "-q", "--export", "statsd"]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 1Mi
|
||||||
|
cpu: 1m
|
||||||
|
limits:
|
||||||
|
memory: 256Mi
|
||||||
|
cpu: 250m
|
||||||
39
helm/templates/ingress.yaml
Normal file
39
helm/templates/ingress.yaml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-internal-tls
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-internal
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
tls:
|
||||||
|
certResolver: myresolver
|
||||||
|
domains:
|
||||||
|
- main: "*.ducoterra.net"
|
||||||
|
routes:
|
||||||
|
- match: Host(`{{ .Release.Name }}.ducoterra.net`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: {{ .Release.Name }}
|
||||||
|
port: 61208
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-internal-web
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-internal
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- web
|
||||||
|
routes:
|
||||||
|
- match: Host(`{{ .Release.Name }}.ducoterra.net`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: {{ .Release.Name }}
|
||||||
|
port: 61208
|
||||||
|
middlewares:
|
||||||
|
- name: httpsredirect
|
||||||
10
helm/templates/service.yaml
Normal file
10
helm/templates/service.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: {{ .Release.Name }}
|
||||||
|
ports:
|
||||||
|
- port: 61208
|
||||||
|
targetPort: 61208
|
||||||
@@ -1,79 +1 @@
|
|||||||
# Default values for helm.
|
image: hub.ducoterra.net/ducoterra/temp:0.0.7
|
||||||
# This is a YAML-formatted file.
|
|
||||||
# Declare variables to be passed into your templates.
|
|
||||||
|
|
||||||
replicaCount: 1
|
|
||||||
|
|
||||||
image:
|
|
||||||
repository: nginx
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
|
||||||
tag: ""
|
|
||||||
|
|
||||||
imagePullSecrets: []
|
|
||||||
nameOverride: ""
|
|
||||||
fullnameOverride: ""
|
|
||||||
|
|
||||||
serviceAccount:
|
|
||||||
# Specifies whether a service account should be created
|
|
||||||
create: true
|
|
||||||
# Annotations to add to the service account
|
|
||||||
annotations: {}
|
|
||||||
# The name of the service account to use.
|
|
||||||
# If not set and create is true, a name is generated using the fullname template
|
|
||||||
name: ""
|
|
||||||
|
|
||||||
podAnnotations: {}
|
|
||||||
|
|
||||||
podSecurityContext: {}
|
|
||||||
# fsGroup: 2000
|
|
||||||
|
|
||||||
securityContext: {}
|
|
||||||
# capabilities:
|
|
||||||
# drop:
|
|
||||||
# - ALL
|
|
||||||
# readOnlyRootFilesystem: true
|
|
||||||
# runAsNonRoot: true
|
|
||||||
# runAsUser: 1000
|
|
||||||
|
|
||||||
service:
|
|
||||||
type: ClusterIP
|
|
||||||
port: 80
|
|
||||||
|
|
||||||
ingress:
|
|
||||||
enabled: false
|
|
||||||
annotations: {}
|
|
||||||
# kubernetes.io/ingress.class: nginx
|
|
||||||
# kubernetes.io/tls-acme: "true"
|
|
||||||
hosts:
|
|
||||||
- host: chart-example.local
|
|
||||||
paths: []
|
|
||||||
tls: []
|
|
||||||
# - secretName: chart-example-tls
|
|
||||||
# hosts:
|
|
||||||
# - chart-example.local
|
|
||||||
|
|
||||||
resources: {}
|
|
||||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
|
||||||
# choice for the user. This also increases chances charts run on environments with little
|
|
||||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
|
||||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
|
||||||
# limits:
|
|
||||||
# cpu: 100m
|
|
||||||
# memory: 128Mi
|
|
||||||
# requests:
|
|
||||||
# cpu: 100m
|
|
||||||
# memory: 128Mi
|
|
||||||
|
|
||||||
autoscaling:
|
|
||||||
enabled: false
|
|
||||||
minReplicas: 1
|
|
||||||
maxReplicas: 100
|
|
||||||
targetCPUUtilizationPercentage: 80
|
|
||||||
# targetMemoryUtilizationPercentage: 80
|
|
||||||
|
|
||||||
nodeSelector: {}
|
|
||||||
|
|
||||||
tolerations: []
|
|
||||||
|
|
||||||
affinity: {}
|
|
||||||
Reference in New Issue
Block a user