Skip to content

Commit

Permalink
Merge branch 'cilium:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
doniacld committed Jul 4, 2023
2 parents d254723 + 1a45357 commit a692f40
Show file tree
Hide file tree
Showing 1,511 changed files with 53,425 additions and 18,629 deletions.
137 changes: 137 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# SPDX-License-Identifier: GPL-2.0
#
# clang-format configuration file. Intended for clang-format >= 15.
#
# For more information, see:
#
# Documentation/process/clang-format.rst
# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
# Originally obtained from: https://github.com/torvalds/linux/blob/7acc1372113083fa281ba426021801e2402caca1/.clang-format
# Settings here should be compatible with (current-release-major - 2) of clang-format
---
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeComma
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false

IncludeBlocks: Preserve
IncludeCategories:
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentGotoLabels: false
IndentPPDirectives: None
IndentWidth: 8
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 8
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true

# Taken from git's rules
# This decides in what order (weighting) things
# should be done if a line is too long
# 100 = try everything else before this.
# See https://stackoverflow.com/a/46749925
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 0
PenaltyBreakComment: 0
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyBreakOpenParenthesis: 100
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 100

PointerAlignment: Right
ReflowComments: false
SortIncludes: false
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCtorInitializerColon: true
# kernel.org sets this to true,
# however this also seems to affect labels,
# which seems like a bug.
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 8
UseTab: Always
...
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Cilium",
"image": "quay.io/cilium/cilium-builder:099e8a115fae92649a03ef22aa53d6d9e4485f08@sha256:016e3d8d7c471c491817d0ccb8abc261168640b38e4de1772ef37c6d1f3caff6",
"image": "quay.io/cilium/cilium-builder:c5a2f1dd59905b1c7201222d1f71e40393d93190@sha256:77e86c4b13acb9cebda3b4ffe5f80a40abf76b37c22d22e81a74032c517abd7d",
"workspaceFolder": "/go/src/github.com/cilium/cilium",
"workspaceMount": "source=${localWorkspaceFolder},target=/go/src/github.com/cilium/cilium,type=bind",
"features": {
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/set-env-variables/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ runs:
run: |
echo "QUAY_ORGANIZATION=cilium" >> $GITHUB_ENV
echo "QUAY_ORGANIZATION_DEV=cilium" >> $GITHUB_ENV
# no prod yet
echo "QUAY_CHARTS_ORGANIZATION_DEV=cilium-charts-dev" >> $GITHUB_ENV
2 changes: 1 addition & 1 deletion .github/gcp-vm-startup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

apt-get update
apt-get install -y --no-install-recommends \
Expand Down
18 changes: 9 additions & 9 deletions .github/maintainers-little-helper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ column: "In progress"
move-to-projects-for-labels-xored:
v1.13:
needs-backport/1.13:
project: "https://github.com/cilium/cilium/projects/232"
project: "https://github.com/cilium/cilium/projects/235"
column: "Needs backport from main"
backport-pending/1.13:
project: "https://github.com/cilium/cilium/projects/232"
project: "https://github.com/cilium/cilium/projects/235"
column: "Backport pending to v1.13"
backport-done/1.13:
project: "https://github.com/cilium/cilium/projects/232"
project: "https://github.com/cilium/cilium/projects/235"
column: "Backport done to v1.13"
v1.12:
needs-backport/1.12:
project: "https://github.com/cilium/cilium/projects/230"
project: "https://github.com/cilium/cilium/projects/234"
column: "Needs backport from main"
backport-pending/1.12:
project: "https://github.com/cilium/cilium/projects/230"
project: "https://github.com/cilium/cilium/projects/234"
column: "Backport pending to v1.12"
backport-done/1.12:
project: "https://github.com/cilium/cilium/projects/230"
project: "https://github.com/cilium/cilium/projects/234"
column: "Backport done to v1.12"
v1.11:
needs-backport/1.11:
project: "https://github.com/cilium/cilium/projects/231"
project: "https://github.com/cilium/cilium/projects/233"
column: "Needs backport from main"
backport-pending/1.11:
project: "https://github.com/cilium/cilium/projects/231"
project: "https://github.com/cilium/cilium/projects/233"
column: "Backport pending to v1.11"
backport-done/1.11:
project: "https://github.com/cilium/cilium/projects/231"
project: "https://github.com/cilium/cilium/projects/233"
column: "Backport done to v1.11"
require-msgs-in-commit:
- msg: "Signed-off-by"
Expand Down
37 changes: 32 additions & 5 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"test/kubernetes-test.sh",
"test/packet/scripts/install.sh",
"install/kubernetes/cilium/templates/spire/**",
"install/kubernetes/cilium/values.yaml.tmpl",
],
postUpdateOptions: [
"gomodTidy"
Expand Down Expand Up @@ -52,6 +53,7 @@
"enabled": true
},
"labels": [
"renovate/stop-updating",
"kind/enhancement",
"release-note/misc"
],
Expand Down Expand Up @@ -123,6 +125,8 @@
// want to update them automatically.
"go.universe.tf/metallb",
"github.com/cilium/metallb",
// metallb is still using an old version of "github.com/mdlayher/arp"
"github.com/mdlayher/arp",
"github.com/miekg/dns",
"github.com/cilium/dns",
"sigs.k8s.io/controller-tools",
Expand Down Expand Up @@ -153,6 +157,7 @@
// Images that directly use docker.io/library/golang for building.
"groupName": "golang-images",
"matchFiles": [
"contrib/backporting/Dockerfile",
"images/cilium-docker-plugin/Dockerfile",
"images/clustermesh-apiserver/Dockerfile",
"images/hubble-relay/Dockerfile",
Expand All @@ -162,6 +167,19 @@
"on friday"
]
},
{
// Images that directly use docker.io/library/alpine for building.
"groupName": "alpine-images",
"matchFiles": [
"contrib/coccinelle/Dockerfile",
"images/cache/Dockerfile",
"images/clustermesh-apiserver/Dockerfile",
"images/operator/Dockerfile"
],
"schedule": [
"on friday"
]
},
{
"matchPackageNames": [
"docker.io/library/ubuntu"
Expand Down Expand Up @@ -227,9 +245,17 @@
"matchPackageNames": [
"docker.io/library/alpine"
],
"allowedVersions": "<3.17",
"allowedVersions": "<3.18",
"matchBaseBranches": [
"v1.13",
]
},
{
"matchPackageNames": [
"docker.io/library/alpine"
],
"allowedVersions": "<3.17",
"matchBaseBranches": [
"v1.12",
"v1.11"
]
Expand Down Expand Up @@ -311,13 +337,14 @@
},
{
"fileMatch": [
"^\\.github/workflows/[^/]+\\.yaml$"
"^\\.github/workflows/[^/]+\\.ya?ml$"
],
// This regex manages version strings in GitHub actions workflow files,
// similar to the examples shown here:
// https://docs.renovatebot.com/modules/manager/regex/#advanced-capture
"matchStrings": [
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)\\s+.+version: (?<currentValue>.*)"
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)\\s+.+version: (?<currentValue>.*)",
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)\\s+.+_VERSION: (?<currentValue>.*)"
]
},
{
Expand All @@ -341,8 +368,8 @@
},
{
"fileMatch": [
"^test/kubernetes-test\\.sh$",
"^test/packet/scripts/install\\.sh$"
"^test/kubernetes-test\\.sh$",
"^test/packet/scripts/install\\.sh$"
],
"matchStrings": [
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)\\s+.+_VERSION=\"(?<currentValue>.*)\""
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/build-images-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0

- name: Install Cosign
uses: sigstore/cosign-installer@9e9de2292db7abb3f51b7f4808d98f0d347a8919 # v3.0.2
uses: sigstore/cosign-installer@dd6b2e2b610a11fd73dd187a43d57cc1394e35f9 # v3.0.5

- name: Checkout Source Code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
Expand Down Expand Up @@ -95,15 +95,16 @@ jobs:
- name: Sign Container Image Runtime
if: ${{ steps.cilium-runtime-tag-in-repositories.outputs.exists == 'false' }}
env:
COSIGN_EXPERIMENTAL: "true"
run: |
cosign sign -y quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-runtime@${{ steps.docker_build_release_runtime.outputs.digest }}
- name: Install Bom
shell: bash
env:
# renovate: datasource=github-releases depName=kubernetes-sigs/bom
BOM_VERSION: v0.5.1
run: |
curl -L https://github.com/kubernetes-sigs/bom/releases/download/v0.4.1/bom-linux-amd64 -o bom
curl -L https://github.com/kubernetes-sigs/bom/releases/download/${{ env.BOM_VERSION }}/bom-amd64-linux -o bom
sudo mv ./bom /usr/local/bin/bom
sudo chmod +x /usr/local/bin/bom
Expand All @@ -123,8 +124,6 @@ jobs:
- name: Sign SBOM Image
if: ${{ steps.cilium-runtime-tag-in-repositories.outputs.exists == 'false' }}
env:
COSIGN_EXPERIMENTAL: "true"
run: |
docker_build_release_runtime_digest="${{ steps.docker_build_release_runtime.outputs.digest }}"
image_name="quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-runtime:${docker_build_release_runtime_digest/:/-}.sbom"
Expand Down Expand Up @@ -193,8 +192,6 @@ jobs:
- name: Sign Container Image Builder
if: ${{ steps.cilium-builder-tag-in-repositories.outputs.exists == 'false' }}
env:
COSIGN_EXPERIMENTAL: "true"
run: |
cosign sign -y quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-builder@${{ steps.docker_build_release_builder.outputs.digest }}
Expand All @@ -214,8 +211,6 @@ jobs:
- name: Sign SBOM Image
if: ${{ steps.cilium-builder-tag-in-repositories.outputs.exists == 'false' }}
env:
COSIGN_EXPERIMENTAL: "true"
run: |
docker_build_release_builder_digest="${{ steps.docker_build_release_builder.outputs.digest }}"
image_name="quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-builder:${docker_build_release_builder_digest/:/-}.sbom"
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build-images-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,19 @@ jobs:
OPERATOR_VARIANT=${{ matrix.name }}
- name: Install Cosign
uses: sigstore/cosign-installer@9e9de2292db7abb3f51b7f4808d98f0d347a8919 # v3.0.2
uses: sigstore/cosign-installer@dd6b2e2b610a11fd73dd187a43d57cc1394e35f9 # v3.0.5

- name: Sign Container Image
env:
COSIGN_EXPERIMENTAL: "true"
run: |
cosign sign -y quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/${{ matrix.name }}-${{ github.event.inputs.suffix }}@${{ steps.docker_build_release.outputs.digest }}
- name: Install Bom
shell: bash
env:
# renovate: datasource=github-releases depName=kubernetes-sigs/bom
BOM_VERSION: v0.5.1
run: |
curl -L https://github.com/kubernetes-sigs/bom/releases/download/v0.4.1/bom-linux-amd64 -o bom
curl -L https://github.com/kubernetes-sigs/bom/releases/download/${{ env.BOM_VERSION }}/bom-amd64-linux -o bom
sudo mv ./bom /usr/local/bin/bom
sudo chmod +x /usr/local/bin/bom
Expand All @@ -134,8 +135,6 @@ jobs:
cosign attach sbom --sbom sbom_${{ matrix.name }}_${{ github.event.inputs.tag }}.spdx quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/${{ matrix.name }}-${{ github.event.inputs.suffix }}@${{ steps.docker_build_release.outputs.digest }}
- name: Sign SBOM Image
env:
COSIGN_EXPERIMENTAL: "true"
run: |
docker_build_release_digest="${{ steps.docker_build_release.outputs.digest }}"
image_name="quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/${{ matrix.name }}-${{ github.event.inputs.suffix }}:${docker_build_release_digest/:/-}.sbom"
Expand Down

0 comments on commit a692f40

Please sign in to comment.