Secret create - add ignore option to allow noop

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
This commit is contained in:
Ygal Blum
2025-06-18 16:28:48 -04:00
parent 1f1618fcb0
commit bfc327a08e
16 changed files with 138 additions and 36 deletions

View File

@ -27,6 +27,7 @@ func CreateSecret(w http.ResponseWriter, r *http.Request) {
DriverOpts map[string]string `schema:"driveropts"`
Labels map[string]string `schema:"labels"`
Replace bool `schema:"replace"`
Ignore bool `schema:"ignore"`
}{
// override any golang type defaults
}
@ -40,6 +41,7 @@ func CreateSecret(w http.ResponseWriter, r *http.Request) {
opts.DriverOpts = query.DriverOpts
opts.Labels = query.Labels
opts.Replace = query.Replace
opts.Ignore = query.Ignore
ic := abi.ContainerEngine{Libpod: runtime}
report, err := ic.SecretCreate(r.Context(), query.Name, r.Body, opts)