cpl 1.2.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/check_cpln_links.yml +19 -0
  3. data/.overcommit.yml +3 -0
  4. data/CHANGELOG.md +43 -1
  5. data/Gemfile.lock +9 -5
  6. data/README.md +43 -7
  7. data/cpl.gemspec +1 -0
  8. data/docs/commands.md +30 -23
  9. data/docs/dns.md +9 -0
  10. data/docs/tips.md +11 -1
  11. data/examples/controlplane.yml +22 -1
  12. data/lib/command/apply_template.rb +58 -10
  13. data/lib/command/base.rb +79 -2
  14. data/lib/command/build_image.rb +5 -1
  15. data/lib/command/cleanup_stale_apps.rb +0 -2
  16. data/lib/command/copy_image_from_upstream.rb +5 -4
  17. data/lib/command/deploy_image.rb +20 -2
  18. data/lib/command/info.rb +11 -26
  19. data/lib/command/maintenance.rb +8 -4
  20. data/lib/command/maintenance_off.rb +8 -4
  21. data/lib/command/maintenance_on.rb +8 -4
  22. data/lib/command/promote_app_from_upstream.rb +5 -25
  23. data/lib/command/run.rb +20 -22
  24. data/lib/command/run_detached.rb +38 -30
  25. data/lib/command/setup_app.rb +19 -2
  26. data/lib/core/config.rb +36 -14
  27. data/lib/core/controlplane.rb +34 -7
  28. data/lib/core/controlplane_api.rb +12 -0
  29. data/lib/core/controlplane_api_direct.rb +33 -5
  30. data/lib/core/helpers.rb +6 -0
  31. data/lib/cpl/version.rb +1 -1
  32. data/lib/cpl.rb +6 -1
  33. data/lib/generator_templates/controlplane.yml +5 -0
  34. data/lib/generator_templates/templates/gvc.yml +4 -4
  35. data/lib/generator_templates/templates/postgres.yml +1 -1
  36. data/lib/generator_templates/templates/rails.yml +1 -1
  37. data/script/check_cpln_links +45 -0
  38. data/templates/daily-task.yml +3 -2
  39. data/templates/gvc.yml +5 -5
  40. data/templates/identity.yml +2 -1
  41. data/templates/rails.yml +3 -2
  42. data/templates/secrets-policy.yml +4 -0
  43. data/templates/secrets.yml +3 -0
  44. data/templates/sidekiq.yml +3 -2
  45. metadata +21 -2
data/templates/rails.yml CHANGED
@@ -7,7 +7,7 @@ spec:
7
7
  cpu: 512m
8
8
  memory: 1Gi
9
9
  inheritEnv: true
10
- image: "/org/APP_ORG/image/APP_IMAGE"
10
+ image: {{APP_IMAGE_LINK}}
11
11
  ports:
12
12
  - number: 3000
13
13
  protocol: http
@@ -23,4 +23,5 @@ spec:
23
23
  - 0.0.0.0/0
24
24
  outboundAllowCIDR:
25
25
  - 0.0.0.0/0
26
- identityLink: /org/APP_ORG/gvc/APP_GVC/identity/APP_GVC-identity
26
+ # Identity is used for binding workload to secrets
27
+ identityLink: {{APP_IDENTITY_LINK}}
@@ -0,0 +1,4 @@
1
+ # Policy is needed to allow identities to access secrets
2
+ kind: policy
3
+ name: {{APP_SECRETS_POLICY}}
4
+ targetKind: secret
@@ -0,0 +1,3 @@
1
+ kind: secret
2
+ name: {{APP_SECRETS}}
3
+ type: dictionary
@@ -13,7 +13,7 @@ spec:
13
13
  - "-C"
14
14
  - config/sidekiq.yml
15
15
  inheritEnv: true
16
- image: "/org/APP_ORG/image/APP_IMAGE"
16
+ image: {{APP_IMAGE_LINK}}
17
17
  ports:
18
18
  - number: 7433
19
19
  protocol: http
@@ -34,4 +34,5 @@ spec:
34
34
  external:
35
35
  outboundAllowCIDR:
36
36
  - 0.0.0.0/0
37
- identityLink: /org/APP_ORG/gvc/APP_GVC/identity/APP_GVC-identity
37
+ # Identity is used for binding workload to secrets
38
+ identityLink: {{APP_IDENTITY_LINK}}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-04 00:00:00.000000000 Z
12
+ date: 2024-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: debug
@@ -39,6 +39,20 @@ dependencies:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: 2.8.1
42
+ - !ruby/object:Gem::Dependency
43
+ name: jwt
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 2.8.1
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: 2.8.1
42
56
  - !ruby/object:Gem::Dependency
43
57
  name: psych
44
58
  requirement: !ruby/object:Gem::Requirement
@@ -202,6 +216,7 @@ executables:
202
216
  extensions: []
203
217
  extra_rdoc_files: []
204
218
  files:
219
+ - ".github/workflows/check_cpln_links.yml"
205
220
  - ".github/workflows/command_docs.yml"
206
221
  - ".github/workflows/rspec.yml"
207
222
  - ".github/workflows/rubocop.yml"
@@ -223,6 +238,7 @@ files:
223
238
  - docs/assets/memcached.png
224
239
  - docs/assets/sidekiq-pre-stop-hook.png
225
240
  - docs/commands.md
241
+ - docs/dns.md
226
242
  - docs/migrating.md
227
243
  - docs/postgres.md
228
244
  - docs/redis.md
@@ -285,6 +301,7 @@ files:
285
301
  - rakelib/create_release.rake
286
302
  - script/add_command
287
303
  - script/check_command_docs
304
+ - script/check_cpln_links
288
305
  - script/rename_command
289
306
  - script/update_command_docs
290
307
  - templates/daily-task.yml
@@ -295,6 +312,8 @@ files:
295
312
  - templates/postgres.yml
296
313
  - templates/rails.yml
297
314
  - templates/redis.yml
315
+ - templates/secrets-policy.yml
316
+ - templates/secrets.yml
298
317
  - templates/sidekiq.yml
299
318
  homepage: https://github.com/shakacode/heroku-to-control-plane
300
319
  licenses: