Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
Proxy
Commits
08befdac
Commit
08befdac
authored
5 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
Next try to use correct hostname for redis
parent
64d5fe47
No related branches found
Branches containing commit
No related tags found
1 merge request
!12
Resolve "Include Redis into deployment"
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+1
-3
1 addition, 3 deletions
.gitlab-ci.yml
chart/templates/deployment.yaml
+6
-0
6 additions, 0 deletions
chart/templates/deployment.yaml
chart/values.yaml
+0
-1
0 additions, 1 deletion
chart/values.yaml
service-configs/start.sh
+3
-0
3 additions, 0 deletions
service-configs/start.sh
with
10 additions
and
4 deletions
.gitlab-ci.yml
+
1
−
3
View file @
08befdac
...
...
@@ -36,8 +36,6 @@ prepare_secrets:
image
:
alpine:latest
script
:
-
cp $ENV_FILE .env
# Also provide env file
-
export RHOST=$CI_JOB_STAGE-$CI_ENVIRONMENT_NAME-$CI_COMMIT_SHA
-
sed -i "s/REDIS_HOST=/REDIS_HOST=$HELM_RELEASE_NAME/g" .env
artifacts
:
paths
:
-
.env
...
...
@@ -86,7 +84,7 @@ review:
services
:
-
redis:latest
variables
:
HELM_UPGRADE_EXTRA_ARGS
:
--set
redisHost="$CI_JOB_STAGE-$CI_ENVIRONMENT_NAME-$CI_COMMIT_SHA" --set
service.externalPort=80 --set service.internalPort=80 --set service.commonName= --set ingress.tls.enabled=false --set ingress.annotations.kubernetes\.io/tls-acme="false" --set ingress.annotations.nginx\.ingress\.kubernetes\.io/ssl-redirect="false"
HELM_UPGRADE_EXTRA_ARGS
:
--set service.externalPort=80 --set service.internalPort=80 --set service.commonName= --set ingress.tls.enabled=false --set ingress.annotations.kubernetes\.io/tls-acme="false" --set ingress.annotations.nginx\.ingress\.kubernetes\.io/ssl-redirect="false"
ROLLOUT_RESOURCE_TYPE
:
deployment
production
:
...
...
This diff is collapsed.
Click to expand it.
chart/templates/deployment.yaml
+
6
−
0
View file @
08befdac
...
...
@@ -48,6 +48,12 @@ spec:
value
:
{{
.Values.gitlab.envName
}}
-
name
:
GITLAB_ENVIRONMENT_URL
value
:
{{
.Values.gitlab.envURL
}}
-
name
:
POD_NAMESPACE
valueFrom
:
fieldRef
:
fieldPath
:
metadata.namespace
-
name
:
REDIS_SERVICE_NAME
value
:
{{
template "fullname" .
}}
-redis
ports
:
-
name
:
"
{{
.Values.service.name
}}"
containerPort
:
{{
.Values.service.internalPort
}}
...
...
This diff is collapsed.
Click to expand it.
chart/values.yaml
+
0
−
1
View file @
08befdac
...
...
@@ -2,7 +2,6 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount
:
1
commitSha
:
123456
image
:
repository
:
gitlab.example.com/group/project
tag
:
stable
...
...
This diff is collapsed.
Click to expand it.
service-configs/start.sh
+
3
−
0
View file @
08befdac
#!/bin/bash
# Set the redis hostname
sed
-i
"s/REDIS_HOST=/REDIS_HOST=
${
REDIS_SERVICE_NAME
}
.
${
POD_NAMESPACE
}
/g"
.env
/etc/init.d/php7.3-fpm start
/etc/init.d/nginx start
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment