Skip to content

Commit

Permalink
MGMT-16691: Document OSImageAdditionalParamsRef functionality for inf…
Browse files Browse the repository at this point in the history
…rastructure 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.
  • Loading branch information
paul-maidment committed Feb 18, 2024
1 parent 7691dcc commit 1c10745
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions docs/operator.md
Expand Up @@ -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 <<EOF >> headers
        {
        "header1": "header1value",
        "header2": "header2value",
        }
       EOF
       cat <<EOF >> 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 <<EOF | kubectl apply -f -
apiVersion: agent-install.openshift.io/v1beta1
kind: AgentServiceConfig
metadata:
name: agent
spec:
OSImageAdditionalParamsRef:
name: os-images-http-auth
osImages:
- openshiftVersion: "4.14"
version: "414.92.202310170514-0"
url: "https://some-os-image-server.io/rhcos-4.14.0-rc.0-x86_64-live.x86_64.iso"
cpuArchitecture: "x86_64"
- openshiftVersion: "4.15"
version: "414.92.202310170514-0"
url: "https://some-os-image-server.io/rhcos-4.15.0-rc.0-x86_64-live.x86_64.iso"
cpuArchitecture: "x86_64"
databaseStorage:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
filesystemStorage:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
imageStorage:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
mirrorRegistryRef:
name: mirror-registry-config-map
EOF
```

### Mirror Registry Configuration

A ConfigMap can be used to configure assisted service to create installations using mirrored content. The ConfigMap contains two keys:
Expand Down

0 comments on commit 1c10745

Please sign in to comment.