Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoral2 committed Jul 7, 2023
2 parents 0d9189c + 356adec commit 400d3cf
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ COPY charts/ /charts/
RUN echo ${CACHEBUST}>/dev/null
RUN CHART_VERSION="1.13.200" CHART_FILE=/charts/rke2-cilium.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="v3.25.1-build2023051202" CHART_FILE=/charts/rke2-canal.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="v3.25.002" CHART_FILE=/charts/rke2-calico.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="v3.25.002" CHART_FILE=/charts/rke2-calico-crd.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="v3.26.100" CHART_FILE=/charts/rke2-calico.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="v3.26.100" CHART_FILE=/charts/rke2-calico-crd.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="1.24.004" CHART_FILE=/charts/rke2-coredns.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="4.6.100" CHART_FILE=/charts/rke2-ingress-nginx.yaml CHART_BOOTSTRAP=false /charts/build-chart.sh
RUN CHART_VERSION="2.11.100-build2023051509" CHART_FILE=/charts/rke2-metrics-server.yaml CHART_BOOTSTRAP=false /charts/build-chart.sh
RUN CHART_VERSION="v3.9.3-build2023010903" CHART_FILE=/charts/rke2-multus.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="v4.0.2-build2023070701" CHART_FILE=/charts/rke2-multus.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="1.5.100" CHART_FILE=/charts/rancher-vsphere-cpi.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="3.0.1-rancher101" CHART_FILE=/charts/rancher-vsphere-csi.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
RUN CHART_VERSION="0.2.200" CHART_FILE=/charts/harvester-cloud-provider.yaml CHART_BOOTSTRAP=true /charts/build-chart.sh
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ FROM build as windows-runtime-collect
ARG KUBERNETES_VERSION=dev

# windows runtime image
ENV CRICTL_VERSION="v1.25.0"
ENV CALICO_VERSION="v3.25.0"
ENV CRICTL_VERSION="v1.27.0"
ENV CALICO_VERSION="v3.26.1"
ENV CNI_PLUGIN_VERSION="v1.1.1"

RUN mkdir -p rancher
Expand Down
26 changes: 19 additions & 7 deletions pkg/windows/calico.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const (
CalicoSystemNamespace = "calico-system"
CalicoChart = "rke2-calico"
calicoNode = "calico-node"
calicoLogPath = "C:\\var\\log\\"
)

// Setup creates the basic configuration required by the CNI.
Expand Down Expand Up @@ -373,6 +374,12 @@ func (c *Calico) overrideCalicoConfigByHelm(restConfig *rest.Config) error {
}

func startFelix(ctx context.Context, config *CalicoConfig) {
outputFile, err := os.Create(calicoLogPath + "felix.log")
if err != nil {
logrus.Fatalf("error creating felix.log: %v", err)
return
}
defer outputFile.Close()
specificEnvs := []string{
fmt.Sprintf("FELIX_FELIXHOSTNAME=%s", config.Hostname),
fmt.Sprintf("FELIX_VXLANVNI=%s", config.Felix.Vxlanvni),
Expand All @@ -386,14 +393,19 @@ func startFelix(ctx context.Context, config *CalicoConfig) {
logrus.Infof("Felix Envs: %s", append(generateGeneralCalicoEnvs(config), specificEnvs...))
cmd := exec.CommandContext(ctx, "calico-node.exe", args...)
cmd.Env = append(generateGeneralCalicoEnvs(config), specificEnvs...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
logrus.Errorf("Felix exited: %v", err)
}
cmd.Stdout = outputFile
cmd.Stderr = outputFile
_ = cmd.Run()
logrus.Error("Felix exited")
}

func startCalico(ctx context.Context, config *CalicoConfig) error {
outputFile, err := os.Create(calicoLogPath + "calico-node.log")
if err != nil {
logrus.Errorf("error creating calico-node.log: %v", err)
return err
}
defer outputFile.Close()
specificEnvs := []string{
fmt.Sprintf("CALICO_NODENAME_FILE=%s", config.NodeNameFile),
}
Expand All @@ -404,8 +416,8 @@ func startCalico(ctx context.Context, config *CalicoConfig) error {
logrus.Infof("Calico Envs: %s", append(generateGeneralCalicoEnvs(config), specificEnvs...))
cmd := exec.CommandContext(ctx, "calico-node.exe", args...)
cmd.Env = append(generateGeneralCalicoEnvs(config), specificEnvs...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Stdout = outputFile
cmd.Stderr = outputFile
if err := cmd.Run(); err != nil {
logrus.Errorf("Calico exited: %v", err)
return err
Expand Down
18 changes: 9 additions & 9 deletions scripts/build-images
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ xargs -n1 -t docker image pull --quiet << EOF > build/images-cilium.txt
EOF

xargs -n1 -t docker image pull --quiet << EOF > build/images-calico.txt
${REGISTRY}/rancher/mirrored-calico-operator:v1.29.0
${REGISTRY}/rancher/mirrored-calico-ctl:v3.25.0
${REGISTRY}/rancher/mirrored-calico-kube-controllers:v3.25.0
${REGISTRY}/rancher/mirrored-calico-typha:v3.25.0
${REGISTRY}/rancher/mirrored-calico-node:v3.25.0
${REGISTRY}/rancher/mirrored-calico-pod2daemon-flexvol:v3.25.0
${REGISTRY}/rancher/mirrored-calico-cni:v3.25.0
${REGISTRY}/rancher/mirrored-calico-apiserver:v3.25.0
${REGISTRY}/rancher/mirrored-calico-operator:v1.30.4
${REGISTRY}/rancher/mirrored-calico-ctl:v3.26.1
${REGISTRY}/rancher/mirrored-calico-kube-controllers:v3.26.1
${REGISTRY}/rancher/mirrored-calico-typha:v3.26.1
${REGISTRY}/rancher/mirrored-calico-node:v3.26.1
${REGISTRY}/rancher/mirrored-calico-pod2daemon-flexvol:v3.26.1
${REGISTRY}/rancher/mirrored-calico-cni:v3.26.1
${REGISTRY}/rancher/mirrored-calico-apiserver:v3.26.1
EOF

xargs -n1 -t docker image pull --quiet << EOF > build/images-vsphere.txt
Expand All @@ -71,7 +71,7 @@ xargs -n1 -t docker image pull --quiet << EOF > build/images-vsphere.txt
EOF

xargs -n1 -t docker image pull --quiet << EOF > build/images-multus.txt
${REGISTRY}/rancher/hardened-multus-cni:v3.9.3-build20230109
${REGISTRY}/rancher/hardened-multus-cni:v4.0.2-build20230707
${REGISTRY}/rancher/hardened-cni-plugins:v1.2.0-build20230523
${REGISTRY}/rancher/hardened-sriov-network-operator:v1.2.0-build20230607
${REGISTRY}/rancher/hardened-sriov-network-config-daemon:v1.2.0-build20230607
Expand Down

0 comments on commit 400d3cf

Please sign in to comment.