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

AEROGEAR-1986 split up keycloak config into secret and non secret parts #26

Merged
merged 3 commits into from
Jan 31, 2018

Conversation

pb82
Copy link
Contributor

@pb82 pb82 commented Jan 25, 2018

Split up the keycloak config into secret and non secret parts where the non-secret parts are stored in a config map.

Based on this proposal: https://github.com/aerogear/proposals/blob/master/apbs/create-secret-and-configmap-during-provision.md#proposed-solution

To verify, checkout this branch and provision the apb. After everything is deployed, check that both, a config map and a secret with the name keycloak exist. The secret should only contain username and password. Delete the service instance. The config map and the secret should also be deleted.

name: keycloak
namespace: '{{ namespace }}'
labels:
name: keycloak
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@philbrookes this seems redundant. Does the mobile-cli need the name to be in a label too?

Copy link
Member

Choose a reason for hiding this comment

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

I think this can be removed.

metadata:
name: keycloak
namespace: {{ namespace }}
labels:
name: keycloak
mobile: enabled
stringData:
serviceName: keycloak
data:
type: keycloak
realm: {{namespace}}
name: keycloak
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@philbrookes this seems redundant. Does the mobile-cli need the name as a label and in metadata?

Copy link
Member

Choose a reason for hiding this comment

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

@pb82 this isn't metadata, this is the content of the secret/configmap. Though whether it is still required I'm unsure, this used to be required for the mcp-api-server to figure out what to call the service, but that may no longer be required in the mobile-cli. @maleck13 any thoughts?

Copy link
Member

@philbrookes philbrookes Jan 25, 2018

Choose a reason for hiding this comment

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

@pb82 oh my mistake, I see that it is listed in both metadata and labels now, the location of this comment threw me off!

Yes, I think just having one of these would be sufficient.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I think we can largely work from the service instances now so likely don't need the additional name

@david-martin
Copy link
Contributor

@maleck13 would appreciate your review of this based on the proposal

@psturc
Copy link
Contributor

psturc commented Jan 25, 2018

@pb82 did apb test work with this change?

@david-martin david-martin self-assigned this Jan 25, 2018
@pb82
Copy link
Contributor Author

pb82 commented Jan 25, 2018

@psturc Yes, it worked for me. Let's see what Jenkins says.

@psturc
Copy link
Contributor

psturc commented Jan 25, 2018

Well it doesn't look good. Looks like the same issue as in https://issues.jboss.org/browse/AEROGEAR-1987

Copy link
Contributor

@maleck13 maleck13 left a comment

Choose a reason for hiding this comment

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

This looks about what I would expect. However I think @philbrookes and @pb82 should sync up and test that we can get the config ok and that we can do a binding between sync and kc ok (particularly via the CLI) IF there are issues with this, we should update
https://issues.jboss.org/browse/AEROGEAR-1924 with the details

@pb82
Copy link
Contributor Author

pb82 commented Jan 25, 2018

@maleck13 @philbrookes i tried this and updated https://issues.jboss.org/browse/AEROGEAR-1924 with the results.

Copy link
Contributor

@psturc psturc left a comment

Choose a reason for hiding this comment

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

LGTM. I think the frequently occurring issue with deploying postgresql on Wendy shouldn't block this PR, since it's probably the issue with the testing cluster.

@pb82
Copy link
Contributor Author

pb82 commented Jan 30, 2018

@maleck13 @dimitraz after adding the labels to the ServiceInstances of keycloak and fh-sync-server and running mobile create integration localregistry-fh-sync-server-apb-tpl9h localregistry-keycloak-apb-2mgdc --namespace myproject i get this error:

Error: failed to create pod preset for service : PodPreset.settings.k8s.io "localregistry-fh-sync-server-apb-tpl9h-localregistry-keycloak-apb-2mgdc" is invalid: [spec.selector.matchLabels: Invalid value: "": name part must be non-empty, spec.selector.matchLabels: Invalid value: "": name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName',  or 'my.name',  or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]'), spec.volumes[0].name: Required value, spec.volumeMounts[0].name: Required value]

@maleck13
Copy link
Contributor

@pb82 pb82 merged commit c79da9b into aerogearcatalog:master Jan 31, 2018
@pb82 pb82 deleted the AEROGEAR-1986 branch January 31, 2018 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants