Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
k8s-bootstrap
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b0fbf337
authored
2022-03-29 12:37:52 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix syntax errors, move clone script to a config map.
1 parent
12769c25
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
k8s-bootstrap.yaml
k8s-bootstrap.yaml
View file @
b0fbf33
---
apiVersion
:
v1
kind
:
ConfigMap
metadata
:
name
:
k8s-bootstrap
namespace
:
kube-system
data
:
clone-start-of-day
:
|
#!/bin/sh
set -ex
GIT_SSH_COMMAND="ssh -i /tmp/cluster-ssh-key/ssh-private-key"
---
apiVersion
:
batch/v1
kind
:
Job
metadata
:
...
...
@@ -17,36 +29,34 @@ spec:
key
:
node-role.kubernetes.io/master
volumes
:
-
name
:
k8s-bootstrap
configMap
:
name
:
k8s-bootstrap
defaultMode
:
755
-
name
:
git-storage
emptyDir
:
{}
-
name
:
cluster-ssh-key
secret
:
n
ame
:
cluster-ssh-key
secretN
ame
:
cluster-ssh-key
defaultMode
:
0600
initContainers
:
-
name
:
clone-k8s-start-of-day
image
:
bitnami/git
volumeMounts
:
-
name
:
k8s-bootstrap
mountPath
:
/tmp/k8s-bootstrap
-
name
:
cluster-ssh-key
mountPath
:
/tmp/cluster-ssh-key
-
name
:
git-storage
mountPath
:
/tmp/git-storage
command
:
|
#!/bin/sh
set -ex
GIT_SSH_COMMAND="ssh -i /tmp/cluster-ssh-key/ssh-private-key"
git clone git@gitlab.brainfood.com:brainfood/k8s-start-of-day.git /tmp/git-storage/k8s-start-of-day
command
:
[
"
/tmp/k8s-bootstrap/clone-start-of-day"
]
containers
:
-
name
:
show-status
image
:
bash
command
:
|
#!/bin/sh
set -ex
ls -al /tmp/git-storage
command
:
[
"
bash"
,
"
-ex"
,
"
ls
-l
/tmp/git-storage"
]
volumeMounts
:
-
name
:
git-storage
mountPath
:
/tmp/git-storage
---
...
...
Please
register
or
sign in
to post a comment