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

Use CNI private for Calico Enterprise installs #514

Merged
merged 1 commit into from Apr 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/enterprise_versions.yml
Expand Up @@ -68,3 +68,6 @@ components:
guardian:
image: tigera/guardian
version: v2.7.0-0.dev-61-g73e2b02
tigera-cni:
image: tigera/cni
version: v3.0.0-0.dev-39-g3f96541
1 change: 1 addition & 0 deletions hack/gen-versions/components.go
Expand Up @@ -34,6 +34,7 @@ var defaultImages = map[string]string{
"typha": "calico/typha",
"eck-kibana": "tigera/kibana",
"guardian": "tigera/guardian",
"tigera-cni": "tigera/cni",
}

type Components map[string]*Component
Expand Down
7 changes: 7 additions & 0 deletions hack/gen-versions/enterprise.go.tpl
Expand Up @@ -169,4 +169,11 @@ var (
Image: "{{ .Image }}",
}
{{ end }}
{{ with index . "tigera-cni" }}
ComponentTigeraCNI = component{
Version: "{{ .Version }}",
Digest: "{{ .Digest }}",
Image: "{{ .Image }}",
}
{{ end }}
)
9 changes: 8 additions & 1 deletion pkg/components/enterprise.go
Expand Up @@ -102,7 +102,7 @@ var (

ComponentFluentd = component{
Version: "v3.0.0-0.dev-1-ge3d709f",
Digest: "sha256:af99ee4357236c8bd4082b1df3e5b99f3f5ccf8af45c2bc3813aae9240efa30d",
Digest: "sha256:84208c8d0946b23d28148f61a70f924b1a13738c9f0949656937acdd0b5d3cf6",
Image: "tigera/fluentd",
}

Expand Down Expand Up @@ -169,4 +169,11 @@ var (
Image: "tigera/typha",
}


ComponentTigeraCNI = component{
Version: "v3.0.0-0.dev-39-g3f96541",
Digest: "sha256:b3cc46ace05218b55a07b9351fe206e1a4398ab227c36bdde6ca84a076100cb9",
Image: "tigera/cni",
}

)
7 changes: 6 additions & 1 deletion pkg/render/node.go
Expand Up @@ -587,9 +587,14 @@ func (c *nodeComponent) cniContainer() v1.Container {
{MountPath: "/host/etc/cni/net.d", Name: "cni-net-dir"},
}

image := components.GetReference(components.ComponentCalicoCNI, c.cr.Spec.Registry, c.cr.Spec.ImagePath)
if c.cr.Spec.Variant == operator.TigeraSecureEnterprise {
image = components.GetReference(components.ComponentTigeraCNI, c.cr.Spec.Registry, c.cr.Spec.ImagePath)
}

return v1.Container{
Name: "install-cni",
Image: components.GetReference(components.ComponentCalicoCNI, c.cr.Spec.Registry, c.cr.Spec.ImagePath),
Image: image,
Command: []string{"/install-cni.sh"},
Env: cniEnv,
VolumeMounts: cniVolumeMounts,
Expand Down