SUSE / doc-cap

SUSE Cloud Application Platform Documentation
https://documentation.suse.com/suse-cap/
11 stars 9 forks source link

[doc] 10.2 Mirror Images to Registry #1038

Open bdekany opened 3 years ago

bdekany commented 3 years ago

10.2 Mirror Images to Registry:

https://documentation.suse.com/suse-cap/2.1/single-html/cap-guides/#sec-cap-air-gap-registry

Hi, The definition of local registry in kubecf-config-values.yaml is not working anymore

kube:
  registry:
    # example registry domain
    hostname: "myregistry.com"
    username: ""
    password: ""
  organization: "cap"
# helm install kubecf suse/kubecf -f kubecf-config-values.yaml  --dry-run
Error: values don't meet the specifications of the schema(s) in the following chart(s):
kubecf:
- kube: Additional property organization is not allowed
- kube: Additional property registry is not allowed

To be able to use local registry, we have to either:

Cri-O /etc/containers/registries.conf

[[registry]]
prefix = "registry.suse.com"
location = "myregistry.com"
insecure = true

Docker /etc/docker/daemon.json

"registry-mirrors": ["myregistry.com"],

Modify Helm chart

helm fetch suse/cf-operator
tar zxvf cf-operator-6.1.17+0.gec409fd7.tgz
cd cf-operator/
for f in $(grep -lr registry.suse.com) ; do echo $f ;  sed -i "s/registry.suse.com/myregistry.com/"  $f ; done
cd ..

helm fetch suse/kubecf
tar zxvf kubecf-2.5.8.tgz
cd kubecf
for f in $(grep -lr registry.suse.com) ; do echo $f ;  sed -i "s/registry.suse.com/myregistry.com/"  $f ; done
cd ..