Skip to content

Commit

Permalink
feat: migrate fsm-classic features (#20)
Browse files Browse the repository at this point in the history
* wip: [skip ci] migrate fsm-classic

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] go mod tidy

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, webhooks

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, deps

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, helm charts

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, log

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, crds

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, mcs

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, pipy client

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, repo client

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, helm charts

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, package charts

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, rbac

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, remote connector

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, cfg

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, deps

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, new format of gateway config.json

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, gateway cache

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, controller-runtime manager

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, log

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, editorconfig

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, cleanup code

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, helm charts

Signed-off-by: Lin Yang <[email protected]>

* wip: [skip ci] migrate fsm-classic, fix cycle import

Signed-off-by: Lin Yang <[email protected]>

* feat: migrate fsm-classic, fix CI

Signed-off-by: Lin Yang <[email protected]>

* fix: go mod tidy

Signed-off-by: Lin Yang <[email protected]>

* fix: a typo in Makefile

Signed-off-by: Lin Yang <[email protected]>

* fix: check scripts

Signed-off-by: Lin Yang <[email protected]>

* fix: make codegen

Signed-off-by: Lin Yang <[email protected]>

* fix: make build-ci

Signed-off-by: Lin Yang <[email protected]>

* fix: make codegen

Signed-off-by: Lin Yang <[email protected]>

* fix: make charts-tgz

Signed-off-by: Lin Yang <[email protected]>

* fix: go mod tidy

Signed-off-by: Lin Yang <[email protected]>

* fix: go lint

Signed-off-by: Lin Yang <[email protected]>

* fix: make package-scripts

Signed-off-by: Lin Yang <[email protected]>

* fix: shell check

Signed-off-by: Lin Yang <[email protected]>

* fix: golangci-lint

Signed-off-by: Lin Yang <[email protected]>

* fix: golangci-lint

Signed-off-by: Lin Yang <[email protected]>

* fix: golangci-lint

Signed-off-by: Lin Yang <[email protected]>

* fix: golangci-lint configuration

Signed-off-by: Lin Yang <[email protected]>

* fix: CRDs

Signed-off-by: Lin Yang <[email protected]>

* fix: testcase for create certificate manager from MRC

Signed-off-by: Lin Yang <[email protected]>

* fix: testcase for messaging broker

Signed-off-by: Lin Yang <[email protected]>

* fix: checks codegen

Signed-off-by: Lin Yang <[email protected]>

* fix: make check-scripts

Signed-off-by: Lin Yang <[email protected]>

* fix: fsm-ingress & fsm-gateway command line arguments

Signed-off-by: Lin Yang <[email protected]>

* fix: crds yamls

Signed-off-by: Lin Yang <[email protected]>

* fix: CMD arguments

Signed-off-by: Lin Yang <[email protected]>

* fix: RBAC

Signed-off-by: Lin Yang <[email protected]>

* fix: interface conversion

Signed-off-by: Lin Yang <[email protected]>

* fix: forgot to mount scripts volume

Signed-off-by: Lin Yang <[email protected]>

* fix: add environment variables for controller, ingress and gateway

Signed-off-by: Lin Yang <[email protected]>

* fix: repo client

Signed-off-by: Lin Yang <[email protected]>

* fix: repo root url

Signed-off-by: Lin Yang <[email protected]>

* fix: a typo

Signed-off-by: Lin Yang <[email protected]>

* build: bump pipy to 0.90.2-41

Signed-off-by: Lin Yang <[email protected]>

* fix: ingress scripts

Signed-off-by: Lin Yang <[email protected]>

* build: update gateway scripts

Signed-off-by: Lin Yang <[email protected]>

* fix: default port of ingress TLS

Signed-off-by: Lin Yang <[email protected]>

* fix: load fsm-ingress and fsm-gateway images into kind cluster

Signed-off-by: Lin Yang <[email protected]>

* fix: add options to enable/disable ingress, gateway, flb, service-lb, egress-gateway in e2e testcases

Signed-off-by: Lin Yang <[email protected]>

* fix: e2e testcase reinstall fsm

Signed-off-by: Lin Yang <[email protected]>

* fix: export env PATH

Signed-off-by: Lin Yang <[email protected]>

* fix: export env PATH

Signed-off-by: Lin Yang <[email protected]>

* fix: increase the timeout of installing fsm

