Skip to content

Commit

Permalink
Merge branch v2.11 into v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpollet committed May 21, 2024
2 parents 5e4dc78 + f02b223 commit cff71ee
Show file tree
Hide file tree
Showing 17 changed files with 953 additions and 288 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
[All Commits](https://github.com/traefik/traefik/compare/v3.0.0-beta1...v3.0.0)

Expand Down
2 changes: 1 addition & 1 deletion docs/content/migration/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`),
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.
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:
Expand Down
24 changes: 12 additions & 12 deletions docs/content/routing/providers/kubernetes-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -899,15 +899,15 @@ More information in the dedicated [mirroring](../services/index.md#mirroring-ser

spec:
mirroring:
name: svc1
name: svc1 # svc1 receives 100% of the traffic
port: 80
mirrors:
- name: svc2
- name: svc2 # svc2 receives a copy of 20% of this traffic
port: 80
percent: 20
- name: svc3
- name: svc3 # svc3 receives a copy of 15% of this traffic
kind: TraefikService
percent: 20
percent: 15
```

```yaml tab="Mirroring Traefik Service"
Expand All @@ -920,15 +920,15 @@ More information in the dedicated [mirroring](../services/index.md#mirroring-ser

spec:
mirroring:
name: wrr1
name: wrr1 # wrr1 receives 100% of the traffic
kind: TraefikService
mirrors:
- name: svc2
port: 80
percent: 20
- name: svc3
kind: TraefikService
percent: 20
mirrors:
- name: svc2 # svc2 receives a copy of 20% of this traffic
port: 80
percent: 20
- name: svc3 # svc3 receives a copy of 10% of this traffic
kind: TraefikService
percent: 10
```

```yaml tab="K8s Service"
Expand Down
6 changes: 3 additions & 3 deletions script/gcg/traefik-bugfix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ RepositoryName = "traefik"
OutputType = "file"
FileName = "traefik_changelog.md"

# example new bugfix v2.11.2
# example new bugfix v2.11.3
CurrentRef = "v2.11"
PreviousRef = "v2.11.1"
PreviousRef = "v2.11.2"
BaseBranch = "v2.11"
FutureCurrentRefName = "v2.11.2"
FutureCurrentRefName = "v2.11.3"

ThresholdPreviousRef = 10
ThresholdCurrentRef = 10
Expand Down
3 changes: 0 additions & 3 deletions webui/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = {
env: {
node: true,
browser: true,
mocha: true,
'vue/setup-compiler-macros': true
},

Expand All @@ -18,14 +17,12 @@ module.exports = {
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/vue3-essential',
'plugin:vue/vue3-recommended',
'plugin:mocha/recommended',
'standard'
],

// required to lint *.vue files
plugins: [
'vue',
'mocha'
],

globals: {
Expand Down
13 changes: 7 additions & 6 deletions webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
"scripts": {
"transfer": "node dev/scripts/transfer.js",
"lint": "eslint --ext .js,.vue src",
"test-unit": "mocha-webpack --mode=production './src/**/*.spec.js'",
"dev": "export APP_ENV='development' && quasar dev",
"build-quasar": "quasar build",
"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: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": {
"@quasar/extras": "^1.16.9",
Expand All @@ -39,18 +41,17 @@
"@babel/eslint-parser": "^7.23.10",
"@quasar/app-vite": "^1.4.3",
"@quasar/babel-preset-app": "^2.0.2",
"@quasar/quasar-app-extension-testing-unit-vitest": "^1.0.0",
"@vue/test-utils": "^2.4.4",
"autoprefixer": "^10.4.2",
"chai": "5.0.3",
"eslint": "^8.11.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.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": {
"node": "^20 || ^18 || ^16",
Expand Down
52 changes: 26 additions & 26 deletions webui/quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { configure } = require('quasar/wrappers')

module.exports = configure(function (ctx) {
return {
eslint: {
eslint: {
warnings: true,
errors: true
},
Expand Down Expand Up @@ -122,10 +122,10 @@ module.exports = configure(function (ctx) {
build: {
// Needed to have relative assets in the index.html
// https://github.com/quasarframework/quasar/issues/8513#issuecomment-1127654470
extendViteConf(viteConf, {isServer, isClient}) {
viteConf.base = "";
extendViteConf (viteConf, { isServer, isClient }) {
viteConf.base = ''
},
viteVuePluginOptions: {
viteVuePluginOptions: {
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith('hub-')
Expand All @@ -139,13 +139,13 @@ module.exports = configure(function (ctx) {
publicPath: process.env.APP_PUBLIC_PATH || '',
env: process.env.APP_ENV === 'development'
? { // staging:
APP_ENV: process.env.APP_ENV,
APP_API: process.env.APP_API || '/api'
}
APP_ENV: process.env.APP_ENV,
APP_API: process.env.APP_API || '/api'
}
: { // production:
APP_ENV: process.env.APP_ENV,
APP_API: process.env.APP_API || '/api'
},
APP_ENV: process.env.APP_ENV,
APP_API: process.env.APP_API || '/api'
},
uglifyOptions: {
compress: {
drop_console: process.env.APP_ENV === 'production',
Expand Down Expand Up @@ -173,7 +173,7 @@ module.exports = configure(function (ctx) {
animations: [],

ssr: {
pwa: false,
pwa: false
},

pwa: {
Expand Down Expand Up @@ -201,29 +201,29 @@ module.exports = configure(function (ctx) {
theme_color: '#027be3',
icons: [
{
'src': 'icons/icon-128x128.png',
'sizes': '128x128',
'type': 'image/png'
src: 'icons/icon-128x128.png',
sizes: '128x128',
type: 'image/png'
},
{
'src': 'icons/icon-192x192.png',
'sizes': '192x192',
'type': 'image/png'
src: 'icons/icon-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
'src': 'icons/icon-256x256.png',
'sizes': '256x256',
'type': 'image/png'
src: 'icons/icon-256x256.png',
sizes: '256x256',
type: 'image/png'
},
{
'src': 'icons/icon-384x384.png',
'sizes': '384x384',
'type': 'image/png'
src: 'icons/icon-384x384.png',
sizes: '384x384',
type: 'image/png'
},
{
'src': 'icons/icon-512x512.png',
'sizes': '512x512',
'type': 'image/png'
src: 'icons/icon-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions webui/quasar.extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"@quasar/testing-unit-vitest": {
"options": []
}
}
4 changes: 2 additions & 2 deletions webui/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ make clean-webui generate-webui # Generate static contents in `webui/static/` fo

## 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

Expand Down Expand Up @@ -57,7 +57,7 @@ make clean-webui generate-webui # Generate static contents in `webui/static/` fo

- [Node](https://nodejs.org)
- [Yarn](https://yarnpkg.com/)
- [Webpack](https://github.com/webpack/webpack)
- [Quasar](https://quasar.dev/)
- [Vue](https://vuejs.org/)
- [Bulma](https://bulma.io)
- [D3](https://d3js.org)
Expand Down
11 changes: 5 additions & 6 deletions webui/src/components/_commons/PanelMiddlewares.vue
Original file line number Diff line number Diff line change
Expand Up @@ -809,12 +809,11 @@
<div class="text-subtitle2">
Content Security Policy
</div>
<q-chip
dense
class="app-chip app-chip-green"
>
{{ exData(middleware).contentSecurityPolicy }}
</q-chip>
<q-card class="app-chip app-chip-green app-card-as-chip">
<q-card-section>
{{ exData(middleware).contentSecurityPolicy }}
</q-card-section>
</q-card>
</div>
</div>
</q-card-section>
Expand Down
8 changes: 8 additions & 0 deletions webui/src/css/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ body {
border-radius: 8px;
}

.app-card-as-chip {
box-shadow: none;

.q-card__section {
padding: 5px !important;
}
}

// Chips
.app-chip {
border-radius: 8px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'chai'
import { describe, expect, it } from 'vitest'
import store from './index.js'

const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'chai'
import { describe, expect, it } from 'vitest'
import store from './index.js'

const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect } from 'chai'
import { describe, expect, it } from 'vitest'
import store from './index.js'

const {
Expand Down
1 change: 1 addition & 0 deletions webui/test/vitest/setup-file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// This file will be run before each test file
24 changes: 24 additions & 0 deletions webui/vitest.config.mjs
Original file line number Diff line number Diff line change
@@ -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(),
],
});
Loading

0 comments on commit cff71ee

Please sign in to comment.