Skip to content

Commit

Permalink
Merge pull request #3026 from zendesk/grosser/true
Browse files Browse the repository at this point in the history
make prerequisite docs easier to find and use it consistently
  • Loading branch information
grosser authored Oct 30, 2018
2 parents a660ad0 + 7a025e8 commit 3b5b42f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ Via [Template filler](/plugins/kubernetes/app/models/kubernetes/template_filler.
KUBERNETES_CLUSTER_NAME, and environment variables defined via [env](/plugins/env) plugin.
- Secret puller and secret annotations (if secret puller + vault is used)

### Migrations
### Migrations / Prerequisite

Add a role with only a `Pod`, `metadata.annotations.samson/prerequisite: true`, and command to run a migrations.
Add a role with only a `Pod`, `metadata.annotations.samson/prerequisite: 'true'`, and command to run a migrations.
It will be executed before the rest is deployed.

For default it waits for 10 minutes before timeout, you can change the timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
role.pop
role.first[:kind] = "Job"
role.first[:spec][:template][:spec][:restartPolicy] = "Never"
role.first[:metadata][:annotations] = {"samson/prerequisite": 'true'}
role.first[:metadata][:annotations] = {"samson/prerequisite": "true"}
end

it "does not report valid prerequisites" do
Expand All @@ -313,7 +313,7 @@
it "does not report valid prerequisites for pod" do
assert role.first.delete(:spec)
role.first[:kind] = "Pod"
role.first[:metadata][:annotations] = {"samson/prerequisite": 'true'}
role.first[:metadata][:annotations] = {"samson/prerequisite": "true"}
role.first[:spec] = {containers: [{name: "Foo"}]}
errors.must_equal nil
end
Expand Down

0 comments on commit 3b5b42f

Please sign in to comment.