Signed-off-by: Lin Yang <[email protected]>

* fix: disable ingress when testing helm install

Signed-off-by: Lin Yang <[email protected]>

* feat: disable ingress by default

Signed-off-by: Lin Yang <[email protected]>

* chore: .gitignore

Signed-off-by: Lin Yang <[email protected]>

* chore: make chart-readme

Signed-off-by: Lin Yang <[email protected]>

* fix: checks if k8s cluster supports EndpointSlice

Signed-off-by: Lin Yang <[email protected]>

* fix: Unit test

Signed-off-by: Lin Yang <[email protected]>

* fix: Unit test - TestIsMonitoredNamespace

Signed-off-by: Lin Yang <[email protected]>

* fix: Unit test - TestListTrafficSplits

Signed-off-by: Lin Yang <[email protected]>

* fix: Unit test - TestGetCertificateManagerFromMRC

Signed-off-by: Lin Yang <[email protected]>

* feat: webhook service

Signed-off-by: Lin Yang <[email protected]>

* feat: checks and rebuild repo if needed

Signed-off-by: Lin Yang <[email protected]>

* feat: update logging config

Signed-off-by: Lin Yang <[email protected]>

* fix: golang lint

Signed-off-by: Lin Yang <[email protected]>

* feat: deployment startup dependencies

Signed-off-by: Lin Yang <[email protected]>

* feat: create default FSM GatewayClass

Signed-off-by: Lin Yang <[email protected]>

* refactor: housekeeping

Signed-off-by: Lin Yang <[email protected]>

* feat: add required labels to resources for cleaning up

Signed-off-by: Lin Yang <[email protected]>

* fix: golang lint

Signed-off-by: Lin Yang <[email protected]>

* fix: panic if cannot create/update gateway class

Signed-off-by: Lin Yang <[email protected]>

* feat: FLB supports multiple k8s cluster

Signed-off-by: Lin Yang <[email protected]>

* feat: FLB supports service tags

Signed-off-by: Lin Yang <[email protected]>

* build: bump version of golangci-lint image to 1.53

Signed-off-by: Lin Yang <[email protected]>

* fix: make chart-readme

Signed-off-by: Lin Yang <[email protected]>

* fix: service key

Signed-off-by: Lin Yang <[email protected]>

* refactor: re-organize constants

Signed-off-by: Lin Yang <[email protected]>

* refactor: to upper case for 'FLB'

Signed-off-by: Lin Yang <[email protected]>

* refactor: to upper case for 'ServiceLB'

Signed-off-by: Lin Yang <[email protected]>

* test: add scripts for testing

Signed-off-by: Lin Yang <[email protected]>

* fix: update GatewayClass

Signed-off-by: Lin Yang <[email protected]>

* fix: ignore creating GatewayClass error

Signed-off-by: Lin Yang <[email protected]>

* fix: create GatewayClass before cache start

Signed-off-by: Lin Yang <[email protected]>

* fix: nil pointer

Signed-off-by: Lin Yang <[email protected]>

* fix: cache key for GatewayClass

Signed-off-by: Lin Yang <[email protected]>

* fix: cache key for GatewayClass

Signed-off-by: Lin Yang <[email protected]>

* fix: config spec issue

Signed-off-by: Lin Yang <[email protected]>

* fix: generate chart.tgz

Signed-off-by: Lin Yang <[email protected]>

* fix: go mod tidy

Signed-off-by: Lin Yang <[email protected]>

* fix: golang lint

Signed-off-by: Lin Yang <[email protected]>

* fix: mesh-config rbac

Signed-off-by: Lin Yang <[email protected]>

* fix: health check port

Signed-off-by: Lin Yang <[email protected]>

* fix: webhook port

Signed-off-by: Lin Yang <[email protected]>

* fix: nil pointer of NamespacedIngress client

Signed-off-by: Lin Yang <[email protected]>

* fix: NamespacedIngress chart

Signed-off-by: Lin Yang <[email protected]>

* refactor: log level

Signed-off-by: Lin Yang <[email protected]>

* refactor: add log for debugging

Signed-off-by: Lin Yang <[email protected]>

* fix: enclose tag

Signed-off-by: Lin Yang <[email protected]>

* refactor: adjust log level

Signed-off-by: Lin Yang <[email protected]>

* refactor: adjust log level

