Skip to content

Commit 4b97a39

Browse files
committed
fix use sa key in zone repo
1 parent 3a0fd19 commit 4b97a39

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GOLANGCI_VERSION = 1.61.0
1+
GOLANGCI_VERSION = 1.62.0
22
HELM_DOCS_VERSION = 1.14.2
33
LICENCES_IGNORE_LIST = $(shell cat licenses/licenses-ignore-list.txt)
44

deploy/stackit/templates/deployment.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ spec:
6363
mountPath: {{ .Values.stackitSaAuthentication.mountPath }}
6464
readOnly: true
6565
{{- end }}
66+
{{- if .Values.additionalVolumeMounts }}
67+
{{ toYaml .Values.additionalVolumeMounts | indent 10 }}
68+
{{- end }}
6669
resources:
6770
{{ toYaml .Values.resources | indent 12 }}
6871
volumes:
@@ -74,6 +77,9 @@ spec:
7477
secret:
7578
secretName: {{ .Values.stackitSaAuthentication.secretName }}
7679
{{- end }}
80+
{{- if .Values.additionalVolumes }}
81+
{{ toYaml .Values.additionalVolumes | indent 8 }}
82+
{{- end }}
7783
{{- with .Values.podSecurityContext }}
7884
securityContext:
7985
{{ toYaml . | indent 8 }}

deploy/stackit/values.yaml

+16-5
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ service:
5252
port: 443
5353

5454
# -- Kubernetes resources for the webhook. Usually limits.cpu=100m, limits.memory=128Mi, requests.cpu=100m, requests.memory=128Mi is enough for the webhook.
55-
resources: { }
55+
resources:
56+
{}
5657
# We usually recommend not to specify default resources and to leave this as a conscious
5758
# choice for the user. This also increases chances charts run on environments with little
5859
# resources, such as Minikube. If you do want to specify resources, uncomment the following
@@ -65,19 +66,29 @@ resources: { }
6566
# memory: 128Mi
6667

6768
# -- Node selector for the webhook.
68-
nodeSelector: { }
69+
nodeSelector: {}
6970

7071
# -- Tolerations for the webhook.
71-
tolerations: [ ]
72+
tolerations: []
7273

73-
affinity: { }
74+
affinity: {}
7475

7576
securityContext:
7677
allowPrivilegeEscalation: false
7778
capabilities:
78-
drop: [ "ALL" ]
79+
drop: ["ALL"]
7980

8081
podSecurityContext:
8182
runAsGroup: 1000
8283
runAsUser: 1000
8384
runAsNonRoot: true
85+
86+
additionalVolumes: []
87+
# - name: extra-config
88+
# configMap:
89+
# name: extra-config-map
90+
91+
additionalVolumeMounts: []
92+
# - name: extra-config
93+
# mountPath: /etc/extra-config
94+
# readOnly: true

internal/repository/zone_repository.go

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"strings"
77

8-
stackitconfig "github.com/stackitcloud/stackit-sdk-go/core/config"
98
stackitdnsclient "github.com/stackitcloud/stackit-sdk-go/services/dns"
109
)
1110

@@ -31,13 +30,7 @@ type zoneRepositoryFactory struct{}
3130
func (z zoneRepositoryFactory) NewZoneRepository(
3231
config Config,
3332
) (ZoneRepository, error) {
34-
httpClient := *config.HttpClient
35-
36-
apiClient, err := newStackitDnsClient(
37-
stackitconfig.WithToken(config.AuthToken),
38-
stackitconfig.WithHTTPClient(&httpClient),
39-
stackitconfig.WithEndpoint(config.ApiBasePath),
40-
)
33+
apiClient, err := chooseNewStackitDnsClient(config)
4134
if err != nil {
4235
return nil, err
4336
}

0 commit comments

Comments
 (0)