mosquitto in tekton
This commit is contained in:
@@ -1,16 +1,15 @@
|
|||||||
FROM debian:stable-slim
|
FROM debian:stable-slim
|
||||||
|
|
||||||
#RUN echo 'Acquire::http::proxy "http://172.23.255.1:3142";' >/etc/apt/apt.conf.d/proxy
|
RUN sed -i 's@deb.debian.org@apt-cache.lan/deb.debian.org@g' /etc/apt/sources.list && \
|
||||||
RUN apt-get update && \
|
sed -i 's@security.debian.org@apt-cache.lan/security.debian.org@g' /etc/apt/sources.list && \
|
||||||
|
apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
mosquitto mosquitto-clients procps && \
|
mosquitto && \
|
||||||
apt-get clean -y && \
|
apt-get clean -y && \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
# Op port
|
# Op port
|
||||||
EXPOSE 1883
|
EXPOSE 1883
|
||||||
# Stats port
|
|
||||||
#EXPOSE 9090
|
|
||||||
|
|
||||||
ADD docker-entrypoint.sh /
|
ADD docker-entrypoint.sh /
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: mqtt-mosquitto
|
- name: mqtt-mosquitto
|
||||||
image: docker-registry.lan/mosquitto:arm64
|
image: cr.lan/mosquitto
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
@@ -63,7 +63,7 @@ spec:
|
|||||||
name: mosquitto-data
|
name: mosquitto-data
|
||||||
subPath: mosquitto/data
|
subPath: mosquitto/data
|
||||||
- name: mosquitto-exporter
|
- name: mosquitto-exporter
|
||||||
image: docker-registry.lan/mosquitto-exporter:arm64
|
image: cr.lan/mosquitto-exporter
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 9234
|
- containerPort: 9234
|
||||||
|
|||||||
76
apps/mosquitto/tekton-image-build.yaml
Normal file
76
apps/mosquitto/tekton-image-build.yaml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
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)
|
||||||
|
- --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
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user