Signed-off-by: Lin Yang <[email protected]>

* refactor: adjust log level

Signed-off-by: Lin Yang <[email protected]>

* feat: generate mock

Signed-off-by: Lin Yang <[email protected]>

* fix: service-lb image

Signed-off-by: Lin Yang <[email protected]>

* fix: service-lb image in values.yaml

Signed-off-by: Lin Yang <[email protected]>

* chore: NA

Signed-off-by: Lin Yang <[email protected]>

* fix: make chart-readme

Signed-off-by: Lin Yang <[email protected]>

* fix: get resource from cache

Signed-off-by: Lin Yang <[email protected]>

* fix: GVK issue

Signed-off-by: Lin Yang <[email protected]>

* feat: maps more ports for testing

Signed-off-by: Lin Yang <[email protected]>

* fix: a typo

Signed-off-by: Lin Yang <[email protected]>

* fix: golang lint

Signed-off-by: Lin Yang <[email protected]>

* docs: Gateway API Compatibility

Signed-off-by: Lin Yang <[email protected]>

* docs: Gateway API test cases

Signed-off-by: Lin Yang <[email protected]>

* test: FLB values.yaml for testing

Signed-off-by: Lin Yang <[email protected]>

* feat: support -f/--values option for install cmd

Signed-off-by: Lin Yang <[email protected]>

* fix: resolve values

Signed-off-by: Lin Yang <[email protected]>

* fix: wrong APIVersion

Signed-off-by: Lin Yang <[email protected]>

* refactor: simplify code

Signed-off-by: Lin Yang <[email protected]>

* refactor: log level

Signed-off-by: Lin Yang <[email protected]>

* fix: generate mockspec

Signed-off-by: Lin Yang <[email protected]>

* fix: /bin/sh: 1: Syntax error: "(" unexpected

Signed-off-by: Lin Yang <[email protected]>

