Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update image for ECK and CoreOS components #3524

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions hack/gen-versions/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,33 @@ package main
import (
"fmt"
"os"
"strings"
"text/template"

"gopkg.in/yaml.v2"
)

var defaultImages = map[string]string{
"calico/cni": "calico/cni",
"calico/cni-windows": "calico/cni-windows",
"calico/dikastes": "calico/dikastes",
"calico/kube-controllers": "calico/kube-controllers",
"calico/node": "calico/node",
"calico/node-windows": "calico/node-windows",
"calicoctl": "calico/ctl",
"flannel": "coreos/flannel",
"flexvol": "calico/pod2daemon-flexvol",
"calico/csi": "calico/csi",
"csi-node-driver-registrar": "calico/node-driver-registrar",
"typha": "calico/typha",
"key-cert-provisioner": "calico/key-cert-provisioner",
"eck-elasticsearch": "unused/image",
"eck-elasticsearch-operator": "unused/image",
"eck-kibana": "unused/image",
"coreos-prometheus": "unused/image",
"coreos-alertmanager": "unused/image",
"guardian": "tigera/guardian",
"cnx-node": "tigera/cnx-node",
"cnx-node-windows": "tigera/cnx-node-windows",
"tigera-cni": "tigera/cni",
"tigera-cni-windows": "tigera/cni-windows",
"calico/apiserver": "calico/apiserver",
"tigera/linseed": "tigera/linseed",
"calico/cni": "calico/cni",
"calico/cni-windows": "calico/cni-windows",
"calico/dikastes": "calico/dikastes",
"calico/kube-controllers": "calico/kube-controllers",
"calico/node": "calico/node",
"calico/node-windows": "calico/node-windows",
"calicoctl": "calico/ctl",
"flannel": "coreos/flannel",
"flexvol": "calico/pod2daemon-flexvol",
"calico/csi": "calico/csi",
"csi-node-driver-registrar": "calico/node-driver-registrar",
"typha": "calico/typha",
"key-cert-provisioner": "calico/key-cert-provisioner",
"guardian": "tigera/guardian",
"cnx-node": "tigera/cnx-node",
"cnx-node-windows": "tigera/cnx-node-windows",
"tigera-cni": "tigera/cni",
"tigera-cni-windows": "tigera/cni-windows",
"calico/apiserver": "calico/apiserver",
"tigera/linseed": "tigera/linseed",
}

var ignoredImages = map[string]struct{}{
Expand Down Expand Up @@ -94,12 +90,16 @@ func GetComponents(versionsPath string) (Release, error) {
}

if component.Image == "" {
image := defaultImages[key]
if image == "" {
return cv, fmt.Errorf("no image nor default image available for component '%s'. "+
"Either fill in the 'image' field or update this code with a defaultImage.", key)
if strings.HasPrefix(key, "eck-") || strings.HasPrefix(key, "coreos-") {
// ECK and CoreOS components are only used for their version value.
} else {
image := defaultImages[key]
if image == "" {
return cv, fmt.Errorf("no image nor default image available for component '%s'. "+
"Either fill in the 'image' field or update this code with a defaultImage.", key)
}
component.Image = image
}
component.Image = image
}

cv.Components[key] = component
Expand Down
Loading