mosquitto and prometheus
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
FROM debian:stable-slim
|
||||
FROM cr.lan/debian-stable
|
||||
|
||||
RUN sed -i 's@deb.debian.org@apt-cache.lan/deb.debian.org@g' /etc/apt/sources.list && \
|
||||
sed -i 's@security.debian.org@apt-cache.lan/security.debian.org@g' /etc/apt/sources.list && \
|
||||
apt-get update && \
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
mosquitto procps && \
|
||||
apt-get clean -y && \
|
||||
|
||||
10
apps/mosquitto/prometheus/Dockerfile
Normal file
10
apps/mosquitto/prometheus/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM cr.lan/debian-golang-stable
|
||||
|
||||
ENV GOARCH=arm64
|
||||
ENV GOPATH=/usr/src/gopath
|
||||
ENV GOCACHE=/usr/src/gocache
|
||||
RUN go env
|
||||
WORKDIR /usr/src
|
||||
RUN go get github.com/sapcc/mosquitto-exporter
|
||||
RUN make j4 build CGO_ENABLED=0
|
||||
RUN ls -al
|
||||
@@ -1,77 +0,0 @@
|
||||
apiVersion: tekton.dev/v1alpha1
|
||||
kind: PipelineResource
|
||||
metadata:
|
||||
name: chaos-kubernetes-git
|
||||
spec:
|
||||
type: git
|
||||
params:
|
||||
- name: revision
|
||||
value: master
|
||||
- name: url
|
||||
value: http://git-ui.lan/chaos/kubernetes.git
|
||||
- name: submodules
|
||||
value: "false"
|
||||
---
|
||||
apiVersion: tekton.dev/v1alpha1
|
||||
kind: PipelineResource
|
||||
metadata:
|
||||
name: img-mosquitto
|
||||
spec:
|
||||
type: image
|
||||
params:
|
||||
- name: url
|
||||
value: cr.lan/mosquitto
|
||||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: build-mosquitto
|
||||
spec:
|
||||
params:
|
||||
- name: pathToDockerFile
|
||||
type: string
|
||||
default: $(resources.inputs.source.path)/apps/mosquitto/Dockerfile
|
||||
- name: pathToContext
|
||||
type: string
|
||||
default: $(resources.inputs.source.path)/apps/mosquitto
|
||||
resources:
|
||||
inputs:
|
||||
- name: source
|
||||
type: git
|
||||
outputs:
|
||||
- name: builtImage
|
||||
type: image
|
||||
steps:
|
||||
- name: build-and-push
|
||||
image: gcr.io/kaniko-project/executor:arm64
|
||||
command:
|
||||
- /kaniko/executor
|
||||
args:
|
||||
- --dockerfile=$(params.pathToDockerFile)
|
||||
- --destination=$(resources.outputs.builtImage.url)
|
||||
- --context=$(params.pathToContext)
|
||||
- --snapshotMode=redo
|
||||
- --skip-tls-verify
|
||||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: TaskRun
|
||||
metadata:
|
||||
name: img-mosquitto-taskrun
|
||||
spec:
|
||||
#serviceAccountName: dockerhub-service
|
||||
taskRef:
|
||||
name: build-mosquitto
|
||||
params:
|
||||
- name: pathToDockerFile
|
||||
value: Dockerfile
|
||||
resources:
|
||||
inputs:
|
||||
- name: source
|
||||
resourceRef:
|
||||
name: chaos-kubernetes-git
|
||||
outputs:
|
||||
- name: builtImage
|
||||
resourceRef:
|
||||
name: img-mosquitto
|
||||
|
||||
|
||||
24
apps/mosquitto/tekton-prometheus.yaml
Normal file
24
apps/mosquitto/tekton-prometheus.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
name: img-mosquitto-prometheus
|
||||
spec:
|
||||
pipelineRef:
|
||||
name: kaniko-pipeline
|
||||
params:
|
||||
- name: git-url
|
||||
value: http://git-ui.lan/chaos/kubernetes.git
|
||||
- name: git-revision
|
||||
value: master
|
||||
- name: path-to-image-context
|
||||
value: apps/mosquitto/prometheus
|
||||
- name: path-to-dockerfile
|
||||
value: apps/mosquitto/prometheus/Dockerfile
|
||||
- name: image-name
|
||||
value: cr.lan/mosquitto-prometheus-exporter
|
||||
workspaces:
|
||||
- name: git-source
|
||||
persistentVolumeClaim:
|
||||
claimName: tektoncd-workspaces
|
||||
subPath: tekton/mosquitto-prometheus
|
||||
|
||||
23
apps/mosquitto/tekton.yaml
Normal file
23
apps/mosquitto/tekton.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
name: img-mosquitto
|
||||
spec:
|
||||
pipelineRef:
|
||||
name: kaniko-pipeline
|
||||
params:
|
||||
- name: git-url
|
||||
value: http://git-ui.lan/chaos/kubernetes.git
|
||||
- name: git-revision
|
||||
value: master
|
||||
- name: path-to-image-context
|
||||
value: apps/mosquitto
|
||||
- name: path-to-dockerfile
|
||||
value: apps/mosquitto/Dockerfile
|
||||
- name: image-name
|
||||
value: cr.lan/mosquitto
|
||||
workspaces:
|
||||
- name: git-source
|
||||
persistentVolumeClaim:
|
||||
claimName: tektoncd-workspaces
|
||||
subPath: tekton/mosquitto
|
||||
Reference in New Issue
Block a user