Skip to content

Commit c1e65ef

Browse files
committed
improve docker image and deployment
Signed-off-by: Luiz Oliveira <ziuloliveira@gmail.com>
1 parent b3e9b61 commit c1e65ef

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

.dockerignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,9 @@ static/
252252

253253
helm/
254254
.git/
255-
.github/
255+
.github/
256+
charts/
257+
*.tgz
258+
tests/
259+
*.ini
260+
Dockerfile

charts/swagger-operator/templates/deployment.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,21 @@ spec:
6565
- secretRef:
6666
name: {{ include "swagger-admin.ssoSecretName" . }}
6767
{{- end }}
68+
env:
69+
- name: SWAGGER_OPERATOR_VERSION
70+
value: {{ .Values.image.tag | default .Chart.AppVersion }}
6871
ports:
6972
- name: http
7073
containerPort: {{ .Values.service.containerPort }}
7174
protocol: TCP
72-
# livenessProbe:
73-
# httpGet:
74-
# path: /
75-
# port: http
76-
# readinessProbe:
77-
# httpGet:
78-
# path: /
79-
# port: http
75+
livenessProbe:
76+
httpGet:
77+
path: /
78+
port: http
79+
readinessProbe:
80+
httpGet:
81+
path: /
82+
port: http
8083
resources:
8184
{{- toYaml .Values.resources | nindent 12 }}
8285
{{- with .Values.volumeMounts }}

server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ async def config(request: Request):
195195
{
196196
"request": request,
197197
"urls": swaggers,
198-
"title": os.environ.get("TITLE", "API Documentation - Config"),
198+
"title": os.environ.get("TITLE", "Swagger Operator"),
199+
"version": os.environ.get("SWAGGER_OPERATOR_VERSION", ""),
199200
"session": request.session,
200201
"settings": {
201202
"enable_oidc": ENABLE_OIDC,

templates/config.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
<title>{{ title }}</title>
55
</head>
66
<body>
7-
<h1>{{ title }}</h1>
7+
<h1>
8+
{{ title }}{% if version %} - v{{ version }}{% endif %}
9+
</h1>
810

911

1012
<details>

0 commit comments

Comments
 (0)