Skip to content

Commit c20ee50

Browse files
committed
Merge remote-tracking branch 'open-source/master' into tool-flowlog
2 parents 71e3bd2 + 1ecf5b3 commit c20ee50

File tree

183 files changed

+7380
-4367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+7380
-4367
lines changed

Makefile

+11-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ generate:
8181
$(MAKE) gen-manifests
8282
$(MAKE) fix-changed
8383

84-
gen-manifests: bin/helm
84+
gen-manifests: bin/helm bin/yq
8585
cd ./manifests && \
8686
OPERATOR_VERSION=$(OPERATOR_VERSION) \
8787
CALICO_VERSION=$(CALICO_VERSION) \
@@ -153,6 +153,13 @@ release/bin/release: $(shell find ./release -type f -name '*.go')
153153
bin/ghr:
154154
$(DOCKER_RUN) -e GOBIN=/go/src/$(PACKAGE_NAME)/bin/ $(CALICO_BUILD) go install github.com/tcnksm/ghr@$(GHR_VERSION)
155155

156+
# Install GitHub CLI
157+
bin/gh:
158+
curl -sSL -o bin/gh.tgz https://github.com/cli/cli/releases/download/v$(GITHUB_CLI_VERSION)/gh_$(GITHUB_CLI_VERSION)_linux_amd64.tar.gz
159+
tar -zxvf bin/gh.tgz -C bin/ gh_$(GITHUB_CLI_VERSION)_linux_amd64/bin/gh --strip-components=2
160+
chmod +x $@
161+
rm bin/gh.tgz
162+
156163
# Build a release.
157164
release: release/bin/release
158165
@release/bin/release release build
@@ -161,6 +168,9 @@ release: release/bin/release
161168
release-publish: release/bin/release bin/ghr
162169
@release/bin/release release publish
163170

171+
release-public: bin/gh release/bin/release
172+
@release/bin/release release public
173+
164174
# Create a release branch.
165175
create-release-branch: release/bin/release
166176
@release/bin/release branch cut -git-publish

