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
Conversation
There was a problem hiding this 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 | | |||
There was a problem hiding this comment.
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
docs/deployment.md
Outdated
| @@ -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. | |||
There was a problem hiding this comment.
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
etc/example-config.yaml
Outdated
| @@ -33,6 +33,8 @@ openshift: | |||
| bearer_token_file: "" | |||
| image_pull_policy: IfNotPresent | |||
| sandbox_role: "edit" | |||
| keep_namespace: false | |||
| keep_namespace_on_error: false | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
pkg/apb/svc_acct.go
Outdated
| @@ -279,6 +287,19 @@ func (s *ServiceAccountManager) DestroyApbSandbox(executionContext ExecutionCont | |||
| return nil | |||
| } | |||
|
|
|||
| func shouldDeleteNamspace(clusterConfig ClusterConfig, pod *apicorev1.Pod, getPodErr error) bool { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TYPO: shouldDeleteNamspace -> shouldDeleteNamespace
|
This needs to wait for the #464 to merge and then this implements that PR.
|
4b2fe9b
to
34e8e69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, ACK
…hift#474) * adding ablity to specify keeping namespace alive * updating based on review comments
Describe what this PR does and why we need it:
Keep namespace alive based on new configuration values
Changes proposed in this pull request
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>