-
Notifications
You must be signed in to change notification settings - Fork 24
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
Configure Bundle CA Cert if provided #144
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
docs/user-guide/advanced-configuration/deploying-a-specific-version.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
## Deploying a specific version of EDA | ||
|
||
There are a few variables that are customizable for eda the image management. | ||
|
||
| Name | Description | Default | | ||
| ---------------------- | ------------------------- | -------------------------------------- | | ||
| image | Path of the image to pull | quay.io/ansible/eda-server | | ||
| image_version | Image version to pull | latest | | ||
| image_web | Path of the image to pull | quay.io/ansible/eda-ui | | ||
| image_web_version | Image version to pull | latest | | ||
| image_pull_policy | The pull policy to adopt | IfNotPresent | | ||
| image_pull_secrets | The pull secrets to use | None | | ||
| redis_image | Path of the image to pull | redis | | ||
| redis_image_version | Image version to pull | latest | | ||
| postgres_image | Path of the image to pull | postgres | | ||
| postgres_image_version | Image version to pull | latest | | ||
|
||
Example of customization could be: | ||
|
||
```yaml | ||
--- | ||
spec: | ||
... | ||
image: myorg/my-custom-eda | ||
image_version: latest | ||
image_web: myorg/my-custom-eda | ||
image_web_version: latest | ||
image_pull_policy: Always | ||
image_pull_secrets: | ||
- pull_secret_name | ||
``` | ||
|
||
> **Note**: The `image` and `image_version` style variables are intended for local mirroring scenarios. Please note that using a version of EDA other than the one bundled with the `eda-server-operator` is **not** supported even though it will likely work and can be useful for pinning a version. For the default values, check the [main.yml](https://github.com/ansible/eda-server-operator/blob/main/roles/eda/defaults/main.yml) file. | ||
|
||
|
||
### Configuring an image pull secret | ||
|
||
1. Log in with that token, or username/password, then create a pull secret from the docker/config.json | ||
|
||
```bash | ||
docker login quay.io -u <user> -p <token> | ||
``` | ||
|
||
2. Then, create a k8s secret from your .docker/config.json file. This pull secret should be created in the same namespace you are installing the EDA Operator. | ||
|
||
```bash | ||
kubectl create secret generic redhat-operators-pull-secret \ | ||
--from-file=.dockerconfigjson=.docker/config.json \ | ||
--type=kubernetes.io/dockerconfigjson | ||
``` | ||
|
||
3. Add that image pull secret to your EDA spec | ||
|
||
```yaml | ||
--- | ||
spec: | ||
image_pull_secrets: | ||
- redhat-operators-pull-secret | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## No Log | ||
|
||
Configure no_log for tasks with no_log | ||
|
||
| Name | Description | Default | | ||
| ------ | -------------------- | ------- | | ||
| no_log | No log configuration | 'true' | | ||
|
||
Example configuration of `no_log` parameter | ||
|
||
```yaml | ||
spec: | ||
no_log: true | ||
``` |
51 changes: 51 additions & 0 deletions
51
docs/user-guide/advanced-configuration/trusting-a-custom-certificate-authority.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## Trusting a Custom Certificate Authority | ||
|
||
In cases which you need to trust a custom Certificate Authority, there are few variables you can customize for the `eda-server-operator`. | ||
|
||
Trusting a custom Certificate Authority allows the EDA to access network services configured with SSL certificates issued locally, such as cloning a project from from an internal Git server via HTTPS. If it is needed, you will likely see errors like this when doing project syncs: | ||
|
||
```bash | ||
fatal: unable to access 'https://private.repo./mine/ansible-rulebook.git': SSL certificate problem: unable to get local issuer certificate | ||
``` | ||
|
||
|
||
| Name | Description | Default | | ||
| -------------------------------- | ---------------------------------------- | --------| | ||
| bundle_cacert_secret | Certificate Authority secret name | '' | | ||
Please note the `eda-server-operator` will look for the data field `ldap-ca.crt` in the specified secret when using the `ldap_cacert_secret`, whereas the data field `bundle-ca.crt` is required for `bundle_cacert_secret` parameter. | ||
|
||
Example of customization could be: | ||
|
||
```yaml | ||
--- | ||
spec: | ||
... | ||
bundle_cacert_secret: <resourcename>-custom-certs | ||
``` | ||
|
||
Create the secret with CLI: | ||
|
||
* Certificate Authority secret | ||
|
||
``` | ||
# kubectl create secret generic <resourcename>-custom-certs \ | ||
--from-file=ldap-ca.crt=<PATH/TO/YOUR/CA/PEM/FILE> \ | ||
rooftopcellist marked this conversation as resolved.
Show resolved
Hide resolved
|
||
--from-file=bundle-ca.crt=<PATH/TO/YOUR/CA/PEM/FILE> | ||
``` | ||
|
||
|
||
Alternatively, you can also create the secret with `kustomization.yaml` file: | ||
|
||
```yaml | ||
.... | ||
|
||
secretGenerator: | ||
- name: <resourcename>-custom-certs | ||
files: | ||
- bundle-ca.crt=<path+filename> | ||
options: | ||
disableNameSuffixHash: true | ||
|
||
... | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- name: Retrieve bundle Certificate Authority Secret | ||
k8s_info: | ||
kind: Secret | ||
namespace: '{{ ansible_operator_meta.namespace }}' | ||
name: '{{ bundle_cacert_secret }}' | ||
register: bundle_cacert | ||
no_log: "{{ no_log }}" | ||
|
||
- name: Load bundle Certificate Authority Secret content | ||
set_fact: | ||
bundle_ca_crt: '{{ bundle_cacert["resources"][0]["data"]["bundle-ca.crt"] | b64decode }}' | ||
no_log: "{{ no_log }}" | ||
when: '"bundle-ca.crt" in bundle_cacert["resources"][0]["data"]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not related with the PR, but should this be better "latest" specially when we are using images that point to latest? (it means are potentially upgradable)
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.
I see, so for quay.io/ansible/eda-server, latest is latest tagged release. And main is the latest commit in the main branch.
So like you said, we should use latest in the operator defaults for that reason (more stable). I just updated the PR to reflect that in the defaults.