Skip to content

Commit

Permalink
Add hook file for federation configuration
Browse files Browse the repository at this point in the history
Add hook file for federation configuration
  • Loading branch information
Milana Levy committed Dec 10, 2024
1 parent 9c95009 commit b8f0ca3
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions hooks/playbooks/OpenStackControlPlane-federationPatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
- name: Create kustomization to use update Keystone to us 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: keycloakca
- name: add keycloakca secret
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: "keycloakca"
namespace: "openstack"
data:
KeyCloakCA: "{{ keycloakCaCert }}"
- 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 }}"

0 comments on commit b8f0ca3

Please sign in to comment.