1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00

hack/build-coreos-manifest: support OKD

If TAGS env var contains "okd" CoreOS manifest script should use
FCOS json. This is necessary for OKD clusters to be installable via
Hypershift
This commit is contained in:
Vadim Rutkovsky
2023-02-27 15:59:43 +01:00
parent 685a14d5b8
commit 8db73f591f

View File

@@ -10,6 +10,7 @@ import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/ghodss/yaml"
corev1 "k8s.io/api/core/v1"
@@ -17,12 +18,17 @@ import (
)
const (
// FIXME - Add an OKD conditional here
streamJSON = "data/data/coreos/rhcos.json"
dest = "bin/manifests/coreos-bootimages.yaml"
streamRHCOSJSON = "data/data/coreos/rhcos.json"
streamFCOSJSON = "data/data/coreos/fcos.json"
fcosTAG = "okd"
dest = "bin/manifests/coreos-bootimages.yaml"
)
func run() error {
streamJSON := streamRHCOSJSON
if tags, _ := os.LookupEnv("TAGS"); strings.Contains(tags, fcosTAG) {
streamJSON = streamFCOSJSON
}
bootimages, err := os.ReadFile(streamJSON)
if err != nil {
return err