I'm trying to deploy Spinnaker to k8s cluster using Halyard that running in Docker container. Thing is, I've configured all by using hal commands, but official docs says that there is a way to do it using custom profiles.
So, I've tried to create custom profiles, putted them into .hal/${DEPLOYMENT}/profiles, but when I use hal deploy apply --deployment ... - it's only copying my profiles without applying them.
This is the first problem.
Secondly, I've tried to configure all in those profiles, and run hal deploy apply --deployment ... expecting that Halyard will see that those files already exist, and he can use them, but it always fails saying me that Persistant storage type is not configured!.
I do not understand how can I prepare only custom files, and where to put them, so I can only use
hal deploy apply, and poof! Everything that was configured has been deployed!
Can you describe maybe where to put those files, and how to run deploy, using them? Or maybe I'm doing something wrong?
This one, for example, I've putted into .hal/${DEPLOYMENT}/profiles/gate-local.yml:
security:
basic:
enabled: true
apiSecurity:
overrideBaseUrl: https://<domain-api>
uiSecurity:
overrideBaseUrl: https://<domain-ui>
authn:
oauth2:
enabled: true
client:
clientId: XXXXXXXXXXXXXXXX
clientSecret: XXXXXXXXXXXXXXXX
accessTokenUri: https://XXXXXXXXXXXXXXXX/token
userAuthorizationUri: https://XXXXXXXXXXXXXXXX/auth
scope: openid,email,profile,groups
resource:
userInfoUri: https://XXXXXXXXXXXXXXXX/userinfo
userInfoMapping:
email: email
firstName: given_name
lastName: family_name
username: preferred_username
And here is an example of my front50-local.yml that always fails:
persistentStorage:
persistentStoreType: s3
s3:
bucket: XXXXXXXXXXXXXX
rootFolder: front50
pathStyleAccess: true
endpoint: https://XXXXXXXXXXXXXX
accessKeyId: XXXXXXXXXXXXXX
secretAccessKey: XXXXXXXXXXXXXX
enabled: true
And etc. It's working if I use Hal commands to configure, but again, I want to:
- Start container with Halyard
- Give him prepeared configs
hal deploy apply
- boom. Welcome to Spinnaker. Any ideas?
Now, I found kinda solution for my issue. I do not use
front50-local.ymlfor my configuration, it's clearly working with configuration in mainconfigfile. But, met the problem withrolesthrough OpenId. Found a way to override it withgate-local.yml, It can be useful for someone:I've passed this part in main
config:And this part in
gate-local.yml:Note, that mapping can be different from described above. Finally, this configuration passed successfully, and now I can see my roles passed from Keycloak at
https://domain-api.example/auth/userAbout provider. Part in main
config:And the rest of settings are in
clouddriver-local.yml:Although, I do use Spinnaker-operator for deployment in k8s. It's a little easier to deploy with it, not facing
halcommands itself. Seems like a solution for my question! Hope it will help someone!UPDATE:
Now, when we have provided
roles, we can use them to setup RBAC system for our applications, etc.:authzin mainconfig, insecuritysection afterauthnabove like this:2)Next setup must be configured in
fiat-local.yml.Now, if you login with user that is member of
group1, it will be allowed to see available applications, create and manage them. If it will be user without membership in this group - It won't access anything, and won't be able to create applications!