Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
docs: deploying Calico for Nutanix
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoshkin committed Apr 2, 2024
1 parent 1501ea9 commit df78890
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 4 deletions.
5 changes: 5 additions & 0 deletions charts/cluster-api-runtime-extensions-nutanix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,17 @@ A Helm chart for cluster-api-runtime-extensions-nutanix
| hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.DockerCluster.configMap.content | string | `""` | |
| hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.DockerCluster.configMap.name | string | `"calico-cni-crs-installation-dockercluster"` | |
| hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.DockerCluster.create | bool | `true` | |
| hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.NutanixCluster.configMap.content | string | `""` | |
| hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.NutanixCluster.configMap.name | string | `"calico-cni-crs-installation-nutanixcluster"` | |
| hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.NutanixCluster.create | bool | `true` | |
| hooks.cni.calico.crsStrategy.defaultTigeraOperatorConfigMap.name | string | `"tigera-operator"` | |
| hooks.cni.calico.defaultPodSubnet | string | `"192.168.0.0/16"` | |
| hooks.cni.calico.helmAddonStrategy.defaultValueTemplatesConfigMaps.AWSCluster.create | bool | `true` | |
| hooks.cni.calico.helmAddonStrategy.defaultValueTemplatesConfigMaps.AWSCluster.name | string | `"calico-cni-helm-values-template-awscluster"` | |
| hooks.cni.calico.helmAddonStrategy.defaultValueTemplatesConfigMaps.DockerCluster.create | bool | `true` | |
| hooks.cni.calico.helmAddonStrategy.defaultValueTemplatesConfigMaps.DockerCluster.name | string | `"calico-cni-helm-values-template-dockercluster"` | |
| hooks.cni.calico.helmAddonStrategy.defaultValueTemplatesConfigMaps.NutanixCluster.create | bool | `true` | |
| hooks.cni.calico.helmAddonStrategy.defaultValueTemplatesConfigMaps.NutanixCluster.name | string | `"calico-cni-helm-values-template-nutanixcluster"` | |
| hooks.cni.cilium.crsStrategy.defaultCiliumConfigMap.name | string | `"cilium"` | |
| hooks.cni.cilium.helmAddonStrategy.defaultValueTemplateConfigMap.create | bool | `true` | |
| hooks.cni.cilium.helmAddonStrategy.defaultValueTemplateConfigMap.name | string | `"default-cilium-cni-helm-values-template"` | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2023 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.NutanixCluster.create }}
apiVersion: v1
kind: ConfigMap
metadata:
name: '{{ .Values.hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.NutanixCluster.configMap.name }}'
data:
calico-installation: |
{{- if .Values.hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.NutanixCluster.configMap.content -}}
{{ .Values.hooks.cni.calico.crsStrategy.defaultInstallationConfigMaps.NutanixCluster.configMap.content | nindent 4 }}
{{- else -}}
# This section includes base Calico installation configuration.
# For more information, see: https://docs.projectcalico.org/reference/installation/api
apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
name: default
spec:
cni:
type: Calico
# Configures Calico networking.
calicoNetwork:
# Note: The ipPools section cannot be modified post-install.
ipPools:
- blockSize: 26
cidr: {{ .Values.hooks.cni.calico.defaultPodSubnet }}
encapsulation: IPIP
natOutgoing: Enabled
nodeSelector: all()
bgp: Enabled
nodeMetricsPort: 9091
typhaMetricsPort: 9093
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2023 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.hooks.cni.calico.helmAddonStrategy.defaultValueTemplatesConfigMaps.NutanixCluster.create }}
apiVersion: v1
kind: ConfigMap
metadata:
name: '{{ .Values.hooks.cni.calico.helmAddonStrategy.defaultValueTemplatesConfigMaps.NutanixCluster.name }}'
data:
values.yaml: |-
installation:
cni:
type: Calico
calicoNetwork:
bgp: Enabled
ipPools:{{ printf "{{ range $cidr := .Cluster.spec.clusterNetwork.pods.cidrBlocks }}" }}
- cidr: {{ printf "{{ $cidr }}" }}
encapsulation: None
natOutgoing: Enabled
nodeSelector: all(){{ printf "{{ end }}" }}
nodeMetricsPort: 9091
typhaMetricsPort: 9093
{{- end -}}
8 changes: 8 additions & 0 deletions charts/cluster-api-runtime-extensions-nutanix/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ hooks:
configMap:
name: calico-cni-crs-installation-awscluster
content: ""
NutanixCluster:
create: true
configMap:
name: calico-cni-crs-installation-nutanixcluster
content: ""
helmAddonStrategy:
defaultValueTemplatesConfigMaps:
DockerCluster:
Expand All @@ -27,6 +32,9 @@ hooks:
AWSCluster:
create: true
name: calico-cni-helm-values-template-awscluster
NutanixCluster:
create: true
name: calico-cni-helm-values-template-nutanixcluster
cilium:
crsStrategy:
defaultCiliumConfigMap:
Expand Down
5 changes: 3 additions & 2 deletions pkg/handlers/generic/lifecycle/cni/calico/strategy_crs.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ func (c *crsConfig) AddFlags(prefix string, flags *pflag.FlagSet) {
&c.defaultProviderInstallationConfigMapNames,
prefix+".default-provider-installation-configmap-names",
map[string]string{
"DockerCluster": "calico-cni-crs-installation-dockercluster",
"AWSCluster": "calico-cni-crs-installation-awscluster",
"DockerCluster": "calico-cni-crs-installation-dockercluster",
"AWSCluster": "calico-cni-crs-installation-awscluster",
"NutanixCluster": "calico-cni-crs-installation-nutanixcluster",
},
"map of provider cluster implementation type to default installation ConfigMap name",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ func (c *helmAddonConfig) AddFlags(prefix string, flags *pflag.FlagSet) {
&c.defaultProviderInstallationValuesTemplatesConfigMapNames,
prefix+".default-provider-installation-values-templates-configmap-names",
map[string]string{
"DockerCluster": "calico-cni-helm-values-template-dockercluster",
"AWSCluster": "calico-cni-helm-values-template-awscluster",
"DockerCluster": "calico-cni-helm-values-template-dockercluster",
"AWSCluster": "calico-cni-helm-values-template-awscluster",
"NutanixCluster": "calico-cni-helm-values-template-nutanixcluster",
},
"map of provider cluster implementation type to default installation values ConfigMap name",
)
Expand Down

0 comments on commit df78890

Please sign in to comment.