OC-SET-BUILD-SECRET(1)

πŸ“¦
version 4.22.0 Β· 2 versions
, in nixpkgs unstable

πŸŽ€ oc set build-secret β€” like, the whole manual, bestie πŸŽ€

okay so real talk, this is oc set build-secret from the oc set family β€” it's section 1 of the OpenShift CLI manual, dated June 2016, and I'm gonna walk you through literally every single line of it because you deserve the full picture and not some half-vibes summary. periodt. πŸ’…


✨ NAME ✨

oc set build-secret β€” update a build secret on a build config. that's the whole name, that's the assignment, she's iconic and she knows it. 🫢


🌸 SYNOPSIS 🌸

oc set build-secret [OPTIONS]

short, sweet, takes [OPTIONS], no positional args in the synopsis but trust me the examples get spicy later. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

So basically: set or remove a build secret on a build config. that's it, that's the job. ✨

A build config can reference a secret to push or pull images from private registries, or to access private source repositories. so like, if your registry is private and mysterious, this is the flag for you, iykyk. πŸ‘‘

You specify which type of secret you're setting by using the --push, --pull, or --source flags. And a secret reference can be removed by using the --remove flag. no cap, that's the removal mechanism. 🧚

A label selector may be specified with the --selector flag to select the build configs on which to set or remove secrets. alternatively, all build configs in the namespace can be selected with the --all flag. so you can be surgical about it or just go full main character and do everyone at once. 🌈


⭐ OPTIONS ⭐

  • --all=false β€” if true, select all build configs in the namespace. yes bestie, ALL of them. πŸ‘‘
  • --allow-missing-template-keys=true β€” if true, ignore any errors in templates when a field or map key is missing in the template. only applies to golang and jsonpath output formats. it's lowkey forgiving like that.
  • --dry-run="none" β€” must be "none", "server", or "client". if client strategy, only print the object that would be sent, without sending it. if server strategy, submit server-side request without persisting the resource. rehearsal energy, no commitment. 🎭
  • --field-manager="kubectl-set" β€” name of the manager used to track field ownership. she's keeping receipts on who owns which field.
  • -f, --filename=[] β€” filename, directory, or URL to files to use to edit the resource.
  • -k, --kustomize="" β€” process the kustomization directory. this flag can't be used together with -f or -R. > ⚠️ like genuinely cannot, don't try it, they do not coexist. πŸ’€
  • --local=false β€” if true, build-secret will NOT contact api-server but run locally. offline mode, introvert mode, whatever you wanna call it. πŸ™ˆ
  • -o, --output="" β€” output format. one of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). whole menu, pick your fave. πŸ“
  • --pull=false β€” if true, set the pull secret on a build config.
  • --push=false β€” if true, set the push secret on a build config.
  • -R, --recursive=false β€” process the directory used in -f, --filename recursively. useful when you want to manage related manifests organized within the same directory. she goes deep. 🌸
  • --remove=false β€” if true, remove the build secret. bye bestie πŸ‘‹
  • -l, --selector="" β€” selector (label query) to filter build configs.
  • --show-managed-fields=false β€” if true, keep the managedFields when printing objects in JSON or YAML format.
  • --source=false β€” if true, set the source secret on a build config.
  • --template="" β€” template string or path to template file to use when -o=go-template, -o=go-template-file. the template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

πŸ¦‹ OPTIONS INHERITED FROM PARENT COMMANDS πŸ¦‹

these are the ones she got from her mom (oc set), and honestly? good genes. πŸ’œ

  • --as="" β€” username to impersonate for the operation. user could be a regular user or a service account in a namespace.
  • --as-group=[] β€” group to impersonate for the operation, this flag can be repeated to specify multiple groups.
  • --as-uid="" β€” UID to impersonate for the operation.
  • --as-user-extra=[] β€” user extras to impersonate for the operation, this flag can be repeated to specify multiple values for the same key.
  • --cache-dir="/homeless-shelter/.kube/cache" β€” default cache directory. yes that path is real, character for character, don't @ me. πŸ’€
  • --certificate-authority="" β€” path to a cert file for the certificate authority.
  • --client-certificate="" β€” path to a client certificate file for TLS.
  • --client-key="" β€” path to a client key file for TLS.
  • --cluster="" β€” the name of the kubeconfig cluster to use.
  • --context="" β€” the name of the kubeconfig context to use.
  • --disable-compression=false β€” if true, opt-out of response compression for all requests to the server.
  • --insecure-skip-tls-verify=false β€” if true, the server's certificate will not be checked for validity. > ⚠️ this will make your HTTPS connections insecure. like, actually insecure. i'm serious, that's not a vibe, that's a warning. 😭
  • --kubeconfig="" β€” path to the kubeconfig file to use for CLI requests.
  • --kuberc="" β€” path to the kuberc file to use for preferences. this can be disabled by exporting KUBECTL_KUBERC=false feature gate or turning off the feature KUBERC=off.
  • --match-server-version=false β€” require server version to match client version.
  • -n, --namespace="" β€” if present, the namespace scope for this CLI request.
  • --profile="none" β€” name of profile to capture. one of (none|cpu|heap|goroutine|threadcreate|block|mutex).
  • --profile-output="profile.pprof" β€” name of the file to write the profile to.
  • --request-timeout="0" β€” the length of time to wait before giving up on a single server request. non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). a value of zero means don't timeout requests. zero = infinite patience, she's built different. ⭐
  • -s, --server="" β€” the address and port of the Kubernetes API server.
  • --tls-server-name="" β€” server name to use for server certificate validation. if it is not provided, the hostname used to contact the server is used.
  • --token="" β€” bearer token for authentication to the API server.
  • --user="" β€” the name of the kubeconfig user to use.
  • --warnings-as-errors=false β€” treat warnings received from the server as errors and exit with a non-zero exit code. strict queen behavior. πŸ‘‘

πŸ”₯ EXAMPLE πŸ”₯

okay these are all verbatim, keep them exactly like this, copy-paste ready bestie:

# Clear the push secret on a build config
oc set build-secret --push --remove bc/mybuild

# Set the pull secret on a build config
oc set build-secret --pull bc/mybuild mysecret

# Set the push and pull secret on a build config
oc set build-secret --push --pull bc/mybuild mysecret

# Set the source secret on a set of build configs matching a selector
oc set build-secret --source -l app=myapp gitsecret

the way --push --pull together just works? obsessed. and that last one with -l app=myapp is the group-chat equivalent of @everyone. πŸ’…


πŸ’« SEE ALSO πŸ’«

that's it, that's the only one, she keeps her circle small. 🫢


πŸ“œ HISTORY πŸ“œ

June 2016, Ported from the Kubernetes man-doc generator. vintage. a real throwback. πŸŽ€


okay that's the whole thing, nothing skipped, nothing invented, every flag accounted for. mwah. πŸ’–

<np>that was oc set build-secret, from Openshift β€” the Openshift CLI User Manuals, June 2016 edition. go forth and set your secrets, bestie. πŸ¦‹βœ¨</np>

πŸ“¦ where this page comes from