Skip to content

Commit

Permalink
ci(keppel): seperate user and keppel domain (#414)
Browse files Browse the repository at this point in the history
* ci: seperated the user domain from the keppel domain

* ci: fixed typo
  • Loading branch information
drochow authored and dustindemmerle committed Dec 2, 2024
1 parent d42c898 commit b183163
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
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

0 comments on commit b183163

Please sign in to comment.