Skip to content

Commit f05cbbf

Browse files
authored
Fix docs and error message about pullSecretPath (#4381)
* Fix docs and error message about pullSecretPath
1 parent 8f14d11 commit f05cbbf

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/content/en/docs/pipeline-stages/builders/docker.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ These credentials are configured in the `cluster` section with the following opt
6868
{{< schema root="ClusterDetails" >}}
6969

7070
To set up the credentials for Kaniko refer to the [kaniko docs](https://github.com/GoogleContainerTools/kaniko#kubernetes-secret) (**Note**: Rename the downloaded JSON key to *kaniko-secret* without appending *.json*).
71-
Alternatively, the path to a credentials file can be set with the `pullSecret` option:
71+
Alternatively, the path to a credentials file can be set with the `pullSecretPath` option:
7272
```yaml
7373
build:
7474
cluster:
7575
pullSecretName: pull-secret-in-kubernetes
7676
# OR
77-
pullSecret: path-to-service-account-key-file
77+
pullSecretPath: path-to-service-account-key-file
7878
```
7979
Similarly, when pushing to a docker registry:
8080
```yaml

pkg/skaffold/build/cluster/secret.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (b *Builder) setupPullSecret(out io.Writer) (func(), error) {
5656
}
5757
if b.PullSecretPath == "" {
5858
// TODO: Remove the warning when pod health check can display pod failure errors.
59-
logrus.Warnf("Setting secret keyfile path to %s. If this is incorrect, please specify using config key `pullSecret`.\nSee https://skaffold.dev/docs/references/yaml/#build-cluster-pullSecret", defaultKanikoSecretPath)
59+
logrus.Warnf("Assuming the secret %s is mounted inside Kaniko pod with the filename %s. If your secret is mounted at different path, please specify using config key `pullSecretPath`.\nSee https://skaffold.dev/docs/references/yaml/#build-cluster-pullSecretPath", b.PullSecretName, defaultKanikoSecretPath)
6060
b.PullSecretPath = defaultKanikoSecretPath
6161
return func() {}, nil
6262
}

pkg/skaffold/schema/defaults/defaults.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func setDefaultClusterPullSecret(cluster *latest.ClusterDetails) error {
265265
if cluster.PullSecretPath != "" {
266266
absPath, err := homedir.Expand(cluster.PullSecretPath)
267267
if err != nil {
268-
return fmt.Errorf("unable to expand pullSecret %s", cluster.PullSecretPath)
268+
return fmt.Errorf("unable to expand pullSecretPath %s", cluster.PullSecretPath)
269269
}
270270
cluster.PullSecretPath = absPath
271271
random := ""

0 commit comments

Comments
 (0)