flux2
flux2 copied to clipboard
Does the flag -cert-secret-ref is still functional while creating a ImageRepository source. ?
Describe the bug
Does the flag -cert-secret-ref
is still functional while creating a ImageRepository source. I was working with Flux to create a ImageRepository as source which is an private registry.
Steps to reproduce
I have followed docs and created tls secret with cert file and key file. Documentation contains to create ImageRepo source as follows :
flux create image repository app-repo \
--cert-secret-ref client-cert \
--image registry.example.com/private/app --interval 5m
I have replicated the same and this is the reponse I got.
Also the help command also does not show this particular flag
flux create image repository --help | grep --cert-secret-ref
grep: unrecognized option '--cert-secret-ref'
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.
Documentation link : https://fluxcd.io/flux/cmd/flux_create_image_repository/
Expected behavior
The documentation should show the flags that are actually functional and --cert-secret-ref
flag needs to be replaced by --cert-ref
.
Screenshots and recordings
No response
OS / Distro
N/A
Flux version
N/A
Flux check
N/A
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Thanks for flagging down this issue! It looks like the doc is wrong in the examples. I went back and looked at the commit that created this flag, and it has always been --cert-ref
but it is an error in the examples.
It looks like your call to grep actually intercepted the flag you tried to grep for, anyways the error appears to have been a mistake that was committed when this feature was added here:
https://github.com/fluxcd/flux2/blame/b3b224b0ca65a269fa71c9c32c9fd17782ef88a0/cmd/flux/create_image_repository.go
The flag hasn't changed, it has always been --cert-ref
– it's only wrong in the examples. So this should be just a docs change. Do you want to submit a PR to close this @karnatisrinivas ?
Yes I am trying to fix the docs issue, and make a PR