* Revert "fix: /bin/sh: 1: Syntax error: "(" unexpected"

This reverts commit a8e6886.

* fix: mcs

Signed-off-by: Lin Yang <[email protected]>

* test: multicluster test scripts

Signed-off-by: Lin Yang <[email protected]>

* fix: receiver

Signed-off-by: Lin Yang <[email protected]>

* fix: MCS update event

Signed-off-by: Lin Yang <[email protected]>

* test: scripts for testing MCS

Signed-off-by: Lin Yang <[email protected]>

* fix: a typo

Signed-off-by: Lin Yang <[email protected]>

* fix: create k3d clusters with config file

Signed-off-by: Lin Yang <[email protected]>

* test: [skip ci] add docs for testing MCS

Signed-off-by: Lin Yang <[email protected]>

* fix: unused shell variable

Signed-off-by: Lin Yang <[email protected]>

* test: [skip ci] add docs for testing MCS

Signed-off-by: Lin Yang <[email protected]>

* fix: a timing issue

Signed-off-by: Lin Yang <[email protected]>

* fix: golang lint

Signed-off-by: Lin Yang <[email protected]>

* test: [skip ci] scripts for testing MCS

Signed-off-by: Lin Yang <[email protected]>

* refactor: [skip ci] beautify shell output

Signed-off-by: Lin Yang <[email protected]>

---------

Signed-off-by: Lin Yang <[email protected]>
  • Loading branch information
reaver-flomesh authored Aug 16, 2023
1 parent fc9a4c3 commit 790ccfa
Show file tree
Hide file tree
Showing 483 changed files with 62,636 additions and 3,911 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 2

[{*.go,*.go2}]
indent_size = 4
tab_width = 4

[{*.markdown,*.md}]
indent_size = 2
tab_width = 2

[{*.mk,GNUmakefile,makefile,Makefile}]
tab_width = 4
12 changes: 12 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@ export BOOKWAREHOUSE_NAMESPACE=bookwarehouse
# Default: error
# export SIDECAR_LOG_LEVEL=debug

# optional: specify the log level for the controller
# Default: warn
# export CONTROLLER_LOG_LEVEL=debug

# optional: specify the log level for the ingress
# Default: warn
# export INGRESS_LOG_LEVEL=debug

# optional: specify the log level for the gateway
# Default: warn
# export GATEWAY_LOG_LEVEL=debug

### The section below configures certificates management
### FSM has 2 ways to manage certificates
### Set CERT_MANAGER to "tresor" to use the internal system (relies on k8s secrets)
Expand Down
31 changes: 25 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51
version: v1.53
skip-pkg-cache: true

codegen:
Expand All @@ -72,6 +72,8 @@ jobs:
run: make go-mod-tidy
- name: Codegen checks
run: make check-codegen
- name: Scripts checks
run: make check-scripts

mocks:
name: Mocks
Expand Down Expand Up @@ -109,6 +111,8 @@ jobs:
with:
go-version-file: go.mod
cache: true
- name: Package Helm Charts
run: make charts-tgz
- name: Go Build
run: make build-ci

Expand Down Expand Up @@ -180,7 +184,10 @@ jobs:
id: test
env:
K8S_NAMESPACE: "fsm-system"
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
run: |
export PATH=$PWD/bin:$PATH
echo "PATH=$PATH"
go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
continue-on-error: true
- name: Set Logs name
if: ${{ steps.test.conclusion != 'skipped' }}
Expand Down Expand Up @@ -231,7 +238,10 @@ jobs:
id: test
env:
K8S_NAMESPACE: "fsm-system"
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
run: |
export PATH=$PWD/bin:$PATH
echo "PATH=$PATH"
go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
continue-on-error: true
- name: Set Logs name
if: ${{ steps.test.conclusion != 'skipped' }}
Expand Down Expand Up @@ -282,7 +292,10 @@ jobs:
id: test
env:
K8S_NAMESPACE: "fsm-system"
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
run: |
export PATH=$PWD/bin:$PATH
echo "PATH=$PATH"
go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
continue-on-error: true
- name: Set Logs name
if: ${{ steps.test.conclusion != 'skipped' }}
Expand Down Expand Up @@ -340,7 +353,10 @@ jobs:
id: test
env:
K8S_NAMESPACE: "fsm-system"
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
run: |
export PATH=$PWD/bin:$PATH
echo "PATH=$PATH"
go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
continue-on-error: true
- name: Set Logs name
if: ${{ steps.test.conclusion != 'skipped' }}
Expand Down Expand Up @@ -391,7 +407,10 @@ jobs:
id: test
env:
K8S_NAMESPACE: "fsm-system"
run: go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
run: |
export PATH=$PWD/bin:$PATH
echo "PATH=$PATH"
go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }}'
continue-on-error: true
- name: Set Logs name
if: ${{ steps.test.conclusion != 'skipped' }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
BUILD_GITCOMMIT_VAR: 'github.com/flomesh-io/fsm/pkg/version.GitCommit'
strategy:
matrix:
id: [ "sidecar-init", "controller", "injector", "consul-connector", "crds", "bootstrap", "preinstall", "healthcheck", "interceptor" ]
id: [ "sidecar-init", "controller", "injector", "consul-connector", "crds", "bootstrap", "preinstall", "healthcheck", "interceptor", "ingress", "gateway" ]
steps:
- name: Set up QEMU
uses: docker/[email protected]
Expand All @@ -142,6 +142,9 @@ jobs:
with:
fetch-depth: 0

- name: Package Helm Charts
run: make charts-tgz

- name: Docker meta - ${{ matrix.id }}
id: docker_meta
uses: crazy-max/[email protected]
Expand All @@ -164,8 +167,9 @@ jobs:
file: ./dockerfiles/Dockerfile.fsm-${{ matrix.id }}
platforms: linux/amd64,linux/arm64
build-args: |
GO_VERSION=1.19
GO_VERSION=1.20
LDFLAGS=-X ${{ env.BUILD_DATE_VAR }}=${{ env.BUILD_DATE }} -X ${{ env.BUILD_VERSION_VAR }}=${{ env.VERSION }} -X ${{ env.BUILD_GITCOMMIT_VAR }}=${{ env.GIT_SHA }} -s -w
DISTROLESS_TAG=debug-nonroot
push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == format('refs/heads/{0}', github.event.repository.default_branch) )) }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
Expand Down Expand Up @@ -212,7 +216,7 @@ jobs:
file: ./dockerfiles/Dockerfile.demo
platforms: linux/amd64,linux/arm64
build-args: |
GO_VERSION=1.19
GO_VERSION=1.20
BINARY=${{ matrix.id }}
push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == format('refs/heads/{0}', github.event.repository.default_branch) )) }}
tags: ${{ steps.docker_meta.outputs.tags }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
BUILD_GITCOMMIT_VAR: 'github.com/flomesh-io/fsm/pkg/version.GitCommit'
strategy:
matrix:
id: [ "sidecar-init", "controller", "injector", "consul-connector", "crds", "bootstrap", "preinstall", "healthcheck", "interceptor" ]
id: [ "sidecar-init", "controller", "injector", "consul-connector", "crds", "bootstrap", "preinstall", "healthcheck", "interceptor", "ingress", "gateway" ]
steps:
- name: Set up QEMU
uses: docker/[email protected]
Expand All @@ -139,6 +139,9 @@ jobs:
with:
fetch-depth: 0

- name: Package Helm Charts
run: make charts-tgz

- name: Docker meta - ${{ matrix.id }}
id: docker_meta
uses: crazy-max/[email protected]
Expand All @@ -163,8 +166,9 @@ jobs:
file: ./dockerfiles/Dockerfile.fsm-${{ matrix.id }}
platforms: linux/amd64,linux/arm64
build-args: |
GO_VERSION=1.19
GO_VERSION=1.20
LDFLAGS=-X ${{ env.BUILD_DATE_VAR }}=${{ env.BUILD_DATE }} -X ${{ env.BUILD_VERSION_VAR }}=${{ env.VERSION }} -X ${{ env.BUILD_GITCOMMIT_VAR }}=${{ env.GIT_SHA }} -s -w
DISTROLESS_TAG=nonroot
push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == format('refs/heads/{0}', github.event.repository.default_branch) )) }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
Expand Down Expand Up @@ -213,7 +217,7 @@ jobs:
file: ./dockerfiles/Dockerfile.demo
platforms: linux/amd64,linux/arm64
build-args: |
GO_VERSION=1.19
GO_VERSION=1.20
BINARY=${{ matrix.id }}
push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == format('refs/heads/{0}', github.event.repository.default_branch) )) }}
tags: ${{ steps.docker_meta.outputs.tags }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ debug
build/
.dev/
.env
.envrc
_dist/

creds.json
Expand Down
61 changes: 60 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
tests: true
tests: false
timeout: 20m
skip-dirs:
- pkg/gen
Expand All @@ -22,6 +22,10 @@ linters:
linters-settings:
goimports:
local-prefixes: github.com/flomesh-io/fsm
revive:
rules:
- name: unused-parameter
disabled: true

issues:
exclude-rules:
Expand All @@ -40,5 +44,60 @@ issues:
- linters:
- staticcheck
text: "SA1019:"
- linters:
- gosec
text: "G101:"
exclude-use-default: false

# output configuration options
output:
# Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity
#
# Multiple can be specified by separating them by comma, output can be provided
# for each of them by separating format name and path by colon symbol.
# Output path can be either `stdout`, `stderr` or path to the file to write to.
# Example: "checkstyle:report.xml,json:stdout,colored-line-number"
#
# Default: colored-line-number
format: colored-line-number
# Print lines of code with issue.
# Default: true
print-issued-lines: true
# Print linter name in the end of issue text.
# Default: true
print-linter-name: true
# Make issues output unique by line.
# Default: true
uniq-by-line: true
# Add a prefix to the output file references.
# Default is no prefix.
path-prefix: ""
# Sort results by: filepath, line and column.
sort-results: true

severity:
# Set the default severity for issues.
#
# If severity rules are defined and the issues do not match or no severity is provided to the rule
# this will be the default severity applied.
# Severities should match the supported severity names of the selected out format.
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#SeverityLevel
# - GitHub: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
# - TeamCity: https://www.jetbrains.com/help/teamcity/service-messages.html#Inspection+Instance
#
# Default value is an empty string.
default-severity: "error"
# If set to true `severity-rules` regular expressions become case-sensitive.
# Default: false
case-sensitive: true
# When a list of severity rules are provided, severity information will be added to lint issues.
# Severity rules have the same filtering capability as exclude rules
# except you are allowed to specify one matcher per severity rule.
# Only affects out formats that support setting severity information.
#
# Default: []
rules:
- linters:
- dupl
severity: info
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#build stage
FROM golang:1.19-alpine AS builder
FROM golang:1.20-alpine AS builder

RUN apk update
RUN apk add --no-cache make
Expand Down
Loading

0 comments on commit 790ccfa

Please sign in to comment.