Skip to content

Commit

Permalink
added oidc data variables in deploy profisee script to align with set…
Browse files Browse the repository at this point in the history
…tings.yaml file
  • Loading branch information
Naveen Angali authored and Naveen Angali committed Apr 12, 2024
1 parent 6fb9a99 commit 614e084
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Azure-ARM/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ profiseeRunTime:
deployIngressRule: true
isPaaS: true
oidc:
name: "Azure Active Directory"
name: "$OIDCNAME"
authority: "$OIDCURL"
clientId: "$CLIENTID"
clientSecret: "$OIDCCLIENTSECRET"
usernameClaim: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"
userIdClaim: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
firstNameClaim: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"
lastNameClaim: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"
emailClaim: "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"
usernameClaim: "$OIDCCMUserName"
userIdClaim: "$OIDCCMUserID"
firstNameClaim: "$OIDCCMFirstName"
lastNameClaim: "$OIDCCMLastName"
emailClaim: "$OIDCCMEmailAddress"
groupsClaim: "groups"
clusterNodeCount: 1
clusterNodeCount: "$PodCount"
clusterNode:
limits:
cpu: $CPULIMITSVALUE
Expand All @@ -54,11 +54,10 @@ image:
}
}
licenseFileData: $LICENSEDATA
preInitScriptData: Cg==
postInitScriptData: Cg==
preInitScriptData: $preInitScriptData
postInitScriptData: $postInitScriptData
oidcFileData: |
{
}
$OIDCFileData
tlsCert: |
$TLSCERT
tlsKey: |
Expand Down Expand Up @@ -94,5 +93,8 @@ cloud:
clientSecret: "$PURVIEWCLIENTSECRET"
aws:
isProvider: false
ebsVolumeId: ""
google:
isProvider: false
gceVolumeName: ""

28 changes: 28 additions & 0 deletions Azure-ARM/deployprofisee.sh
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,34 @@ if [ "$WINDOWS_NODE_VERSION" = "Windows2019" ]; then
echo $"Azure File CSI Driver installation finished."
fi

#Add AzureAD Claims and Pod Count
OIDCNAME="Azure Active Directory"
OIDCCMUserName="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"
OIDCCMUserID="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
OIDCCMFirstName="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"
OIDCCMLastName="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"
OIDCCMEmailAddress="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"

PodCount=1

sed -i -e 's~$OIDCNAME~'"$OIDCNAME"'~g' Settings.yaml
sed -i -e 's~$OIDCCMUserName~'"$OIDCCMUserName"'~g' Settings.yaml
sed -i -e 's~$OIDCCMUserID~'"$OIDCCMUserID"'~g' Settings.yaml
sed -i -e 's~$OIDCCMFirstName~'"$OIDCCMFirstName"'~g' Settings.yaml
sed -i -e 's~$OIDCCMLastName~'"$OIDCCMLastName"'~g' Settings.yaml
sed -i -e 's~$OIDCCMEmailAddress~'"$OIDCCMEmailAddress"'~g' Settings.yaml

sed -i -e 's/$PodCount/'"$PodCount"'/g' Settings.yaml


#pre,post init script and oidcfiledata
preInitScriptData="Cg=="
postInitScriptData="Cg=="
OIDCFileData="{\n }"
echo $OIDCFileData
sed -i -e 's/$preInitScriptData/'"$preInitScriptData"'/g' Settings.yaml
sed -i -e 's/$postInitScriptData/'"$postInitScriptData"'/g' Settings.yaml
sed -i -e 's/$OIDCFileData/'"$OIDCFileData"'/g' Settings.yaml

#Get the vCPU and RAM so we can change the stateful set CPU and RAM limits on the fly.
echo "Let's see how many vCPUs and how much RAM we can allocate to Profisee's pod on the Windows node size you've selected."
Expand Down

0 comments on commit 614e084

Please sign in to comment.