diff --git a/k8s/README.md b/k8s/README.md index 3c2ef28..f16a273 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -28,6 +28,8 @@ $ kubectl apply -f ghcr-secret.yaml To deploy, simply run the following commands. ``` +$ kubectl apply -f ./minio-deployment.yaml +$ kubectl apply -f ./minio-service.yaml $ kubectl apply -f ./node-result-deployment.yaml $ kubectl apply -f ./node-result-service.yaml ``` diff --git a/k8s/minio-deployment.yaml b/k8s/minio-deployment.yaml new file mode 100644 index 0000000..edb6f72 --- /dev/null +++ b/k8s/minio-deployment.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: local-minio-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: minio + template: + metadata: + labels: + app: minio + spec: + containers: + - name: local-minio + image: bitnami/minio:2024.1.16 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 9000 + name: http-s3 + env: + - name: MINIO_ROOT_USER + value: admin + - name: MINIO_ROOT_PASSWORD + value: s3cr3t_p4ssw0rd + - name: MINIO_DEFAULT_BUCKETS + value: flame diff --git a/k8s/minio-service.yaml b/k8s/minio-service.yaml new file mode 100644 index 0000000..3dab7c6 --- /dev/null +++ b/k8s/minio-service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: local-minio-service +spec: + type: NodePort # setting nodePort later is optional + selector: + app: minio + ports: + - protocol: TCP + port: 9000 # port of this service + targetPort: http-s3 # port on the pod diff --git a/k8s/node-result-deployment.yaml b/k8s/node-result-deployment.yaml index c5cde2e..ab0ed8a 100644 --- a/k8s/node-result-deployment.yaml +++ b/k8s/node-result-deployment.yaml @@ -19,5 +19,16 @@ spec: ports: - containerPort: 8080 name: http-result-srv + env: + - name: MINIO__ENDPOINT + value: local-minio + - name: MINIO__ACCESS_KEY + value: admin + - name: MINIO__SECRET_KEY + value: s3cr3t_p4ssw0rd + - name: MINIO__USE_SSL + value: false + - name: MINIO__BUCKET + value: flame imagePullSecrets: - name: dockerconfigjson-github-com