Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
presentation-gitlab-k8s
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Arthur Lutz
presentation-gitlab-k8s
Commits
aa0af07fd7a2
Commit
aa0af07fd7a2
authored
6 years ago
by
Alexander Trost
Browse files
Options
Downloads
Patches
Plain Diff
List ingress too
parent
38e37d651ef6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+3
-3
3 additions, 3 deletions
.gitlab-ci.yml
manifests/deployment.yaml
+4
-1
4 additions, 1 deletion
manifests/deployment.yaml
with
7 additions
and
4 deletions
.gitlab-ci.yml
+
3
−
3
View file @
aa0af07f
...
...
@@ -86,6 +86,6 @@
-
cd manifests/
-
sed -i "s/__CI_ENVIRONMENT_SLUG__/${CI_ENVIRONMENT_SLUG}/" deployment.yaml ingress.yaml service.yaml
-
sed -i "s/__VERSION__/${CI_COMMIT_REF_NAME}/" deployment.yaml ingress.yaml service.yaml
-
if [[ $(kubectl apply -f deployment.yaml) == *"unchanged"* ]]; then kubectl patch deployment ${CI_ENVIRONMENT_SLUG} -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"ci-last-updated\":\"$(date +'%s')\"}}}}}"; fi
-
if [[
"
$(kubectl apply -f deployment.yaml)
"
== *"unchanged"* ]]; then kubectl patch deployment ${CI_ENVIRONMENT_SLUG} -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"ci-last-updated\":\"$(date +'%s')\"}}}}}"; fi
-
kubectl apply -f service.yaml ||
true
-
kubectl apply -f ingress.yaml
...
...
@@ -90,6 +90,6 @@
-
kubectl apply -f service.yaml ||
true
-
kubectl apply -f ingress.yaml
-
kubectl get all -l app=${CI_ENVIRONMENT_SLUG}
-
kubectl get all
,ing
-l app=${CI_ENVIRONMENT_SLUG}
stop_review
:
image
:
lachlanevenson/k8s-kubectl:latest
...
...
@@ -125,4 +125,4 @@
-
kubectl apply -f deployment.yaml
-
kubectl apply -f service.yaml ||
true
-
kubectl apply -f ingress.yaml
-
kubectl get all -l app=${CI_ENVIRONMENT_SLUG}
-
kubectl get all
,ing
-l app=${CI_ENVIRONMENT_SLUG}
This diff is collapsed.
Click to expand it.
manifests/deployment.yaml
+
4
−
1
View file @
aa0af07f
...
...
@@ -6,7 +6,10 @@
app
:
__CI_ENVIRONMENT_SLUG__
track
:
stable
spec
:
replicas
:
4
replicas
:
2
selector
:
matchLabels
:
app
:
__CI_ENVIRONMENT_SLUG__
template
:
metadata
:
labels
:
...
...
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