-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hook file for federation configuration
Add hook file for federation configuration
- Loading branch information
Milana Levy
committed
Dec 15, 2024
1 parent
93de89d
commit 47a647c
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
hooks/playbooks/OpenStackControlPlane-federationPatch.yaml
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,49 @@ | ||
--- | ||
- name: Create kustomization to update Keystone to use Federation | ||
hosts: "{{ cifmw_target_hook_host | default('localhost') }}" | ||
tasks: | ||
- name: Create file to customize keystone for Federation resources deployed in the control plane | ||
ansible.builtin.copy: | ||
dest: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane/keystone_federation.yaml" | ||
content: |- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- namespace: {{ namespace }} | ||
patches: | ||
- target: | ||
kind: OpenStackControlPlane | ||
name: .* | ||
patch: |- | ||
- op: add | ||
path: /spec/tls/caBundleSecretName | ||
value: keycloakca | ||
- op: add | ||
path: /spec/keystone/template/oidcFederation | ||
value: | ||
keystoneFederationIdentityProviderName: "{{ cifmw_keystone_OIDC_provider_name }}" | ||
oidcCacheType: "{{ cifmw_keystone_OIDC_CacheType }}" | ||
oidcClaimDelimiter: "{{ cifmw_keystone_OIDC_ClaimDelimiter }}" | ||
oidcClaimPrefix: "{{ cifmw_keystone_OIDC_ClaimPrefix }}" | ||
oidcClientID: "{{ cifmw_keystone_OIDC_ClientID }}" | ||
oidcIntrospectionEndpoint: "{{ cifmw_keystone_OIDC_IntrospectionEndpoint }}" | ||
oidcMemCacheServers: "{{ cifmw_keystone_OIDC_MemCacheServers }}" | ||
oidcPassClaimsAs: "{{ cifmw_keystone_OIDC_PassClaimsAs }}" | ||
oidcPassUserInfoAs: "{{ cifmw_keystone_OIDC_PassUserInfoAs }}" | ||
oidcProviderMetadataURL: "{{ cifmw_keystone_OIDC_ProviderMetadataURL }}" | ||
oidcResponseType: "{{ cifmw_keystone_OIDC_ResponseType }}" | ||
oidcScope: "{{ cifmw_keystone_OIDC_Scope }}" | ||
remoteIDAttribute: "{{ cifmw_keystone_OIDC_remoteIDAttribute }}" | ||
- name: Add Keycloak CA secret | ||
kubernetes.core.k8s: | ||
state: present | ||
definition: | ||
apiVersion: v1 | ||
kind: Secret | ||
type: Opaque | ||
metadata: | ||
name: keycloakca | ||
namespace: "openstack" | ||
data: | ||
KeyCloakCA: "{{ keycloakCaCert }}" |