diff --git a/mosquitto-base/configmap.yaml b/mosquitto-base/configmap.yaml new file mode 100644 index 0000000..17ac674 --- /dev/null +++ b/mosquitto-base/configmap.yaml @@ -0,0 +1,39 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: mosquitto-conf +data: + acl.yaml: | + default: + can_read: true + can_write: false + jimmy: + can_read: true + can_write: true + keys.yaml: | + default: + - /opt/mqtt/jpace121-key.pem + - /opt/mqtt/service-key.pem + mosquitto.conf: | + per_listener_settings false + allow_anonymous false + log_type all + + auth_plugin /usr/lib/libj7s-plugin.so + auth_opt_key_file /opt/mqtt/keys.yaml + auth_opt_acl_file /opt/mqtt/acl.yaml + + listener 9000 + protocol websockets + + listener 9001 + protocol mqtt + service-key.pem: | + -----BEGIN PUBLIC KEY----- + MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9DBwMe+eHkYLfq076sFq75gepyaL4LQtX8qVlGjJCtLxV308L2d8XGC35VBxrIbx8Bs5sKT4e5s9suzO8FhGMQ== + -----END PUBLIC KEY----- + jpace121-key.pem: | + -----BEGIN PUBLIC KEY----- + MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEqdtuaoyDj8jCtgB9qfUMwDe//VLAF1HTXHTQ7OS8i/S3wjOC4YOHxRy9kYQ3LdE44r7kIX6DR8VLJ3srctQ0xw== + -----END PUBLIC KEY----- diff --git a/mosquitto-base/deployment.yaml b/mosquitto-base/deployment.yaml new file mode 100644 index 0000000..47776e9 --- /dev/null +++ b/mosquitto-base/deployment.yaml @@ -0,0 +1,33 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mosquitto-deployment + labels: + app: mosquitto +spec: + replicas: 1 + selector: + matchLabels: + app: mosquitto + template: + metadata: + labels: + app: mosquitto + spec: + containers: + - name: mosquitto + image: harbor.internal.jpace121.net/k8s/mosquitto:latest + args: ["-v", "-c", "/opt/mqtt/mosquitto.conf"] + volumeMounts: + - mountPath: /opt/mqtt + name: mosquitto-conf + ports: + - containerPort: 9000 + name: websockets-port + - containerPort: 9001 + name: mqtt-port + volumes: + - name: mosquitto-conf + configMap: + name: mosquitto-conf \ No newline at end of file diff --git a/mosquitto-base/kustomization.yaml b/mosquitto-base/kustomization.yaml new file mode 100644 index 0000000..45badd0 --- /dev/null +++ b/mosquitto-base/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- configmap.yaml +- deployment.yaml +- service.yaml \ No newline at end of file diff --git a/mosquitto-base/service.yaml b/mosquitto-base/service.yaml new file mode 100644 index 0000000..721547a --- /dev/null +++ b/mosquitto-base/service.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: mosquitto-service +spec: + selector: + app: mosquitto + type: LoadBalancer + ports: + - protocol: TCP + port: 9000 + name: websockets-port + - protocol: TCP + port: 9001 + name: mqtt-port \ No newline at end of file diff --git a/mosquitto/kustomization.yaml b/mosquitto/kustomization.yaml new file mode 100644 index 0000000..7c41bc2 --- /dev/null +++ b/mosquitto/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: mosquitto +resources: +- ../mosquitto-base +- namespace.yaml +patchesStrategicMerge: +- patch.yaml diff --git a/mosquitto/namespace.yaml b/mosquitto/namespace.yaml new file mode 100644 index 0000000..3b968c9 --- /dev/null +++ b/mosquitto/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: mosquitto \ No newline at end of file diff --git a/mosquitto/patch.yaml b/mosquitto/patch.yaml new file mode 100644 index 0000000..7aefd99 --- /dev/null +++ b/mosquitto/patch.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mosquitto-deployment +spec: + template: + spec: + containers: + - name: mosquitto + image: harbor.internal.jpace121.net/k8s/mosquitto:0.0.7 diff --git a/squid-base/deployment.yaml b/squid-base/deployment.yaml new file mode 100644 index 0000000..5242569 --- /dev/null +++ b/squid-base/deployment.yaml @@ -0,0 +1,29 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: squid-deployment + labels: + app: squid +spec: + replicas: 1 + selector: + matchLabels: + app: squid + template: + metadata: + labels: + app: squid + spec: + containers: + - name: squid + image: 192.168.1.149:8443/squid:0.3 + volumeMounts: + - mountPath: /var/spool/squid + name: squid-volume + ports: + - containerPort: 3128 + name: squid-port + volumes: + - name: squid-volume + emptyDir: {} \ No newline at end of file diff --git a/squid-base/kustomization.yaml b/squid-base/kustomization.yaml new file mode 100644 index 0000000..011238f --- /dev/null +++ b/squid-base/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- deployment.yaml +- service.yaml \ No newline at end of file diff --git a/squid-base/service.yaml b/squid-base/service.yaml new file mode 100644 index 0000000..9aef324 --- /dev/null +++ b/squid-base/service.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: squid-service +spec: + selector: + app: squid + ports: + - protocol: TCP + targetPort: 3128 + port: 3128 + name: squid-port \ No newline at end of file diff --git a/squid/kustomization.yaml b/squid/kustomization.yaml new file mode 100644 index 0000000..47cfc7f --- /dev/null +++ b/squid/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ../squid-base \ No newline at end of file diff --git a/tekton/kustomization.yaml b/tekton/kustomization.yaml new file mode 100644 index 0000000..be1af8d --- /dev/null +++ b/tekton/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.46.0/release.yaml +- https://storage.googleapis.com/tekton-releases/triggers/previous/v0.23.0/release.yaml +- https://storage.googleapis.com/tekton-releases/triggers/previous/v0.23.0/interceptors.yaml +- https://storage.googleapis.com/tekton-releases/dashboard/previous/v0.34.0/release.yaml