Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kubernetes-deploy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
kubernetes-deploy
Commits
f83ddd9a
Commit
f83ddd9a
authored
Mar 23, 2017
by
Gerry Gunzenhauser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make port / ssl configurable
parent
105b5c0f
Pipeline
#2221
passed with stage
in 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
deploy
deploy
+14
-6
No files found.
deploy
View file @
f83ddd9a
...
...
@@ -11,6 +11,14 @@ export DEPLOY_ROOT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source
"
$DEPLOY_ROOT_DIR
/src/common.bash"
if
[
"
${
INGRESS_ENABLE_SSL
:-
true
}
"
=
"true"
]
;
then
export
INGRESS_SSL_ANNOTATION
=
'kubernetes.io/tls-acme: "true"'
else
export
INGRESS_SSL_ANNOTATION
=
''
fi
export
CONTAINER_HTTP_PORT
=
"
${
CONTAINER_HTTP_PORT
:-
$CONTAINER_HTTP_PORT
}
"
if
[[
-z
"
$CI_ENVIRONMENT_URL
"
]]
;
then
echo
"Reading CI_ENVIRONMENT_URL from .gitlab-ci.yml..."
CI_ENVIRONMENT_URL
=
"
$(
ruby
-ryaml
-e
'puts YAML.load_file(".gitlab-ci.yml")[ENV["CI_BUILD_NAME"]]["environment"]["url"]'
)
"
...
...
@@ -61,17 +69,17 @@ spec:
value: "
$CI_BUILD_ID
"
ports:
- name: web
containerPort:
5000
containerPort:
$CONTAINER_HTTP_PORT
livenessProbe:
httpGet:
path: /
port:
5000
port:
$CONTAINER_HTTP_PORT
initialDelaySeconds: 15
timeoutSeconds: 15
readinessProbe:
httpGet:
path: /
port:
5000
port:
$CONTAINER_HTTP_PORT
initialDelaySeconds: 5
timeoutSeconds: 3
---
...
...
@@ -87,7 +95,7 @@ metadata:
spec:
ports:
- name: web
port:
5000
port:
$CONTAINER_HTTP_PORT
targetPort: web
selector:
name:
$CI_ENVIRONMENT_SLUG
...
...
@@ -102,8 +110,8 @@ metadata:
pipeline_id: "
$CI_PIPELINE_ID
"
build_id: "
$CI_BUILD_ID
"
annotations:
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: "nginx"
$INGRESS_SSL_ANNOTATION
spec:
tls:
- hosts:
...
...
@@ -116,7 +124,7 @@ spec:
- path: /
backend:
serviceName:
$CI_ENVIRONMENT_SLUG
servicePort:
5000
servicePort:
$CONTAINER_HTTP_PORT
EOF
echo
"Waiting for deployment..."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment