Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/grafana/pyr…
Browse files Browse the repository at this point in the history
…oscope-go-1.1.1
  • Loading branch information
lou-lan authored Apr 12, 2024
2 parents 616ab3f + 03aa272 commit 804dc17
Show file tree
Hide file tree
Showing 276 changed files with 16,789 additions and 4,883 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/auto-cherrypick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
fetch-depth: 0

- uses: crazy-max/ghaction-import-gpg@v5
- uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
Expand Down Expand Up @@ -97,19 +97,25 @@ jobs:
#
echo "=============================== get dest branch from labels ======== "
WANT_MERGE_BRANCH_LIST=""
INITIAL_LABEL=""
if ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.destBranch != '' }}; then
WANT_MERGE_BRANCH_LIST=${{ github.event.inputs.destBranch }}
else
for LABEL in ${PR_LABEL} ; do
echo "checking label $LABEL "
PREFIX="${{ env.PR_LABEL_PREFIX_CHERRYPICK }}"
grep -E "^${PREFIX}" <<< "${LABEL}" &>/dev/null || continue
if ! grep -E "^${PREFIX}" <<< "${LABEL}" &>/dev/null; then
INITIAL_LABEL+="${LABEL},"
continue
fi
BRANCH_NAME=` sed 's?'"${PREFIX}"'??' <<< "$LABEL" `
WANT_MERGE_BRANCH_LIST+=" $BRANCH_NAME "
done
fi
[ -z "$WANT_MERGE_BRANCH_LIST" ] && echo "no branch to cherry pick" && exit 0
echo "cherry pick to $WANT_MERGE_BRANCH_LIST "
INITIAL_LABEL="${INITIAL_LABEL%,}"
echo "INITIAL_LABEL: ${INITIAL_LABEL}"
#
#
echo "============ begin to cherry pick ============ "
Expand Down Expand Up @@ -196,7 +202,7 @@ jobs:
git push origin ${PR_BRANCH}:${PR_BRANCH} -f
gh pr create --title "${PR_TITLE}" \
--assignee "${PR_AUTHOR},${{ env.DEFAULT_REVIEWER }}" \
--label ${{ env.CHERRYPICK_LABEL }} \
--label "${{ env.CHERRYPICK_LABEL }},${INITIAL_LABEL}" \
--body "robot cherry pick pr <${PR_URL}> to branch ${BRANCH}, action <${ACTION_URL}> , commits $PR_COMMITS " \
--base ${BRANCH}
else
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-pr-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
JustE2E: ${{ env.RUN_JustE2E }}
steps:
- name: Check Code Changes
uses: dorny/paths-filter@v2.11.1
uses: dorny/paths-filter@v3.0.2
if: ${{ github.event_name == 'pull_request_target' }}
id: filter_pr
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
- name: Create Release
id: create_release
continue-on-error: false
uses: ncipollo/release-action@v1.13.0
uses: ncipollo/release-action@v1.14.0
with:
artifacts: "chart-package/*"
allowUpdates: true
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/call-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:

# https://github.com/helm/kind-action
- name: Install Kind Bin
uses: helm/kind-action@v1.8.0
uses: helm/kind-action@v1.9.0
with:
install_only: true

Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
# test against commit version
- name: Setup Kind Cluster
uses: nick-invision/retry@v2
uses: nick-invision/retry@v3
with:
timeout_minutes: 10
max_attempts: 1
Expand All @@ -144,9 +144,9 @@ jobs:
-e E2E_GINKGO_LABELS=${E2E_LABELS} \
-e E2E_IP_FAMILY=${{ inputs.ipfamily }} -e CNI=${{ env.cni }}} || RESULT=1
if ((RESULT==0)) ; then
echo "RUN_PASS=true" >> $GITHUB_ENV
echo "RUN_E2E_PASS=true" >> $GITHUB_ENV
else
echo "RUN_PASS=false" >> $GITHUB_ENV
echo "RUN_E2E_PASS=false" >> $GITHUB_ENV
fi
if [ -f "${{ env.E2E_LOG_PATH }}" ] ; then
echo "RUN_UPLOAD_LOG=true" >> $GITHUB_ENV
Expand Down Expand Up @@ -174,9 +174,20 @@ jobs:
path: ${{ env.E2E_GINKGO_REPORT_PATH }}
retention-days: 30

- name: helm uninstalls egress
id: clean
run: |
RESULT=0
make clean_e2e_egress -e E2E_KIND_CLUSTER_NAME=${{ env.RUN_KIND_CLUSTER_NAME }} || RESULT=1
if ((RESULT==0)) ; then
echo "CLEAN_E2E_PASS=true" >> $GITHUB_ENV
else
echo "CLEAN_E2E_PASS=false" >> $GITHUB_ENV
fi
- name: Show e2e Result
run: |
if ${{ env.RUN_PASS == 'true' }} ;then
if ${{ env.RUN_E2E_PASS == 'true' && env.CLEAN_E2E_PASS == 'true'}} ;then
exit 0
else
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-lint-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
# https://github.com/helm/kind-action
- name: Create Kind cluster
if: ${{ env.RUN_CHANGED == 'true' && env.RUN_JUST_LINT_CHART == 'false' }}
uses: helm/kind-action@v1.8.0
uses: helm/kind-action@v1.9.0
with:
wait: 120s
#kubectl_version: ${{ env.K8S_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-release-changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:

- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v5.0.2
uses: peter-evans/create-pull-request@v6.0.1
with:
title: "robot update changelog with tag ${{ needs.generate_changelog.outputs.dest_tag }} to branch ${{ env.DEST_BRANCH }} "
commit-message: "robot update changelog from tag ${{ needs.generate_changelog.outputs.begin_tag }} to tag ${{ needs.generate_changelog.outputs.dest_tag }} "
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-release-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
# Allow auto-merge on general
- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v5.0.2
uses: peter-evans/create-pull-request@v6.0.1
with:
title: "robot update chart from ${{ needs.package.outputs.REF }} to branch ${{ env.MERGE_BRANCH }} "
commit-message: "robot update chart from ${{ needs.package.outputs.REF }} to branch ${{ env.MERGE_BRANCH }} "
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-release-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
if: ${{ env.RUN_PUSH == 'true' }}
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v2.0.1' #do not upgrade, or else go error
cosign-release: 'v2.2.3' #do not upgrade, or else go error

- name: Getting Build Arg
id: arg
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/call-release-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
# Allow auto-merge on general
- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v5.0.2
uses: peter-evans/create-pull-request@v6.0.1
with:
title: "robot update website from ${{ needs.package.outputs.ref }} to branch ${{ env.MERGE_BRANCH }} with tag ${{ needs.package.outputs.doc_tag }}"
commit-message: "robot update website from ${{ needs.package.outputs.ref }} to branch ${{ env.MERGE_BRANCH }} with tag ${{ needs.package.outputs.doc_tag }} "
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-codeowners.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
codeowners-changed: ${{ steps.changes.outputs.codeowners-changed }}
steps:
- name: Check code changes
uses: dorny/paths-filter@v2.11.1
uses: dorny/paths-filter@v3.0.2
id: changes
with:
filters: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
crd: ${{ env.RUN_CRD_CHECK }}
steps:
- name: Check Go Code Changes
uses: dorny/paths-filter@v2.11.1
uses: dorny/paths-filter@v3.0.2
if: ${{ github.event_name == 'pull_request' }}
id: filter_pr
with:
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
# ============= upload coverage report
- name: Upload to Codecov
if: ${{ steps.unitest.outcome != 'failure' }}
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.1.1
with:
directory: './'
files: '${{ env.COVERAGE_REPORT_PATH }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/netlify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
fi
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v2.1
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: './site'
production-branch: master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-golang-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Create Pull Request
id: create_pr
if: ${{ env.RUN_UPDATE == 'true' }}
uses: peter-evans/create-pull-request@v5.0.2
uses: peter-evans/create-pull-request@v6.0.1
with:
title: "robot Update project owing to updated Golang Version "
commit-message: "robot Update project owing to updated Golang Version "
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ endef
build_all_bin:
make build_controller_bin
make build_agent_bin
make build_egctl_bin


.PHONY: build_controller_bin
Expand All @@ -35,6 +36,11 @@ build_agent_bin: CMD_BIN_DIR := $(ROOT_DIR)/cmd/agent
build_agent_bin:
$(BUILD_BIN)

.PHONY: build_egctl_bin
build_egctl_bin: CMD_BIN_DIR := $(ROOT_DIR)/cmd/egctl
build_egctl_bin:
$(BUILD_BIN)

# ------------

define BUILD_FINAL_IMAGE
Expand Down Expand Up @@ -397,6 +403,10 @@ e2e_run:
e2e_clean:
make -C test clean

.PHONY: clean_e2e_egress
clean_e2e_egress:
-$(QUIET) make -C test uninstall_egress


