mirror of
https://github.com/hanzoai/ingress.git
synced 2026-10-20 15:07:40 +00:00
* rebrand: strip "traefik" branding from the ingress controller
Removes all "traefik" branding/paths/env/comments from the shipping
surface while keeping load-bearing config schema and external deps intact.
Paths / binary:
- cmd/traefik/ -> cmd/ingress/ (traefik.go->ingress.go, etc.); merged out
the empty cmd/ingress/generate.go stub. Build refs updated in Dockerfile,
Makefile, .goreleaser.yml.tmpl, script/crossbinary-default.sh, README.
- contrib/systemd/traefik.service -> ingress.service (Hanzo Ingress unit,
/etc/ingress paths, hanzo-ingress binary).
- contrib/grafana/traefik*.json -> ingress*.json; metric queries
traefik_* -> ingress_* (now match the engine's ingress_ prefix) + titles.
- script/gcg/traefik-*.toml -> ingress-*.toml; Owner/Repo -> hanzoai/ingress.
Code/config branding (comments + non-schema strings):
- doc.go, mount.go, client/router.go, zap_backend.go, forward_backend.go,
register.go: "Traefik" -> "the ingress"/"Hanzo Ingress"; corrected the
annotation example to ingress.kubernetes.io/.
- ingress.sample.{toml,yml}: header + log + entryPoint example.
- pkg/config/dynamic/fixtures/sample.toml comment.
- pkg/redactor/testdata example+expected: /etc/traefik/traefik.toml ->
/etc/ingress/ingress.toml, TraefikLogsFile -> IngressLogsFile (both files
kept identical so the redactor golden test stays green).
- .golangci.yml importas aliases traefik* -> ingress* and the stale
crd/traefikio path -> crd/hanzoai; unused-var exclude ingressVersion.
- .dockerignore / .gitignore: drop stale /traefik artifacts.
- script/code-gen.sh: PROJECT_MODULE -> github.com/hanzoai/ingress,
v1alpha1 path -> crd/hanzoai, CRD output -> hanzo.ai_*.yaml /
01-ingress-crd.yml.
- script/deploy.sh: drop the upstream traefik-library-image push.
- Removed dead, disabled upstream docs-publish workflow
(.github/workflows/documentation.yaml, pushed to traefik/doc).
- LLM.md: rewrote rebrand notes; documented load-bearing "traefik" that
stays (external imports, hash-bound realm, upstream issue URL, license
attribution) and vendored upstream docs/webui/changelog as out of scope.
Load-bearing "traefik" intentionally KEPT (not branding):
- external Go modules github.com/traefik/{oxy,yaegi,grpc-web};
- digest_auth_test.go htdigest realm "traefik" (invalidates the hashes);
- consul_test.go upstream issue URL #8092 (provenance citation);
- LICENSE.md + boilerplate.go.tmpl Containous/Traefik Labs copyright
(MIT attribution; Hanzo AI appended);
- integration/ test fixtures (traefik/whoami images, rawdata-*.json
golden entrypoint names, nomad traefik.* tags) — test-only, semantics-
sensitive; out of scope for this pass.
Verify: `go build $(go list ./... | grep -v /webui)` passes; redactor /
config/dynamic / nomad / server/service tests pass. The webui go:embed
failure and the kubernetes/crd test (ingress.k8s.io group mismatch) are
pre-existing on main, not caused by this rebrand.
* build(ingress): own yaegi + grpc-web via hanzoai source-fork replaces (#29)
Task #29 — own the framework deps (Traefik half). The Traefik engine is
already fully source-forked into github.com/hanzoai/ingress and the
user-facing surface is debranded (cmd/ingress -> hanzo-ingress, CRD group
hanzo.ai, ingress_ metrics, X-Ingress-* headers). The last upstream
traefik/* runtime libraries are now pinned to hanzoai source-forks:
github.com/traefik/grpc-web => github.com/hanzoai/grpc-web v0.16.0
github.com/traefik/yaegi => github.com/hanzoai/yaegi v0.16.1
Both forks keep the upstream module path at the identical version tag, so
the import lines in pkg/plugins (yaegi Go-interpreter for plugins) and
pkg/middlewares/grpcweb are unchanged — only resolution moves to a path
hanzoai controls (immune to upstream re-tag/deletion; patchable in-house).
oxy has no hanzoai fork yet and stays on the existing traefik/oxy replace —
tracked next-wave (create hanzoai/oxy first).
Proof:
go list -m github.com/traefik/{yaegi,grpc-web} -> both => hanzoai/*
go build ./... -> exit 0 (webui assets staged)
go test ./pkg/plugins/... -> ok (yaegi consumer)
readonly (CI-mode) build of swapped pkgs -> exit 0 (go.sum complete)
* docs(ingress): document traefik/* framework-dep ownership boundary (#29)
---------
Co-authored-by: Antje Worring <[email protected]>
Co-authored-by: Hanzo Dev <[email protected]>
353 lines
11 KiB
YAML
353 lines
11 KiB
YAML
version: "2"
|
|
|
|
formatters:
|
|
enable:
|
|
- gci
|
|
- gofumpt
|
|
exclusions:
|
|
generated: lax
|
|
paths:
|
|
- pkg/provider/kubernetes/crd/generated/
|
|
|
|
linters:
|
|
default: all
|
|
disable:
|
|
- bodyclose # too many false-positive
|
|
- containedctx # too many false-positive
|
|
- contextcheck # too many false-positive
|
|
- cyclop # duplicate of gocyclo
|
|
- dupl # Too strict
|
|
- err113 # Too strict
|
|
- exhaustive # Not relevant
|
|
- exhaustruct # Not relevant
|
|
- forcetypeassert # Too strict
|
|
- gochecknoglobals
|
|
- gochecknoinits
|
|
- gocognit # Too strict
|
|
- gocyclo # FIXME must be fixed
|
|
- gosec # Too strict
|
|
- gosmopolitan # not relevant
|
|
- ireturn # Not relevant
|
|
- lll # Not relevant
|
|
- maintidx # kind of duplicate of gocyclo
|
|
- makezero # Not relevant
|
|
- mnd # Too strict
|
|
- nestif # Too many false-positive.
|
|
- nilnil # Not relevant
|
|
- nlreturn # Not relevant
|
|
- noctx # Too strict
|
|
- noinlineerr # Too strict
|
|
- nonamedreturns # Too strict
|
|
- paralleltest # Not relevant
|
|
- prealloc # Too many false-positive.
|
|
- rowserrcheck # not relevant (SQL)
|
|
- sqlclosecheck # not relevant (SQL)
|
|
- tagliatelle # Too strict
|
|
- testpackage # Too strict
|
|
- tparallel # Not relevant
|
|
- varnamelen # Not relevant
|
|
- wrapcheck # Too strict
|
|
- wsl # Too strict
|
|
- wsl_v5 # Too strict
|
|
|
|
settings:
|
|
depguard:
|
|
rules:
|
|
main:
|
|
deny:
|
|
- pkg: github.com/instana/testify
|
|
desc: not allowed
|
|
- pkg: github.com/pkg/errors
|
|
desc: Should be replaced by standard lib errors package
|
|
errcheck:
|
|
exclude-functions:
|
|
- fmt.Fprintln
|
|
forbidigo:
|
|
forbid:
|
|
- pattern: ^print(ln)?$
|
|
- pattern: ^spew\.Print(f|ln)?$
|
|
- pattern: ^spew\.Dump$
|
|
funlen:
|
|
lines: -1
|
|
statements: 120
|
|
goconst:
|
|
min-len: 3
|
|
min-occurrences: 4
|
|
gocyclo:
|
|
min-complexity: 14
|
|
godox:
|
|
keywords:
|
|
- FIXME
|
|
gomoddirectives:
|
|
toolchain-pattern: go1\.\d+\.\d+$
|
|
tool-forbidden: true
|
|
go-version-pattern: ^1\.\d+(\.0)?$
|
|
replace-local: true
|
|
replace-allow-list:
|
|
- github.com/abbot/go-http-auth
|
|
- github.com/gorilla/mux
|
|
- github.com/mailgun/minheap
|
|
- github.com/mailgun/multibuf
|
|
- github.com/jaguilar/vt100
|
|
- github.com/cucumber/godog
|
|
- github.com/vulcand/oxy/v2
|
|
govet:
|
|
enable-all: true
|
|
disable:
|
|
- shadow
|
|
- fieldalignment
|
|
importas:
|
|
no-unaliased: true
|
|
alias:
|
|
- pkg: github.com/docker/compose/v2/pkg/api
|
|
alias: composeapi
|
|
|
|
# Standard Kubernetes rewrites:
|
|
- pkg: k8s.io/api/core/v1
|
|
alias: corev1
|
|
- pkg: k8s.io/api/networking/v1
|
|
alias: netv1
|
|
- pkg: k8s.io/api/networking/v1beta1
|
|
alias: netv1beta1
|
|
- pkg: k8s.io/api/admission/v1
|
|
alias: admv1
|
|
- pkg: k8s.io/api/admission/v1beta1
|
|
alias: admv1beta1
|
|
- pkg: k8s.io/api/extensions/v1beta1
|
|
alias: extv1beta1
|
|
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
|
|
alias: metav1
|
|
- pkg: k8s.io/apimachinery/pkg/types
|
|
alias: ktypes
|
|
- pkg: k8s.io/apimachinery/pkg/api/errors
|
|
alias: kerror
|
|
- pkg: k8s.io/client-go/kubernetes
|
|
alias: kclientset
|
|
- pkg: k8s.io/client-go/informers
|
|
alias: kinformers
|
|
- pkg: k8s.io/client-go/testing
|
|
alias: ktesting
|
|
- pkg: k8s.io/apimachinery/pkg/runtime/schema
|
|
alias: kschema
|
|
- pkg: k8s.io/client-go/kubernetes/scheme
|
|
alias: kscheme
|
|
- pkg: k8s.io/apimachinery/pkg/version
|
|
alias: kversion
|
|
- pkg: k8s.io/client-go/kubernetes/fake
|
|
alias: kubefake
|
|
- pkg: k8s.io/client-go/discovery/fake
|
|
alias: discoveryfake
|
|
|
|
# Kubernetes Gateway rewrites:
|
|
- pkg: sigs.k8s.io/gateway-api/pkg/client/clientset/gateway/versioned
|
|
alias: gateclientset
|
|
- pkg: sigs.k8s.io/gateway-api/pkg/client/informers/gateway/externalversions
|
|
alias: gateinformers
|
|
- pkg: sigs.k8s.io/gateway-api/apis/v1alpha2
|
|
alias: gatev1alpha2
|
|
|
|
# Ingress Kubernetes rewrites:
|
|
- pkg: github.com/hanzoai/ingress/v3/pkg/provider/kubernetes/crd/hanzoai/v1alpha1
|
|
alias: ingressv1alpha1
|
|
- pkg: github.com/hanzoai/ingress/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned
|
|
alias: ingressclientset
|
|
- pkg: github.com/hanzoai/ingress/v3/pkg/provider/kubernetes/crd/generated/informers/externalversions
|
|
alias: ingressinformers
|
|
- pkg: github.com/hanzoai/ingress/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/scheme
|
|
alias: ingressscheme
|
|
- pkg: github.com/hanzoai/ingress/v3/pkg/provider/kubernetes/crd/generated/clientset/versioned/fake
|
|
alias: ingresscrdfake
|
|
misspell:
|
|
locale: US
|
|
revive:
|
|
rules:
|
|
- name: struct-tag
|
|
- name: blank-imports
|
|
- name: context-as-argument
|
|
- name: context-keys-type
|
|
- name: dot-imports
|
|
- name: error-return
|
|
- name: error-strings
|
|
- name: error-naming
|
|
- name: exported
|
|
disabled: true
|
|
- name: if-return
|
|
- name: increment-decrement
|
|
- name: var-naming
|
|
- name: var-declaration
|
|
- name: package-comments
|
|
disabled: true
|
|
- name: range
|
|
- name: receiver-naming
|
|
- name: time-naming
|
|
- name: unexported-return
|
|
- name: indent-error-flow
|
|
- name: errorf
|
|
- name: empty-block
|
|
- name: superfluous-else
|
|
- name: unused-parameter
|
|
disabled: true
|
|
- name: unreachable-code
|
|
- name: redefines-builtin-id
|
|
tagalign:
|
|
align: false
|
|
sort: true
|
|
order:
|
|
- description
|
|
- json
|
|
- toml
|
|
- yaml
|
|
- yml
|
|
- label
|
|
- label-slice-as-struct
|
|
- file
|
|
- kv
|
|
- export
|
|
testifylint:
|
|
disable:
|
|
- suite-dont-use-pkg
|
|
- require-error
|
|
- go-require
|
|
perfsprint:
|
|
err-error: true
|
|
errorf: true
|
|
sprintf1: true
|
|
strconcat: false
|
|
staticcheck:
|
|
checks:
|
|
- all
|
|
- '-SA1019'
|
|
- '-ST1000'
|
|
- '-ST1003'
|
|
- '-ST1016'
|
|
- '-ST1020'
|
|
- '-ST1021'
|
|
- '-ST1022'
|
|
- '-QF1001'
|
|
- '-QF1008' # TODO must be fixed
|
|
|
|
exclusions:
|
|
generated: lax
|
|
presets:
|
|
- comments
|
|
- std-error-handling
|
|
rules:
|
|
- path: (.+)_test.go
|
|
linters:
|
|
- canonicalheader
|
|
- fatcontext
|
|
- funlen
|
|
- goconst
|
|
- godot
|
|
- path: (.+)_test.go
|
|
text: ' always receives '
|
|
linters:
|
|
- unparam
|
|
- path: pkg/server/service/bufferpool.go
|
|
text: 'SA6002: argument should be pointer-like to avoid allocations'
|
|
- path: pkg/server/middleware/middlewares.go
|
|
text: Function 'buildConstructor' has too many statements
|
|
linters:
|
|
- funlen
|
|
- path: pkg/provider/kubernetes/ingress-nginx/kubernetes.go
|
|
text: Function 'loadConfiguration' has too many statements
|
|
linters:
|
|
- funlen
|
|
- path: pkg/tracing/haystack/logger.go
|
|
linters:
|
|
- goprintffuncname
|
|
- path: pkg/tracing/tracing.go
|
|
text: printf-like formatting function 'SetErrorWithEvent' should be named 'SetErrorWithEventf'
|
|
linters:
|
|
- goprintffuncname
|
|
- path: pkg/tls/tlsmanager_test.go
|
|
text: 'SA1019: config.ClientCAs.Subjects has been deprecated since Go 1.18'
|
|
- path: pkg/types/tls_test.go
|
|
text: 'SA1019: tlsConfig.RootCAs.Subjects has been deprecated since Go 1.18'
|
|
- path: pkg/provider/kubernetes/(crd|gateway)/client.go
|
|
linters:
|
|
- interfacebloat
|
|
- path: pkg/observability/metrics/metrics.go
|
|
linters:
|
|
- interfacebloat
|
|
- path: integration/healthcheck_test.go
|
|
text: Duplicate words \(wsp2,\) found
|
|
linters:
|
|
- dupword
|
|
- path: pkg/types/domain_test.go
|
|
text: Duplicate words \(sub\) found
|
|
linters:
|
|
- dupword
|
|
- path: pkg/provider/kubernetes/gateway/client_mock_test.go
|
|
text: 'unusedwrite: unused write to field'
|
|
linters:
|
|
- govet
|
|
- path: pkg/provider/acme/local_store.go
|
|
linters:
|
|
- musttag
|
|
- path: pkg/tls/certificate.go
|
|
text: the methods of "Certificates" use pointer receiver and non-pointer receiver.
|
|
linters:
|
|
- recvcheck
|
|
- path: pkg/config/static/static_config.go
|
|
source: 'errors.New\("Consul Catalog provider'
|
|
text: 'ST1005: error strings should not be capitalized'
|
|
- path: pkg/config/static/static_config.go
|
|
source: 'errors.New\("Consul provider'
|
|
text: 'ST1005: error strings should not be capitalized'
|
|
- path: pkg/config/static/static_config.go
|
|
source: 'errors.New\("Nomad provider'
|
|
text: 'ST1005: error strings should not be capitalized'
|
|
- path: (.+)\.go
|
|
text: 'omitzero: Omitempty has no effect on nested struct field'
|
|
linters:
|
|
- modernize
|
|
- path: (.+)\.go
|
|
text: 'struct-tag: unknown option "inline" in json tag'
|
|
linters:
|
|
- revive
|
|
- path: (.+)\.go
|
|
text: 'struct-tag: unknown option "omitzero" in toml tag'
|
|
linters:
|
|
- revive
|
|
- path: (pkg/types/.+|pkg/api/.+|pkg/observability/types/.+)\.go
|
|
text: 'var-naming: avoid meaningless package names'
|
|
linters:
|
|
- revive
|
|
- path: ((cmd|pkg)/version/.*|pkg/config/runtime/.*|pkg/log/.*|pkg/(middlewares/)?metrics/.*|pkg/muxer/http/.+|pkg/provider/http/.+|pkg/tls/.+|pkg/proxy/httputil/.+|pkg/observability/metrics/.+)\.go
|
|
text: 'var-naming: avoid package names that conflict with Go standard library package names'
|
|
linters:
|
|
- revive
|
|
- path: (.+)\.go$
|
|
text: 'SA1019: http.CloseNotifier has been deprecated' # FIXME must be fixed
|
|
- path: (.+)\.go$
|
|
text: 'SA1019: dynamic.(TCPIPWhiteList|IPWhiteList) is deprecated: please use IPAllowList instead.'
|
|
- path: (.+)\.go$
|
|
text: 'SA1019: middlewareTCP.Spec.IPWhiteList is deprecated: please use IPAllowList instead.'
|
|
- path: (.+)\.go$
|
|
text: 'SA1019: cfg.(SSLRedirect|SSLTemporaryRedirect|SSLHost|SSLForceHost|FeaturePolicy) is deprecated'
|
|
- path: (.+)\.go$
|
|
text: 'SA1019: c.Providers.(ConsulCatalog|Consul|Nomad).Namespace is deprecated'
|
|
- path: pkg/provider/kubernetes/crd/kubernetes.go
|
|
text: "Function 'loadConfigurationFromCRD' has too many statements"
|
|
linters:
|
|
- funlen
|
|
- path: pkg/plugins/middlewarewasm.go
|
|
text: 'the methods of "wasmMiddlewareBuilder" use pointer receiver and non-pointer receiver.'
|
|
linters:
|
|
- recvcheck
|
|
- path: pkg/proxy/httputil/bufferpool.go
|
|
text: 'SA6002: argument should be pointer-like to avoid allocations'
|
|
- path: integration/integration_test.go
|
|
text: 'var (gatewayAPIConformanceRunTest|ingressVersion) is unused'
|
|
- path: pkg/server/router/router.go
|
|
text: 'appendAssign: append result not assigned to the same slice'
|
|
linters:
|
|
- gocritic
|
|
paths:
|
|
- pkg/provider/kubernetes/crd/generated/
|
|
|
|
issues:
|
|
max-issues-per-linter: 0
|
|
max-same-issues: 0
|