From 1c107453e0fa3d36b949034bb125800d7b493802 Mon Sep 17 00:00:00 2001 From: Paul Maidment Date: Sun, 18 Feb 2024 13:04:56 +0200 Subject: [PATCH] MGMT-16691: Document OSImageAdditionalParamsRef functionality for infrastructure operator This is documentation to describe the feature that allows a user to define headers and query params to be used by the image service every time a request to pull an OS image is made. --- docs/operator.md | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/docs/operator.md b/docs/operator.md index 86118b9c944..4daffff0a21 100644 --- a/docs/operator.md +++ b/docs/operator.md @@ -242,6 +242,75 @@ Add the annotation to the AgentServiceConfig: oc annotate --overwrite AgentServiceConfig agent unsupported.agent-install.openshift.io/assisted-image-service-skip-verify-tls=true ``` +### Custom headers and query parameters for Assisted Image Service OS Image Download + +It is possible to specify custom headers and query parameters to be used when downloading OS images. + +A config map to contain the headers and query parameters to be used should be created. +The easiest appreoach is to create up to two files as required, one file to hold any headers, the other to hold query parameters. +Use these files to create a secret. The files may be discarded after creation of the secret. + +``` +       cat <> headers +        { +        "header1": "header1value", +        "header2": "header2value", +        } +       EOF +       cat <> query_params +        { +        "param1": "value1", +        "param2": "value2", +        } +       EOF +        +       oc create secret generic -n multicluster-engine os-images-http-auth --from-file=./query_params --from-file=./headers +``` + +Then in the `AgentServiceConfig`, this Secret should be referenced, in `OSImageCACertRef` +The CA bundle defined in the ConfigMap referred to by `OSImageCACertRef` will then be used when pulling osImages. + +``` +cat <