manifests.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. ---
  2. apiVersion: batch/v1
  3. kind: Job
  4. metadata:
  5. generateName: upgrade-sql-schema
  6. annotations:
  7. argocd.argoproj.io/hook: PreSync
  8. spec:
  9. template:
  10. spec:
  11. containers:
  12. - name: upgrade-sql-schema
  13. image: alpine:latest
  14. command: ["sleep", "5"]
  15. restartPolicy: Never
  16. ---
  17. apiVersion: apps/v1
  18. kind: ReplicaSet
  19. metadata:
  20. name: backend
  21. spec:
  22. replicas: 1
  23. selector:
  24. matchLabels:
  25. tier: backend
  26. template:
  27. metadata:
  28. labels:
  29. tier: backend
  30. spec:
  31. containers:
  32. - name: main
  33. image: nginx:latest
  34. ---
  35. apiVersion: v1
  36. kind: Service
  37. metadata:
  38. name: backend
  39. spec:
  40. selector:
  41. tier: backend
  42. ports:
  43. - protocol: TCP
  44. port: 8080
  45. targetPort: 8080
  46. ---
  47. apiVersion: batch/v1
  48. kind: Job
  49. metadata:
  50. name: maint-page-up
  51. annotations:
  52. argocd.argoproj.io/hook: Sync
  53. argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
  54. argocd.argoproj.io/sync-wave: "1"
  55. spec:
  56. template:
  57. spec:
  58. containers:
  59. - name: page-up
  60. image: alpine:latest
  61. command: ["sleep", "2"]
  62. restartPolicy: Never
  63. backoffLimit: 0
  64. ---
  65. apiVersion: apps/v1
  66. kind: ReplicaSet
  67. metadata:
  68. name: frontend
  69. annotations:
  70. argocd.argoproj.io/sync-wave: "2"
  71. spec:
  72. replicas: 1
  73. selector:
  74. matchLabels:
  75. tier: frontend
  76. template:
  77. metadata:
  78. labels:
  79. tier: frontend
  80. spec:
  81. containers:
  82. - name: main
  83. image: nginx:latest
  84. ---
  85. apiVersion: v1
  86. kind: Service
  87. metadata:
  88. name: frontend
  89. annotations:
  90. argocd.argoproj.io/sync-wave: "2"
  91. spec:
  92. selector:
  93. tier: frontend
  94. ports:
  95. - protocol: TCP
  96. port: 80
  97. targetPort: 80
  98. ---
  99. apiVersion: batch/v1
  100. kind: Job
  101. metadata:
  102. name: maint-page-down
  103. annotations:
  104. argocd.argoproj.io/hook: Sync
  105. argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
  106. argocd.argoproj.io/sync-wave: "3"
  107. spec:
  108. template:
  109. spec:
  110. containers:
  111. - name: page-down
  112. image: alpine:latest
  113. command: ["sleep", "2"]
  114. restartPolicy: Never