api/pkg/apis/projectcalico/v3/ippool.go

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ type IPPool struct {
4848
// IPPoolSpec contains the specification for an IPPool resource.
4949
type IPPoolSpec struct {
5050
// The pool CIDR.
51+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="CIDR cannot be changed; follow IP pool migration guide to avoid corruption."
5152
CIDR string `json:"cidr" validate:"net"`
5253

5354
// Contains configuration for VXLAN tunneling for this pool. If not specified,
@@ -69,6 +70,7 @@ type IPPoolSpec struct {
6970
DisableBGPExport bool `json:"disableBGPExport,omitempty" validate:"omitempty"`
7071

7172
// The block size to use for IP address assignments from this pool. Defaults to 26 for IPv4 and 122 for IPv6.
73+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Block size cannot be changed; follow IP pool migration guide to avoid corruption."
7274
BlockSize int `json:"blockSize,omitempty"`
7375

7476
// Allows IPPool to allocate for a specific node by label selector.

api/pkg/apis/projectcalico/v3/kubecontrollersconfig.go

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const (
126126

127127
type Template struct {
128128
// GenerateName is appended to the end of the generated AutoHostEndpoint name
129+
// +kubebuilder:validation:MaxLength=253
129130
GenerateName string `json:"generateName,omitempty" validate:"omitempty,name"`
130131

131132
// InterfaceCIDRs contains a list of CIRDs used for matching nodeIPs to the AutoHostEndpoint

apiserver/Dockerfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ FROM ${CALICO_BASE}
2727

2828
ARG GIT_VERSION=unknown
2929

30-
LABEL description="Aggregated API server which enables calico resources to be managed via kubectl"
31-
LABEL maintainer="[email protected]"
32-
LABEL name="Calico API server"
33-
LABEL release="1"
34-
LABEL summary="Calico API server"
35-
LABEL vendor="Project Calico"
36-
LABEL version=${GIT_VERSION}
30+
LABEL org.opencontainers.image.description="Aggregated API server which enables calico resources to be managed via kubectl"
31+
LABEL org.opencontainers.image.authors="[email protected]"
32+
LABEL org.opencontainers.image.source="https://github.com/projectcalico/calico"
33+
LABEL org.opencontainers.image.title="Calico API server"
34+
LABEL org.opencontainers.image.vendor="Project Calico"
35+
LABEL org.opencontainers.image.version="${GIT_VERSION}"
36+
LABEL org.opencontainers.image.licenses="Apache-2.0"
3737

3838
COPY --from=source / /
3939

app-policy/Dockerfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ FROM ${CALICO_BASE}
3939

4040
ARG GIT_VERSION=unknown
4141

42-
LABEL description="Calico Dikastes enables Application Layer Policy"
43-
LABEL maintainer="[email protected]"
44-
LABEL name="Calico Dikastes"
45-
LABEL release="1"
46-
LABEL summary="Calico Dikastes enables Application Layer Policy"
47-
LABEL vendor="Project Calico"
48-
LABEL version=${GIT_VERSION}
42+
LABEL org.opencontainers.image.description="Calico Dikastes enables Application Layer Policy"
43+
LABEL org.opencontainers.image.authors="[email protected]"
44+
LABEL org.opencontainers.image.source="https://github.com/projectcalico/calico"
45+
LABEL org.opencontainers.image.title="Calico Dikastes"
46+
LABEL org.opencontainers.image.vendor="Project Calico"
47+
LABEL org.opencontainers.image.version="${GIT_VERSION}"
48+
LABEL org.opencontainers.image.licenses="Apache-2.0"
4949

5050
COPY --from=source / /
5151

app-policy/policystore/ipset.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package policystore
1616

1717
import (
18-
"fmt"
1918
"net"
2019
"strconv"
2120
"strings"
@@ -63,7 +62,7 @@ func NewIPSet(t syncapi.IPSetUpdate_IPSetType) IPSet {
6362
case syncapi.IPSetUpdate_NET:
6463
return ipNetSet{v4: &trieNode{}, v6: &trieNode{}}
6564
}
66-
log.Warn(fmt.Sprintf("Unrecognized IPSet type %T", t))
65+
log.Warnf("Unrecognized IPSet type %v", t)
6766
return nil
6867
}
6968

calicoctl/Dockerfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ FROM ${CALICO_BASE}
2525

2626
ARG GIT_VERSION=unknown
2727

28-
LABEL description="calicoctl(1) is a command line tool used to interface with the Calico datastore"
29-
LABEL maintainer="[email protected]"
30-
LABEL name="Calico CLI tool"
31-
LABEL release="1"
32-
LABEL summary="Calico CLI tool"
33-
LABEL vendor="Project Calico"
34-
LABEL version=${GIT_VERSION}
28+
LABEL org.opencontainers.image.description="calicoctl(1) is a command line tool used to interface with the Calico datastore"
29+
LABEL org.opencontainers.image.authors="[email protected]"
30+
LABEL org.opencontainers.image.source="https://github.com/projectcalico/calico"
31+
LABEL org.opencontainers.image.title="Calico CLI tool"
32+
LABEL org.opencontainers.image.vendor="Project Calico"
33+
LABEL org.opencontainers.image.version="${GIT_VERSION}"
34+
LABEL org.opencontainers.image.licenses="Apache-2.0"
3535

3636
ENV CALICO_CTL_CONTAINER=TRUE
3737

charts/calico/templates/calico-kube-controllers.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ spec:
4242
hostNetwork: true
4343
containers:
4444
- name: calico-kube-controllers
45-
image: {{.Values.kubeControllers.image}}:{{ .Values.version }}
45+
image: {{.Values.kubeControllers.registry}}/{{.Values.kubeControllers.image}}:{{ .Values.version }}
4646
imagePullPolicy: {{.Values.imagePullPolicy}}
4747
env:
4848
# The location of the etcd cluster.
@@ -106,7 +106,7 @@ spec:
106106
{{- else }}
107107
containers:
108108
- name: calico-kube-controllers
109-
image: {{.Values.kubeControllers.image}}:{{ .Values.version }}
109+
image: {{.Values.kubeControllers.registry}}/{{.Values.kubeControllers.image}}:{{ .Values.version }}
110110
imagePullPolicy: {{.Values.imagePullPolicy}}
111111
env:
112112
# Choose which controllers to run.

charts/calico/templates/calico-node.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ spec:
5151
# It can be deleted if this is a fresh installation, or if you have already
5252
# upgraded to use calico-ipam.
5353
- name: upgrade-ipam
54-
image: {{.Values.cni.image}}:{{ .Values.version }}
54+
image: {{.Values.cni.registry}}/{{.Values.cni.image}}:{{ .Values.version }}
5555
imagePullPolicy: {{.Values.imagePullPolicy}}
5656
command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
5757
envFrom:
@@ -93,7 +93,7 @@ spec:
9393
# This container installs the CNI binaries
9494
# and CNI network config file on each node.
9595
- name: install-cni
96-
image: {{.Values.cni.image}}:{{ .Values.version }}
96+
image: {{.Values.cni.registry}}/{{.Values.cni.image}}:{{ .Values.version }}
9797
imagePullPolicy: {{.Values.imagePullPolicy}}
9898
command: ["/opt/cni/bin/install"]
9999
envFrom:
@@ -195,7 +195,7 @@ spec:
195195
# i.e. bpf at /sys/fs/bpf and cgroup2 at /run/calico/cgroup. Calico-node initialisation is executed
196196
# in best effort fashion, i.e. no failure for errors, to not disrupt pod creation in iptable mode.
197197
- name: "mount-bpffs"
198-
image: {{.Values.node.image}}:{{.Values.version}}
198+
image: {{.Values.node.registry}}/{{.Values.node.image}}:{{.Values.version}}
199199
imagePullPolicy: {{.Values.imagePullPolicy}}
200200
command: ["calico-node", "-init", "-best-effort"]
201201
volumeMounts:
@@ -221,7 +221,7 @@ spec:
221221
# container programs network policy and routes on each
222222
# host.
223223
- name: calico-node
224-
image: {{.Values.node.image}}:{{.Values.version}}
224+
image: {{.Values.node.registry}}/{{.Values.node.image}}:{{.Values.version}}
225225
imagePullPolicy: {{.Values.imagePullPolicy}}
226226
envFrom:
227227
- configMapRef:

charts/calico/templates/calico-typha.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ spec:
8686
seccompProfile:
8787
type: RuntimeDefault
8888
containers:
89-
- image: {{ .Values.typha.image }}:{{.Values.version }}
89+
- image: {{ .Values.typha.registry }}/{{ .Values.typha.image }}:{{.Values.version }}
9090
imagePullPolicy: {{.Values.imagePullPolicy}}
9191
name: calico-typha
9292
ports:

charts/calico/values.yaml

+17-8
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,34 @@
22
version: master
33

44
# Configure the images to use when generating manifests.
5+
# If a new image is added, update manifests/generate.sh
56
node:
6-
image: quay.io/calico/node
7+
image: node
8+
registry: quay.io/calico
79
calicoctl:
8-
image: quay.io/calico/ctl
10+
image: ctl
11+
registry: quay.io/calico
912
typha:
10-
image: quay.io/calico/typha
13+
image: typha
14+
registry: quay.io/calico
1115
cni:
12-
image: quay.io/calico/cni
16+
image: cni
17+
registry: quay.io/calico
1318
kubeControllers:
14-
image: quay.io/calico/kube-controllers
19+
image: kube-controllers
20+
registry: quay.io/calico
1521
flannel:
1622
image: quay.io/flannel/flannel
1723
tag: v0.24.4
1824
flannelMigration:
19-
image: quay.io/calico/flannel-migration
25+
image: flannel-migration
26+
registry: quay.io/calico
2027
dikastes:
21-
image: quay.io/calico/dikastes
28+
image: dikastes
29+
registry: quay.io/calico
2230
csi-driver:
23-
image: quay.io/calico/csi-driver
31+
image: csi-driver
32+
registry: quay.io/calico
2433

2534
# Some defaults used in the templates.
2635
includeCRDs: true

0 commit comments

Comments
 (0)