You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Dockerfile
+5-3
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
-
ARG VERSION
1
+
FROM --platform=$BUILDPLATFORM golang:1.22 AS build
2
2
3
-
FROM golang:1.22 AS build
3
+
ARG BUILDPLATFORM
4
+
ARG TARGETARCH
5
+
ARG VERSION
4
6
5
7
COPY . /src
6
-
RUN cd /src && go build -ldflags="-X 'github.com/plumber-cd/argocd-applicationset-namespaces-generator-plugin/cmd/version.Version=$VERSION'" -o /bin/argocd-applicationset-namespaces-generator-plugin
8
+
RUN cd /src && GOOS=linux GOARCH=$TARGETARCH go build -a -ldflags="-X 'github.com/plumber-cd/argocd-applicationset-namespaces-generator-plugin/cmd/version.Version=$VERSION'" -o /bin/argocd-applicationset-namespaces-generator-plugin
Cmd.PersistentFlags().Bool("local", false, "Enable to use local kubectl context (for debugging)")
37
40
38
41
Cmd.PersistentFlags().String("service-account-tls-ca", "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt", "Path or base64 to ca.crt for cluster endpoint (if needed, ignored in --local mode)")
39
-
Cmd.PersistentFlags().String("service-account-token-path", "/var/run/secrets/kubernetes.io/serviceaccount/token", "Path to a token file (ignored in --local mode)")
42
+
Cmd.PersistentFlags().StringArray("service-account-token-paths", []string{"*=/var/run/secrets/kubernetes.io/serviceaccount/token"}, "Paths to a token file (ignored in --local mode)")
40
43
}
41
44
42
45
varCmd=&cobra.Command{
@@ -50,6 +53,22 @@ var Cmd = &cobra.Command{
50
53
returnerr
51
54
}
52
55
56
+
slog.Debug("Received list of token paths", "token-paths", config.ServiceAccountTokenPaths)
0 commit comments