Skip to content

Commit

Permalink
skaffold: add default k8s definition
Browse files Browse the repository at this point in the history
skaffold.yaml contains some definiton
  • Loading branch information
v1v committed Oct 10, 2022
1 parent e54882c commit 4c3333d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .k8s/skaffold.py
Expand Up @@ -102,8 +102,13 @@ def main():
for line in infile:
outfile.write(line)

print("Copying dockerignore files...")
print("Copying dockerignore file...")
# avoid exposing anything unrelated to the source code.
shutil.copyfile('.k8s/.dockerignore', '.dockerignore')

print("Copying default yaml file...")
# skaffold requires a default manifest ... this is the workaround for now.
shutil.copyfile(f'{templatesLocation}/default.yaml', f'{generatedLocation}/default.yaml')

if __name__ == '__main__':
main()
22 changes: 22 additions & 0 deletions .k8s/templates/default.yaml
@@ -0,0 +1,22 @@
apiVersion: batch/v1
kind: Job
metadata:
name: "apm-agen-python-3-6-none"
labels:
repo: "apm-agent-python"
type: "unit-test"
version: "3.6"
framework: "none"
spec:
ttlSecondsAfterFinished: 0
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: "python-3-6"
image: "apm-agent-python-3.6"
command: [ "echo hi" ]
env:
- name: WEBFRAMEWORK
value: "none"

0 comments on commit 4c3333d

Please sign in to comment.