OC-AUTH-RECONCILE(1)

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

πŸ‘‘ oc auth reconcile β€” the RBAC glow-up page πŸ’…

ok so this is the oc auth reconcile page from the oc auth manual (that's the OpenShift CLI user manual family, bestie β€” same crew) ✨


🌸 NAME 🌸

oc auth reconcile β€” reconciles the rules for RBAC role, role binding, cluster role, and cluster role binding objects. yes, all four. she does it all. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

oc auth reconcile [OPTIONS]

that's it. that's the whole vibe check. no positional args, just flags and confidence. πŸ’œ


πŸ’– DESCRIPTION πŸ’–

okay so picture this: you've got RBAC role objects, role binding objects, cluster role objects, and cluster role binding objects, and their rules are a mess. oc auth reconcile is the friend who comes over and organises your entire closet. literally. πŸŽ€

Here's the tea, point by point, no cap:

  • Missing objects get created. If it's not there, she makes it. and for namespaced objects, the containing namespace gets created too β€” but only if required, like she's not out here making namespaces for fun. πŸ™ˆ
  • Existing roles get updated to include the permissions from the input objects. and they remove extra permissions if --remove-extra-permissions is specified. only if. she's not deleting your stuff unprompted, that would be rude.
  • Existing bindings get updated to include the subjects in the input objects. and they remove extra subjects if --remove-extra-subjects is specified. same energy. same boundaries. πŸ’…

And the main character note: this is preferred to apply for RBAC resources, because it does semantically-aware merging of rules and subjects. it gets the semantics. it's not just slapping YAML together and hoping. πŸ”₯


✨ OPTIONS ✨

  • --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, so don't come for her about the other formats, she doesn't do that. πŸ’€
  • --dry-run="none" β€” must be "none", "server", or "client". no other options, bestie, that's the list. if client strategy, only print the object that would be sent, without sending it (a little window-shopping moment πŸ›οΈ). if server strategy, submit the server-side request without persisting the resource. like a rehearsal. iconic.
  • -f, --filename=[] β€” filename, directory, or URL to files identifying the resource to reconcile. feed her the files, she'll handle it. πŸ“
  • -k, --kustomize="" β€” process the kustomization directory. this flag can't be used together with -f or -R. pick a lane, gorgeous. 🚫
  • -o, --output="" β€” output format. one of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). that's the whole menu, order off it. 😌
  • -R, --recursive=false β€” process the directory used in -f, --filename recursively. useful when you want to manage related manifests organized within the same directory. go deeper. she's not scared of a subfolder. πŸŒ€
  • --remove-extra-permissions=false β€” if true, removes extra permissions added to roles. yes, that's the whole thing. it says what it does and it does what it says. 🧹
  • --remove-extra-subjects=false β€” if true, removes extra subjects added to rolebindings. same deal, one word different, don't mix them up (iykyk). 🫢
  • --show-managed-fields=false β€” if true, keep the managedFields when printing objects in JSON or YAML format. it's giving transparency. πŸ’…
  • --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]. here's the link, she's not gatekeeping. πŸ”—

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

these aren't hers, they're from the parent command β€” she just inherited them, like a really good skincare routine. πŸ’œ

  • --as="" β€” username to impersonate for the operation. user could be a regular user or a service account in a namespace. be someone else for a second, it's fine. 🎭
  • --as-group=[] β€” group to impersonate for the operation. this flag can be repeated to specify multiple groups. stack 'em. 🧚
  • --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's the path. it's literally that. 🏠
  • --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. pick your universe. 🌌
  • --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, genuinely. she said it, not me. be careful, bestie. 😭
  • --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. no mismatches allowed, it's giving perfectionism. πŸ’…
  • -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). entire list, right there. πŸ‘‘
  • --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'll wait. ⏳
  • -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. harsh? maybe. effective? absolutely. πŸ’€

πŸ”₯ EXAMPLE πŸ”₯

ok here's the moment you've been waiting for, the actual demo:

# Reconcile RBAC resources from a file
oc auth reconcile -f my-rbac-rules.yaml

that's it. one line. she ate. 🍽️✨


πŸŽ€ SEE ALSO πŸŽ€

  • oc-auth(1) β€” the parent page, go say hi πŸ‘‹

πŸ¦‹ HISTORY πŸ¦‹

June 2016, Ported from the Kubernetes man-doc generator. vintage. retro. still slaying. πŸ’œ


lowkey reminder: this page is part of the Openshift docs, from the Openshift CLI User Manuals, and the version stamp on this one is June 2016 (both up top and down at the bottom, matching, as she should). ngl the source line and the date are the whole footer vibe β€” consider this the cute sign-off: go reconcile those RBAC rules, bestie, and remember to --dry-run first if you're feeling cautious. mwah. πŸ’‹πŸŒΈπŸ«Ά
πŸ“¦ where this page comes from