#============ doc

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.4.2
v0.5.0
4 changes: 2 additions & 2 deletions charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ home: "https://spidernet-io.github.io/agent"
# application or library
type: application
# no need to modify this version , CI will auto update it with /VERSION
version: "0.4.2"
version: "0.5.0"
# This field is informational, and has no impact on chart version calculations .
# Leaving it unquoted can lead to parsing issues in some cases
# no need to modify this version , CI will auto update it with /VERSION
appVersion: "0.4.2"
appVersion: "0.5.0"
kubeVersion: ">= 1.16.0-0"
description: egressgateway
sources:
Expand Down
4 changes: 2 additions & 2 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ helm install egressgateway egressgateway/egressgateway --namespace kube-system
| `agent.image.repository` | The image repository of egressgateway agent | `spidernet-io/egressgateway-agent` |
| `agent.image.pullPolicy` | The image pull policy of egressgateway agent | `IfNotPresent` |
| `agent.image.digest` | The image digest of egressgateway agent, which takes preference over tag | `""` |
| `agent.image.tag` | The image tag of egressgateway agent, overrides the image tag whose default is the chart appVersion. | `v0.4.2` |
| `agent.image.tag` | The image tag of egressgateway agent, overrides the image tag whose default is the chart appVersion. | `v0.5.0` |
| `agent.image.imagePullSecrets` | the image pull secrets of egressgateway agent | `[]` |
| `agent.serviceAccount.create` | Create the service account for the egressgateway agent | `true` |
| `agent.serviceAccount.annotations` | The annotations of egressgateway agent service account | `{}` |
Expand Down Expand Up @@ -125,7 +125,7 @@ helm install egressgateway egressgateway/egressgateway --namespace kube-system
| `controller.image.repository` | The image repository of egressgateway controller | `spidernet-io/egressgateway-controller` |
| `controller.image.pullPolicy` | The image pullPolicy of egressgateway controller | `IfNotPresent` |
| `controller.image.digest` | The image digest of egressgatewayController, which takes preference over tag | `""` |
| `controller.image.tag` | The image tag of egressgateway controller, overrides the image tag whose default is the chart appVersion. | `v0.4.2` |
| `controller.image.tag` | The image tag of egressgateway controller, overrides the image tag whose default is the chart appVersion. | `v0.5.0` |
| `controller.image.imagePullSecrets` | The image pull secrets of egressgateway controller | `[]` |
| `controller.serviceAccount.create` | Create the service account for the egressgateway controller | `true` |
| `controller.serviceAccount.annotations` | The annotations of egressgateway controller service account | `{}` |
Expand Down
4 changes: 2 additions & 2 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ agent:
## @param agent.image.digest The image digest of egressgateway agent, which takes preference over tag
digest: ""
## @param agent.image.tag The image tag of egressgateway agent, overrides the image tag whose default is the chart appVersion.
tag: "v0.4.2"
tag: "v0.5.0"
## @param agent.image.imagePullSecrets the image pull secrets of egressgateway agent
imagePullSecrets: []
# - name: "image-pull-secret"
Expand Down Expand Up @@ -239,7 +239,7 @@ controller:
## @param controller.image.digest The image digest of egressgatewayController, which takes preference over tag
digest: ""
## @param controller.image.tag The image tag of egressgateway controller, overrides the image tag whose default is the chart appVersion.
tag: "v0.4.2"
tag: "v0.5.0"
## @param controller.image.imagePullSecrets The image pull secrets of egressgateway controller
imagePullSecrets: []
# - name: "image-pull-secret"
Expand Down
38 changes: 38 additions & 0 deletions cmd/egctl/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2022 Authors of spidernet-io
// SPDX-License-Identifier: Apache-2.0

package cmd

import (
"fmt"
"os"
"path/filepath"

"github.com/spf13/cobra"
)

var binName = filepath.Base(os.Args[0])

// rootCmd represents the base command.
var rootCmd = &cobra.Command{
Use: binName,
Short: "egress gateway ctl",
Run: func(cmd *cobra.Command, args []string) {
},
}

// Execute adds all child commands to the root command sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
moveCmd.Flags().StringVarP(&egressGatewayName, "egressGatewayName", "", "", "Specify the name of the egress gateway")
moveCmd.Flags().StringVarP(&vipAddress, "vip", "", "", "Specify the VIP address to MoveEgressIP")
moveCmd.Flags().StringVarP(&targetNode, "targetNode", "", "", "Specify the name of the node to MoveEgressIP the VIP to")

rootCmd.AddCommand(vipCmd)
vipCmd.AddCommand(moveCmd)

if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}
Loading

1 comment on commit 804dc17

@weizhoublue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.