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

ci(keppel): seperate user and keppel domain #414

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scanner/keppel/chart/keppel-scanner/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ spec:
value: {{ .Values.scanner.keppel.domain }}
- name: KEPPEL_PROJECT
value: {{ .Values.scanner.keppel.project }}
- name: KEPPEL_USER_DOMAIN
value: {{ .Values.scanner.keppel.user_domain }}
- name: HEUREKA_API_TOKEN
valueFrom:
secretKeyRef:
Expand Down
2 changes: 2 additions & 0 deletions scanner/keppel/chart/keppel-scanner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Default values for keppel-scanner.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

scanner:
api_token: ""
heureka_url: ""
Expand All @@ -14,6 +15,7 @@ scanner:
fqdn: ""
domain: ""
project: ""
user_domain: ""
identity_endpoint: ""


Expand Down
1 change: 1 addition & 0 deletions scanner/keppel/scanner/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "fmt"
type Config struct {
KeppelFQDN string `envconfig:"KEPPEL_FQDN" required:"true" json:"-"`
KeppelUsername string `envconfig:"KEPPEL_USERNAME" required:"true" json:"-"`
KeppelUserDomain string `envconfig:"KEPPEL_USER_DOMAIN" required:"true" json:"-"`
KeppelPassword string `envconfig:"KEPPEL_PASSWORD" required:"true" json:"-"`
Domain string `envconfig:"KEPPEL_DOMAIN" required:"true" json:"-"`
Project string `envconfig:"KEPPEL_PROJECT" required:"true" json:"-"`
Expand Down
4 changes: 3 additions & 1 deletion scanner/keppel/scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type Scanner struct {
KeppelBaseUrl string
IdentityEndpoint string
Username string
UserDomain string
Password string
AuthToken string
Domain string
Expand All @@ -49,6 +50,7 @@ func NewScanner(cfg Config) *Scanner {
Username: cfg.KeppelUsername,
Password: cfg.KeppelPassword,
Domain: cfg.Domain,
UserDomain: cfg.KeppelUserDomain,
Project: cfg.Project,
IdentityEndpoint: cfg.IdentityEndpoint,
}
Expand Down Expand Up @@ -84,7 +86,7 @@ func (s *Scanner) newAuthenticatedProviderClient() (*gophercloud.ProviderClient,
IdentityEndpoint: s.IdentityEndpoint,
Username: s.Username,
Password: s.Password,
DomainName: s.Domain,
DomainName: s.UserDomain,
AllowReauth: true,
Scope: tokens.Scope{
ProjectName: s.Project,
Expand Down
Loading