Guest User

Untitled

a guest
May 11th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. ---
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: test-configmap-meta
  6. namespace: testing
  7. data:
  8. host: '172.30.93.94'
  9. port: '54321'
  10. ---
  11. apiVersion: v1
  12. kind: Secret
  13. metadata:
  14. name: test-secret
  15. namespace: testing
  16. type: Opaque
  17. data:
  18. user: 'YWRtaW4y'
  19. password: 'cGFzc3dvcmQy'
  20. ---
  21. apiVersion: extensions/v1beta1
  22. kind: Deployment
  23. metadata:
  24. name: test-spinnaker-deployment
  25. namespace: testing
  26. spec:
  27. replicas: 1
  28. template:
  29. metadata:
  30. labels:
  31. app: test-spinnaker-deployment
  32. annotations:
  33. moniker.spinnaker.io/application: '"test-spinnaker-deployment"'
  34. spec:
  35. containers:
  36. - image: alpine
  37. command: ["/bin/sh"]
  38. args: ["-c", "while true; do echo $(date) $HOST_NAME $TEST_PORT $SECRET_USER $SECRET_PASS; sleep 10;done"]
  39. name: test-spinnaker-container
  40. imagePullPolicy: IfNotPresent
  41. resources:
  42. requests:
  43. memory: "64Mi"
  44. cpu: "50m"
  45. limits:
  46. memory: "128Mi"
  47. cpu: "100m"
  48. env:
  49. - name: TEST_PORT
  50. valueFrom:
  51. configMapKeyRef:
  52. name: test-configmap-meta
  53. key: port
  54. - name: SECRET_USER
  55. valueFrom:
  56. secretKeyRef:
  57. name: test-secret
  58. key: user
  59. - name: SECRET_PASS
  60. valueFrom:
  61. secretKeyRef:
  62. name: test-secret
  63. key: password
  64. ---
  65. apiVersion: batch/v1
  66. kind: Job
  67. metadata:
  68. name: test-spinnaker-job
  69. namespace: testing
  70. spec:
  71. activeDeadlineSeconds: 900
  72. template:
  73. metadata:
  74. name: test-spinnaker-job
  75. spec:
  76. containers:
  77. - image: alpine
  78. command: ["/bin/sh"]
  79. args: ["-c", "echo $(date) $HOST_NAME $TEST_PORT $SECRET_USER $SECRET_PASS"]
  80. name: test-spinnaker-container
  81. imagePullPolicy: IfNotPresent
  82. resources:
  83. requests:
  84. memory: "64Mi"
  85. cpu: "50m"
  86. limits:
  87. memory: "128Mi"
  88. cpu: "100m"
  89. env:
  90. - name: TEST_PORT
  91. valueFrom:
  92. configMapKeyRef:
  93. name: test-configmap-meta
  94. key: port
  95. - name: SECRET_USER
  96. valueFrom:
  97. secretKeyRef:
  98. name: test-secret
  99. key: user
  100. - name: SECRET_PASS
  101. valueFrom:
  102. secretKeyRef:
  103. name: test-secret
  104. key: password
  105. restartPolicy: OnFailure
Add Comment
Please, Sign In to add comment