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
Add --registry-authfile to specify a specific auth file for the registry push (knative#3208)
* Add --registry-authfile to specify a specific auth file for the registry push
* Add option to deploy command too
* Run hack/update-codegen.sh
* Use t.TempDir() to create temporary authfile in
* Use t.Fatalf() instead of t.Errorf() with a return
* Marked some helper functions with t.Helper()
"Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)")
104
105
cmd.Flags().Bool("registry-insecure", cfg.RegistryInsecure, "Skip TLS certificate verification when communicating in HTTPS with the registry ($FUNC_REGISTRY_INSECURE)")
106
+
cmd.Flags().String("registry-authfile", "", "Path to a authentication file containing registry credentials ($FUNC_REGISTRY_AUTHFILE)")
105
107
106
108
// Function-Context Flags:
107
109
// Options whose value is available on the function with context only
@@ -293,6 +295,9 @@ type buildConfig struct {
293
295
// Build with the current timestamp as the created time for docker image.
294
296
// This is only useful for buildpacks builder.
295
297
WithTimestampbool
298
+
299
+
// RegistryAuthfile is the path to a docker-config file containing registry credentials.
300
+
RegistryAuthfilestring
296
301
}
297
302
298
303
// newBuildConfig gathers options into a single build request.
"Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)")
163
164
cmd.Flags().Bool("registry-insecure", cfg.RegistryInsecure, "Skip TLS certificate verification when communicating in HTTPS with the registry ($FUNC_REGISTRY_INSECURE)")
165
+
cmd.Flags().String("registry-authfile", "", "Path to a authentication file containing registry credentials ($FUNC_REGISTRY_AUTHFILE)")
164
166
165
167
// Function-Context Flags:
166
168
// Options whose value is available on the function with context only
--base-image string Override the base image for your function (host builder only)
61
-
--build-timestamp Use the actual time as the created time for the docker image. This is only useful for buildpacks builder.
62
-
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "host", "pack" and "s2i". ($FUNC_BUILDER) (default "pack")
63
-
--builder-image string Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)
64
-
-c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM)
65
-
-h, --help help for build
66
-
-i, --image string Full image name in the form [registry]/[namespace]/[name]:[tag] (optional). This option takes precedence over --registry ($FUNC_IMAGE)
67
-
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
68
-
--platform string Optionally specify a target platform, for example "linux/amd64" when using the s2i build strategy
69
-
-u, --push Attempt to push the function image to the configured registry after being successfully built
70
-
-r, --registry string Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)
71
-
--registry-insecure Skip TLS certificate verification when communicating in HTTPS with the registry ($FUNC_REGISTRY_INSECURE)
72
-
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
60
+
--base-image string Override the base image for your function (host builder only)
61
+
--build-timestamp Use the actual time as the created time for the docker image. This is only useful for buildpacks builder.
62
+
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "host", "pack" and "s2i". ($FUNC_BUILDER) (default "pack")
63
+
--builder-image string Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)
64
+
-c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM)
65
+
-h, --help help for build
66
+
-i, --image string Full image name in the form [registry]/[namespace]/[name]:[tag] (optional). This option takes precedence over --registry ($FUNC_IMAGE)
67
+
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
68
+
--platform string Optionally specify a target platform, for example "linux/amd64" when using the s2i build strategy
69
+
-u, --push Attempt to push the function image to the configured registry after being successfully built
70
+
-r, --registry string Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)
71
+
--registry-authfile string Path to a authentication file containing registry credentials ($FUNC_REGISTRY_AUTHFILE)
72
+
--registry-insecure Skip TLS certificate verification when communicating in HTTPS with the registry ($FUNC_REGISTRY_INSECURE)
-u, --push Push the function image to registry before deploying. ($FUNC_PUSH) (default true)
134
134
--pvc-size string When triggering a remote deployment, set a custom volume size to allocate for the build operation ($FUNC_PVC_SIZE)
135
135
-r, --registry string Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)
136
+
--registry-authfile string Path to a authentication file containing registry credentials ($FUNC_REGISTRY_AUTHFILE)
136
137
--registry-insecure Skip TLS certificate verification when communicating in HTTPS with the registry ($FUNC_REGISTRY_INSECURE)
137
138
-R, --remote Trigger a remote deployment. Default is to deploy and build from the local system ($FUNC_REMOTE)
138
139
--remote-storage-class string Specify a storage class to use for the volume on-cluster during remote builds
0 commit comments