diff --git a/SeoJimin1234/Dockerfile b/SeoJimin1234/Dockerfile new file mode 100644 index 0000000..94305a1 --- /dev/null +++ b/SeoJimin1234/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.9-slim + +WORKDIR /app + +COPY requirements.txt requirements.txt +RUN pip install -r requirements.txt + +COPY . . + +CMD ["python", "app.py"] diff --git a/SeoJimin1234/app.py b/SeoJimin1234/app.py new file mode 100644 index 0000000..c1a359f --- /dev/null +++ b/SeoJimin1234/app.py @@ -0,0 +1,14 @@ +from flask import Flask + +app = Flask(__name__) + +@app.route('/api/v1/SeoJimin1234') +def my_github_account(): + return {"message": "This is SeoJimin1234"} + +@app.route('/healthcheck') +def health_check(): + return {"status": "Jimin is very healthy"} + +if __name__ == '__main__': + app.run(host='0.0.0.0', port=8080) \ No newline at end of file diff --git a/SeoJimin1234/charts/Chart.yaml b/SeoJimin1234/charts/Chart.yaml new file mode 100644 index 0000000..3b8cd6c --- /dev/null +++ b/SeoJimin1234/charts/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v2 +name: seojimin-week-two +description: A Helm chart for week two assignment +version: 0.1.0 diff --git a/SeoJimin1234/charts/templates/deployment.yaml b/SeoJimin1234/charts/templates/deployment.yaml new file mode 100644 index 0000000..654b609 --- /dev/null +++ b/SeoJimin1234/charts/templates/deployment.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: seojimin-week-two +spec: + replicas: 1 + selector: + matchLabels: + app: seojimin-week-two + template: + metadata: + labels: + app: seojimin-week-two + spec: + containers: + - name: seojimin-week-two + image: "{{ .Values.image.name }}" + ports: + - containerPort: 8080 diff --git a/SeoJimin1234/charts/templates/service.yaml b/SeoJimin1234/charts/templates/service.yaml new file mode 100644 index 0000000..e9e2f68 --- /dev/null +++ b/SeoJimin1234/charts/templates/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: seojimin-week-two +spec: + type: NodePort + ports: + - port: 8080 + targetPort: 8080 + nodePort: 30080 + selector: + app: seojimin-week-two diff --git a/SeoJimin1234/charts/values.yaml b/SeoJimin1234/charts/values.yaml new file mode 100644 index 0000000..3fa7445 --- /dev/null +++ b/SeoJimin1234/charts/values.yaml @@ -0,0 +1,2 @@ +image: + name: SeoJimin1234/seojimin-week-two:latest diff --git a/SeoJimin1234/requirements.txt b/SeoJimin1234/requirements.txt new file mode 100644 index 0000000..11f8c2a --- /dev/null +++ b/SeoJimin1234/requirements.txt @@ -0,0 +1,2 @@ +Flask==2.2.5 +Werkzeug==2.2.3 \ No newline at end of file