Merge branch v2.11 into v3.0

This commit is contained in:
kevinpollet 2024-05-21 16:24:57 +02:00
commit cff71ee496
No known key found for this signature in database
GPG key ID: 0C9A5DDD1B292453
17 changed files with 952 additions and 287 deletions

View file

@ -1,3 +1,19 @@
## [v2.11.3](https://github.com/traefik/traefik/tree/v2.11.3) (2024-05-17)
[All Commits](https://github.com/traefik/traefik/compare/v2.11.2...v2.11.3)
**Bug fixes:**
- **[server]** Remove deadlines for non-TLS connections ([#10615](https://github.com/traefik/traefik/pull/10615) by [rtribotte](https://github.com/rtribotte))
- **[webui]** Display of Content Security Policy values getting out of screen ([#10710](https://github.com/traefik/traefik/pull/10710) by [brandonfl](https://github.com/brandonfl))
- **[webui]** Fix provider icon size ([#10621](https://github.com/traefik/traefik/pull/10621) by [framebassman](https://github.com/framebassman))
**Documentation:**
- **[k8s/crd]** Fix migration/v2.md ([#10658](https://github.com/traefik/traefik/pull/10658) by [stemar94](https://github.com/stemar94))
- **[k8s/gatewayapi]** Fix HTTPRoute use of backendRefs ([#10630](https://github.com/traefik/traefik/pull/10630) by [sakaru](https://github.com/sakaru))
- **[k8s/gatewayapi]** Fix HTTPRoute path type ([#10629](https://github.com/traefik/traefik/pull/10629) by [sakaru](https://github.com/sakaru))
- **[k8s]** Improve mirroring example on Kubernetes ([#10701](https://github.com/traefik/traefik/pull/10701) by [mloiseleur](https://github.com/mloiseleur))
- Consistent entryPoints capitalization in CLI flag usage ([#10650](https://github.com/traefik/traefik/pull/10650) by [jnoordsij](https://github.com/jnoordsij))
- Fix unfinished migration sentence for v2.11.2 ([#10633](https://github.com/traefik/traefik/pull/10633) by [kevinpollet](https://github.com/kevinpollet))
## [v3.0.0](https://github.com/traefik/traefik/tree/v3.0.0) (2024-04-29) ## [v3.0.0](https://github.com/traefik/traefik/tree/v3.0.0) (2024-04-29)
[All Commits](https://github.com/traefik/traefik/compare/v3.0.0-beta1...v3.0.0) [All Commits](https://github.com/traefik/traefik/compare/v3.0.0-beta1...v3.0.0)

View file

@ -513,7 +513,7 @@ In `v2.10`, the Kubernetes CRDs API Group `traefik.containo.us` is deprecated, a
As the Kubernetes CRD provider still works with both API Versions (`traefik.io/v1alpha1` and `traefik.containo.us/v1alpha1`), As the Kubernetes CRD provider still works with both API Versions (`traefik.io/v1alpha1` and `traefik.containo.us/v1alpha1`),
it means that for the same kind, namespace and name, the provider will only keep the `traefik.io/v1alpha1` resource. it means that for the same kind, namespace and name, the provider will only keep the `traefik.io/v1alpha1` resource.
In addition, the Kubernetes CRDs API Version `traefik.io/v1alpha1` will not be supported in Traefik v3 itself. In addition, the Kubernetes CRDs API Version `traefik.containo.us/v1alpha1` will not be supported in Traefik v3 itself.
Please note that it is a requirement to update the CRDs and the RBAC in the cluster before upgrading Traefik. Please note that it is a requirement to update the CRDs and the RBAC in the cluster before upgrading Traefik.
To do so, please apply the required [CRDs](https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml) and [RBAC](https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml) manifests for v2.10: To do so, please apply the required [CRDs](https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml) and [RBAC](https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml) manifests for v2.10:

View file

@ -899,15 +899,15 @@ More information in the dedicated [mirroring](../services/index.md#mirroring-ser
spec: spec:
mirroring: mirroring:
name: svc1 name: svc1 # svc1 receives 100% of the traffic
port: 80 port: 80
mirrors: mirrors:
- name: svc2 - name: svc2 # svc2 receives a copy of 20% of this traffic
port: 80 port: 80
percent: 20 percent: 20
- name: svc3 - name: svc3 # svc3 receives a copy of 15% of this traffic
kind: TraefikService kind: TraefikService
percent: 20 percent: 15
``` ```
```yaml tab="Mirroring Traefik Service" ```yaml tab="Mirroring Traefik Service"
@ -920,15 +920,15 @@ More information in the dedicated [mirroring](../services/index.md#mirroring-ser
spec: spec:
mirroring: mirroring:
name: wrr1 name: wrr1 # wrr1 receives 100% of the traffic
kind: TraefikService kind: TraefikService
mirrors: mirrors:
- name: svc2 - name: svc2 # svc2 receives a copy of 20% of this traffic
port: 80 port: 80
percent: 20 percent: 20
- name: svc3 - name: svc3 # svc3 receives a copy of 10% of this traffic
kind: TraefikService kind: TraefikService
percent: 20 percent: 10
``` ```
```yaml tab="K8s Service" ```yaml tab="K8s Service"

View file

@ -4,11 +4,11 @@ RepositoryName = "traefik"
OutputType = "file" OutputType = "file"
FileName = "traefik_changelog.md" FileName = "traefik_changelog.md"
# example new bugfix v2.11.2 # example new bugfix v2.11.3
CurrentRef = "v2.11" CurrentRef = "v2.11"
PreviousRef = "v2.11.1" PreviousRef = "v2.11.2"
BaseBranch = "v2.11" BaseBranch = "v2.11"
FutureCurrentRefName = "v2.11.2" FutureCurrentRefName = "v2.11.3"
ThresholdPreviousRef = 10 ThresholdPreviousRef = 10
ThresholdCurrentRef = 10 ThresholdCurrentRef = 10

View file

@ -9,7 +9,6 @@ module.exports = {
env: { env: {
node: true, node: true,
browser: true, browser: true,
mocha: true,
'vue/setup-compiler-macros': true 'vue/setup-compiler-macros': true
}, },
@ -18,14 +17,12 @@ module.exports = {
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules. // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/vue3-essential', 'plugin:vue/vue3-essential',
'plugin:vue/vue3-recommended', 'plugin:vue/vue3-recommended',
'plugin:mocha/recommended',
'standard' 'standard'
], ],
// required to lint *.vue files // required to lint *.vue files
plugins: [ plugins: [
'vue', 'vue',
'mocha'
], ],
globals: { globals: {

View file

@ -8,12 +8,14 @@
"scripts": { "scripts": {
"transfer": "node dev/scripts/transfer.js", "transfer": "node dev/scripts/transfer.js",
"lint": "eslint --ext .js,.vue src", "lint": "eslint --ext .js,.vue src",
"test-unit": "mocha-webpack --mode=production './src/**/*.spec.js'",
"dev": "export APP_ENV='development' && quasar dev", "dev": "export APP_ENV='development' && quasar dev",
"build-quasar": "quasar build", "build-quasar": "quasar build",
"build-staging": "export NODE_ENV='production' && export APP_ENV='development' && yarn build-quasar", "build-staging": "export NODE_ENV='production' && export APP_ENV='development' && yarn build-quasar",
"build": "export NODE_ENV='production' && export APP_ENV='production' && yarn build-quasar && yarn transfer spa", "build": "export NODE_ENV='production' && export APP_ENV='production' && yarn build-quasar && yarn transfer spa",
"build:nc": "yarn build" "build:nc": "yarn build",
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
"test:unit": "vitest",
"test:unit:ci": "vitest run"
}, },
"dependencies": { "dependencies": {
"@quasar/extras": "^1.16.9", "@quasar/extras": "^1.16.9",
@ -39,18 +41,17 @@
"@babel/eslint-parser": "^7.23.10", "@babel/eslint-parser": "^7.23.10",
"@quasar/app-vite": "^1.4.3", "@quasar/app-vite": "^1.4.3",
"@quasar/babel-preset-app": "^2.0.2", "@quasar/babel-preset-app": "^2.0.2",
"@quasar/quasar-app-extension-testing-unit-vitest": "^1.0.0",
"@vue/test-utils": "^2.4.4", "@vue/test-utils": "^2.4.4",
"autoprefixer": "^10.4.2", "autoprefixer": "^10.4.2",
"chai": "5.0.3",
"eslint": "^8.11.0", "eslint": "^8.11.0",
"eslint-config-standard": "^17.0.0", "eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.19.1", "eslint-plugin-import": "^2.19.1",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-n": "^16.6.2", "eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.0.0", "eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^9.0.0", "eslint-plugin-vue": "^9.0.0",
"mocha": "^10.2.0", "postcss": "^8.4.14",
"postcss": "^8.4.14" "vitest": "^1.3.1"
}, },
"engines": { "engines": {
"node": "^20 || ^18 || ^16", "node": "^20 || ^18 || ^16",

View file

@ -122,8 +122,8 @@ module.exports = configure(function (ctx) {
build: { build: {
// Needed to have relative assets in the index.html // Needed to have relative assets in the index.html
// https://github.com/quasarframework/quasar/issues/8513#issuecomment-1127654470 // https://github.com/quasarframework/quasar/issues/8513#issuecomment-1127654470
extendViteConf(viteConf, {isServer, isClient}) { extendViteConf (viteConf, { isServer, isClient }) {
viteConf.base = ""; viteConf.base = ''
}, },
viteVuePluginOptions: { viteVuePluginOptions: {
template: { template: {
@ -173,7 +173,7 @@ module.exports = configure(function (ctx) {
animations: [], animations: [],
ssr: { ssr: {
pwa: false, pwa: false
}, },
pwa: { pwa: {
@ -201,29 +201,29 @@ module.exports = configure(function (ctx) {
theme_color: '#027be3', theme_color: '#027be3',
icons: [ icons: [
{ {
'src': 'icons/icon-128x128.png', src: 'icons/icon-128x128.png',
'sizes': '128x128', sizes: '128x128',
'type': 'image/png' type: 'image/png'
}, },
{ {
'src': 'icons/icon-192x192.png', src: 'icons/icon-192x192.png',
'sizes': '192x192', sizes: '192x192',
'type': 'image/png' type: 'image/png'
}, },
{ {
'src': 'icons/icon-256x256.png', src: 'icons/icon-256x256.png',
'sizes': '256x256', sizes: '256x256',
'type': 'image/png' type: 'image/png'
}, },
{ {
'src': 'icons/icon-384x384.png', src: 'icons/icon-384x384.png',
'sizes': '384x384', sizes: '384x384',
'type': 'image/png' type: 'image/png'
}, },
{ {
'src': 'icons/icon-512x512.png', src: 'icons/icon-512x512.png',
'sizes': '512x512', sizes: '512x512',
'type': 'image/png' type: 'image/png'
} }
] ]
} }

View file

@ -0,0 +1,5 @@
{
"@quasar/testing-unit-vitest": {
"options": []
}
}

View file

@ -20,7 +20,7 @@ make clean-webui generate-webui # Generate static contents in `webui/static/` fo
## How to build (only for frontend developer) ## How to build (only for frontend developer)
- prerequisite: [Node 12.11+](https://nodejs.org) [Yarn](https://yarnpkg.com/) - prerequisite: [Node 20.11+](https://nodejs.org) [Yarn 1.22.19](https://yarnpkg.com/)
- Go to the `webui/` directory - Go to the `webui/` directory
@ -57,7 +57,7 @@ make clean-webui generate-webui # Generate static contents in `webui/static/` fo
- [Node](https://nodejs.org) - [Node](https://nodejs.org)
- [Yarn](https://yarnpkg.com/) - [Yarn](https://yarnpkg.com/)
- [Webpack](https://github.com/webpack/webpack) - [Quasar](https://quasar.dev/)
- [Vue](https://vuejs.org/) - [Vue](https://vuejs.org/)
- [Bulma](https://bulma.io) - [Bulma](https://bulma.io)
- [D3](https://d3js.org) - [D3](https://d3js.org)

View file

@ -809,12 +809,11 @@
<div class="text-subtitle2"> <div class="text-subtitle2">
Content Security Policy Content Security Policy
</div> </div>
<q-chip <q-card class="app-chip app-chip-green app-card-as-chip">
dense <q-card-section>
class="app-chip app-chip-green"
>
{{ exData(middleware).contentSecurityPolicy }} {{ exData(middleware).contentSecurityPolicy }}
</q-chip> </q-card-section>
</q-card>
</div> </div>
</div> </div>
</q-card-section> </q-card-section>

View file

@ -121,6 +121,14 @@ body {
border-radius: 8px; border-radius: 8px;
} }
.app-card-as-chip {
box-shadow: none;
.q-card__section {
padding: 5px !important;
}
}
// Chips // Chips
.app-chip { .app-chip {
border-radius: 8px; border-radius: 8px;

View file

@ -1,4 +1,4 @@
import { expect } from 'chai' import { describe, expect, it } from 'vitest'
import store from './index.js' import store from './index.js'
const { const {

View file

@ -1,4 +1,4 @@
import { expect } from 'chai' import { describe, expect, it } from 'vitest'
import store from './index.js' import store from './index.js'
const { const {

View file

@ -1,4 +1,4 @@
import { expect } from 'chai' import { describe, expect, it } from 'vitest'
import store from './index.js' import store from './index.js'
const { const {

View file

@ -0,0 +1 @@
// This file will be run before each test file

24
webui/vitest.config.mjs Normal file
View file

@ -0,0 +1,24 @@
import { defineConfig } from 'vitest/config';
import vue from '@vitejs/plugin-vue';
import { quasar, transformAssetUrls } from '@quasar/vite-plugin';
import jsconfigPaths from 'vite-jsconfig-paths';
// https://vitejs.dev/config/
export default defineConfig({
test: {
environment: 'happy-dom',
setupFiles: 'test/vitest/setup-file.js',
include: [
// Matches vitest tests in any subfolder of 'src' or into 'test/vitest/__tests__'
// Matches all files with extension 'js', 'jsx', 'ts' and 'tsx'
'src/**/*.vitest.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
],
},
plugins: [
vue({
template: { transformAssetUrls },
}),
quasar(),
jsconfigPaths(),
],
});

File diff suppressed because it is too large Load diff