OC-SET-BUILD-SECRET(1)
π 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 togolangandjsonpathoutput 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-for-R. > β οΈ like genuinely cannot, don't try it, they do not coexist. π--local=falseβ if true,build-secretwill 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,--filenamerecursively. 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 exportingKUBECTL_KUBERC=falsefeature gate or turning off the featureKUBERC=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
- nixpkgs unstable: openshift 4.22.0-202605222050
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms