Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1497766 - Adding ablity to specify keeping namespace alive #474

Merged
merged 2 commits into from Oct 13, 2017

Conversation

shawn-hurley
Copy link
Contributor

Describe what this PR does and why we need it:
Keep namespace alive based on new configuration values
Changes proposed in this pull request

  • Adds new Config options
  • will keep namespace if needed

Does this PR depend on another PR (Use this to track when PRs should be merged)
depends-on
#464
CATASB PR: fusor/catasb#155
Which issue this PR fixes (This will close that issue when PR gets merged)
fixes <issue_number>

@shawn-hurley shawn-hurley changed the title adding ablity to specify keeping namespace alive Bug 1497766 - Adding ablity to specify keeping namespace alive Oct 4, 2017
Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos and minor question about default value for config.

docs/config.md Outdated
@@ -159,6 +159,8 @@ registry:
| bearer_token_file | Location of bearer token to be used | N |
| image_pull_policy | When to pull the image | Y |
| sandbox_role | Role to give to apb sandbox environment | Y |
| keep_namespace | Always keep namespace after apb execution | N |
| Keep_namespace_on_error | Keep namespace after apb execution has an error | N |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entry should be lowercase Keep_namespace_on_error -> keep_namespace_on_error

@@ -18,6 +18,8 @@ REGISTRY_URL | docker.io | Registry URL
DEV_BROKER | true | Include Broker Development Endpoint (true/false)
AUTO_ESCALATE | true | Auto escalate the users permissions when running an APB
BROKER_CA_CERT | "" | Tells the broker that the ca that has signed the SSL Cert and Key
KEEP_NAMESPACE | false | Always keep the APB namespace after execution.
KEEP_NAMESPACE_ON_ERROR | true | Keeps the APB namespace after a error during execution.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TYPO: a error -> an error

@@ -33,6 +33,8 @@ openshift:
bearer_token_file: ""
image_pull_policy: IfNotPresent
sandbox_role: "edit"
keep_namespace: false
keep_namespace_on_error: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the deployment above shows keep_namespace_on_error = true, but in the example we default it to false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default above needs to be false

@@ -279,6 +287,19 @@ func (s *ServiceAccountManager) DestroyApbSandbox(executionContext ExecutionCont
return nil
}

func shouldDeleteNamspace(clusterConfig ClusterConfig, pod *apicorev1.Pod, getPodErr error) bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TYPO: shouldDeleteNamspace -> shouldDeleteNamespace

@shawn-hurley shawn-hurley added the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Oct 4, 2017
@shawn-hurley
Copy link
Contributor Author

This needs to wait for the #464 to merge and then this implements that PR.

  • if changes are made to 464 changes will need to be made to this PR.

@shawn-hurley shawn-hurley removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Oct 5, 2017
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 12, 2017
Copy link
Contributor

@eriknelson eriknelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, ACK

@eriknelson eriknelson merged commit 0917936 into openshift:master Oct 13, 2017
jianzhangbjz pushed a commit to jianzhangbjz/ansible-service-broker that referenced this pull request May 17, 2018
…hift#474)

* adding ablity to specify keeping namespace alive

* updating based on review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants