diff --git a/charts/shlink-backend/CHANGELOG.md b/charts/shlink-backend/CHANGELOG.md index 6432816e5..01986dc33 100644 --- a/charts/shlink-backend/CHANGELOG.md +++ b/charts/shlink-backend/CHANGELOG.md @@ -1,7 +1,18 @@ # shlink-backend -## 4.5.5 +## 5.0.0 ### Added -- Changelog +- option to define image registry (image.registry) +- options to define the configuration (config.*) + +### Changed + +- app version to 4.4.0 +- dependency to mariadb to 20.2.1 +- dependency to mysql to 12.2.2 +- dependency to postgresql to 16.4.5 +- dependency to rabbitmq to 15.2.3 +- dependency to redis to 20.6.3 +- option to define additional environment variables (extraEnv) diff --git a/charts/shlink-backend/Chart.yaml b/charts/shlink-backend/Chart.yaml index 3a4c1b639..459f2ec95 100644 --- a/charts/shlink-backend/Chart.yaml +++ b/charts/shlink-backend/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: shlink-backend description: A PHP-based self-hosted URL shortener that can be used to serve shortened URLs under your own domain. type: application -version: 4.5.5 -appVersion: "3.7.4" +version: 5.0.0 +appVersion: "4.4.0" home: https://github.com/christianhuth/helm-charts icon: https://shlink.io/images/shlink-logo-blue.svg maintainers: @@ -14,29 +14,45 @@ sources: - https://shlink.io dependencies: - name: mariadb - repository: https://charts.bitnami.com/bitnami - version: 16.5.0 + repository: oci://registry-1.docker.io/bitnamicharts + version: 20.2.1 condition: mariadb.enabled - name: mysql - repository: https://charts.bitnami.com/bitnami - version: 9.23.0 + repository: oci://registry-1.docker.io/bitnamicharts + version: 12.2.2 condition: mysql.enabled - name: postgresql - repository: https://charts.bitnami.com/bitnami - version: 14.3.3 + repository: oci://registry-1.docker.io/bitnamicharts + version: 16.4.5 condition: postgresql.enabled - name: rabbitmq - repository: https://charts.bitnami.com/bitnami - version: 12.15.0 + repository: oci://registry-1.docker.io/bitnamicharts + version: 15.2.3 condition: rabbitmq.enabled - name: redis - repository: https://charts.bitnami.com/bitnami - version: 18.19.4 + repository: oci://registry-1.docker.io/bitnamicharts + version: 20.6.3 condition: redis.enabled annotations: artifacthub.io/changes: | + - kind: changed + description: app version to 4.4.0 + - kind: changed + description: dependency to mariadb to 20.2.1 + - kind: changed + description: dependency to mysql to 12.2.2 + - kind: changed + description: dependency to postgresql to 16.4.5 + - kind: changed + description: dependency to rabbitmq to 15.2.3 + - kind: changed + description: dependency to redis to 20.6.3 + - kind: changed + description: option to define additional environment variables (extraEnv) - kind: added - description: Changelog + description: option to define image registry (image.registry) + - kind: added + description: options to define the configuration (config.*) artifacthub.io/signKey: | fingerprint: EE24F8BB6D099E78FD704F83B5ECDBCDDD485D0E url: https://charts.christianhuth.de/public.key diff --git a/charts/shlink-backend/README.md b/charts/shlink-backend/README.md index dcb156e8a..b400fae53 100644 --- a/charts/shlink-backend/README.md +++ b/charts/shlink-backend/README.md @@ -51,14 +51,82 @@ The command removes all the Kubernetes components associated with the chart and | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | -| env[0].name | string | `"DEFAULT_DOMAIN"` | | -| env[0].value | string | `"doma.in"` | | -| env[1].name | string | `"IS_HTTPS_ENABLED"` | | -| env[1].value | string | `"false"` | | +| config.database.auth.database | string | `""` | The database name to be used when using an external database driver. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled | +| config.database.auth.existingSecret | string | `""` | Use existing secret for password details (`config.database.auth.password` will be ignored and picked up from this secret). The secret has to contain the key `database-password`. | +| config.database.auth.password | string | `""` | The password credential to be used when using an external database driver. | +| config.database.auth.username | string | `""` | The username credential to be used when using an external database driver. | +| config.database.driver | string | `"sqlite"` | mysql, maria, postgres or sqlite. Will be set automatically when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled | +| config.database.host | string | `""` | The host name of the database server when using an external database driver. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled | +| config.database.port | int | `0` | The port in which the database service is running when using an external database driver. Default value is based on the value provided for DB_DRIVER. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled | +| config.database.useEncryption | bool | `false` | Whether it is desired to use an encrypted connection with the database or not | +| config.general.basePath | string | `""` | The base path from which you plan to serve Shlink, in case you don’t want to serve it from the root of the domain. It has to start with a bar, like /shlink. Defaults to ''. | +| config.general.cacheNamespace | string | `""` | A prefix used for all cache keys generated by Shlink. It’s important to set a unique value here if you have multiple Shlink instances sharing the same cache store (same server when not using redis, or same redis cluster), otherwise there could be collisions. Defaults to Shlink. | +| config.general.defaultDomain | string | `""` | The default short domain used for this Shlink instance. For example s.test. | +| config.general.initialApiKey | string | `""` | An API key that will be created once during container start-up, with admin permissions. | +| config.general.isHttpsEnabled | bool | `false` | Tells if Shlink is served with https or not (true or false). It’s still up to you to actually serve it with HTTPS. | +| config.general.memoryLimit | string | `""` | The maximum amount of memory that every Shlink process can use. You can provide a number, which will be the amount of memory in bytes, or a number followed by K for kilobytes, M for megabytes or G for gigabytes. You can also provide -1 to set no memory limit. Defaults to 512M. | +| config.general.timezone | string | `""` | A timezone code as defined [in this list](https://www.php.net/manual/en/timezones.php). All dates stored by Shlink (visits, short URL creation, etc) will be considered to be on this timezone. By default, the default timezone set in PHP config will be used, which is UTC in the case of the docker image. | +| config.geolite.licenseKey | string | `""` | The license key used to download new GeoLite2 database files. Go to GeoLite2 license key to know how to generate it. Not providing a license key will completely disable visits geolocation. | +| config.geolite.skipInitialDownload | bool | `false` | If provided with value true, it will skip the initial GeoLite2 db file download, speeding-up the container start-up. As a side effect, first visits on this container will remain un-located until the file finishes downloading in background. | +| config.matomo.auth.apiToken | string | `""` | The API token so that Shlink can call Matomo’s API | +| config.matomo.auth.existingSecret | string | `""` | Use existing secret for the API token details (`config.matomo.auth.apiToken` will be ignored and picked up from this secret). The secret has to contain the key `api-token`. | +| config.matomo.baseUrl | string | `""` | The external Matomo server URL. | +| config.matomo.enabled | bool | `false` | Enable the Matomo integration to sent visits | +| config.matomo.siteId | string | `""` | The site ID to be used for Shlink visits. | +| config.mercure.auth.existingSecret | string | `""` | Use existing secret for the JWT secret details (`config.mercure.auth.jwtSecret` will be ignored and picked up from this secret). The secret has to contain the key `jwt-secret`. | +| config.mercure.auth.jwtSecret | string | `""` | The secret key that was provided to the mercure hub server, in order to be able to generate valid JWTs for publishing/subscribing to that server. | +| config.mercure.enabled | bool | `false` | Enable the Mercure Hub integration. | +| config.mercure.internalHubUrl | string | `""` | An internal URL for a mercure hub. Will be used only when publishing updates to mercure, and does not need to be public. | +| config.mercure.publicHubUrl | string | `""` | The public URL of a mercure hub server to which Shlink will sent updates. This URL will also be served to consumers that want to subscribe to those updates. | +| config.qrCodes.codeForDisabledShortUrls | bool | `true` | Whether generating QR codes should work for disabled short URLs. Disabled short URLs are those which reached the maximum amount of visits, have a validSince date in the future, or a validUntil date in the past. | +| config.qrCodes.defaultColors.background | string | `"#FFFFFF"` | The QR code background color. | +| config.qrCodes.defaultColors.foreground | string | `"#000000"` | The QR code foreground color. | +| config.qrCodes.defaultErrorCorrection | string | `"l"` | One of L (Low), M (Medium), Q (Quartile) or H (High), to determine the default error correction of generated QR codes when the errorCorrection query param is not provided. | +| config.qrCodes.defaultFormat | string | `"png"` | One of png or svg, to determine the default format of generated QR codes when the format query param is not provided. | +| config.qrCodes.defaultLogoUrl | string | `""` | A URL pointing to a logo that will be placed in the middle of the QR code. This one is experimental, as some images might break the QR code. | +| config.qrCodes.defaultMargin | int | `0` | A value greater than 0 to determine the default margin of generated QR codes when the margin query param is not provided. | +| config.qrCodes.defaultRoundBlockSize | bool | `true` | Tells if the block size should be round on QR codes, making it more readable, but potentially adding some extra margin as a side effect. | +| config.qrCodes.defaultSize | int | `300` | A value between 50 and 1000 to determine the default size of generated QR codes when the size query param is not provided. | +| config.rabbitmq.auth.existingSecret | string | `""` | Use existing secret for password details (`config.rabbitmq.auth.password` will be ignored and picked up from this secret). The secret has to contain the key `rabbitmq-password`. | +| config.rabbitmq.auth.password | string | `""` | The password credential to be used when using an external database driver. | +| config.rabbitmq.auth.username | string | `""` | The username credential to be used when using an external database driver. | +| config.rabbitmq.enabled | bool | `false` | enable RabbitMQ™ Integration | +| config.rabbitmq.host | string | `""` | The RabbitMQ server host name | +| config.rabbitmq.useSsl | bool | `false` | Whether connection is encrypted with SSL/TLS or not. | +| config.rabbitmq.vhost | string | `"/"` | The RabbitMQ server VHost | +| config.redirects.cacheLifetime | int | `30` | Allows to set the amount of seconds that redirects should be cached when redirect status is 301 or 308. | +| config.redirects.defaultBaseUrlRedirect | string | `""` | If a URL is provided here, when a user tries to access Shlink’s base URL, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page. | +| config.redirects.defaultInvalidShortUrlRedirect | string | `""` | If a URL is provided here, when a user tries to access an invalid short URL, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page. | +| config.redirects.defaultRegular404Redirect | string | `""` | If a URL is provided here, when a user tries to access a URL not matching any supported by the router, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page. | +| config.redirects.extraPathMode | string | `"default"` | Determines how Shlink should match short URLs when they start with a known short code. Valid values are default, append and ignore. (See [Extra path forwarding](https://shlink.io/documentation/some-features/#extra-path-forwarding) for more info). | +| config.redirects.statusCode | int | `302` | 301, 302, 308 or 307 (last two since v3.5.0). Determines the status code that should be used on redirects from short to long URLs. Setting 308 or 307 implicitly makes requests to short URLs work regardless the HTTP method. | +| config.redis.enabled | bool | `false` | enable Redis™ Integration | +| config.redis.pubSubEnabled | bool | `false` | Tells if the configured redis instance/cluster should also be used to publish real-time updates via redis pub/sub. | +| config.redis.sentinal.enabled | bool | `false` | | +| config.redis.sentinal.service | string | `""` | The name of the sentinel service if you want to use redis sentinel. If this value is provided, the servers provided in config.redis.servers will be considered sentinel instances. | +| config.redis.servers | string | `""` | The comma-separated list of Redis servers when using external Redis servers. Will be ignored when you activate one of the integrated Redis subchart with redis.enabled | +| config.robots.allowAllShortUrls | bool | `false` | Whether all short URLs should be allowed via robots.txt or not. If set to true, the crawlable option set in individual short URLs will be ignored. | +| config.robots.userAgents | string | `"*"` | A comma-separated list of allowed user agents via robots.txt. | +| config.trackingVisits.anonymizeRemoteAddr | bool | `true` | Tells if IP addresses from visitors should be obfuscated before storing them in the database. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. | +| config.trackingVisits.disable | bool | `false` | Tells if visits tracking should be completely disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. | +| config.trackingVisits.disableIpTracking | bool | `false` | Tells if tracking of the IP address (and therefore visitors location) should be disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. | +| config.trackingVisits.disableReferrerTracking | bool | `false` | Tells if tracking of the referrer should be disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. | +| config.trackingVisits.disableTrackingFrom | string | `""` | A comma-separated list of IP address patterns from which all tracking should be disabled. It allows providing fixed IP addresses (100.200.80.40), CIDR blocks (192.168.10.0/24) or wildcard patterns (11.22.*.*) | +| config.trackingVisits.disableTrackingParam | string | `""` | The name of a query param that can be used to visit short URLs avoiding the visit to be tracked. This feature won’t be available if no value is provided. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. | +| config.trackingVisits.disableUaTracking | bool | `false` | Tells if tracking of the user agent should be disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. | +| config.trackingVisits.trackOrphanVisits | bool | `true` | Tells if orphan visits should be tracked or not. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. | +| config.urlShortening.autoResolveTitles | bool | `true` | Used to automatically resolve the short URL’s title based on the title-tag in the long URL | +| config.urlShortening.defaultShortCodesLength | int | `5` | The length you want generated short codes to have. It defaults to 5 and has to be at least 4, so any value smaller than that will fall back to 4. | +| config.urlShortening.deleteShortUrlThreshold | string | `""` | The amount of visits on short URLs which will not allow them to be deleted. If not provided, this restriction will be disabled. | +| config.urlShortening.multiSegmentSlugsEnabled | bool | `false` | Allows to create and handle multi-segment custom slugs when true is provided. See [multi-segment custom slugs](https://shlink.io/documentation/some-features/#multi-segment-custom-slugs) for more information. | +| config.urlShortening.shortUrlMode | string | `"strict"` | Determines how to match short URLs. Valid values are strict or loose. See [short URLs mode](https://shlink.io/documentation/some-features/#short-urls-mode) for more information. | +| config.urlShortening.shortUrlTrailingSlash | bool | `false` | Allows to enable support for trailing slashes in short URLs when true is provided. See [short URLs trailing slash](https://shlink.io/documentation/some-features/#short-urls-trailing-slash) for more information. | +| extraEnv | list | `[]` | additional environment variables to be added to the pods. See https://shlink.io/documentation/environment-variables for a complete list. | | fullnameOverride | string | `""` | String to fully override `"shlink-backend.fullname"` | | image.pullPolicy | string | `"Always"` | image pull policy | +| image.registry | string | `"docker.io"` | image registry | | image.repository | string | `"shlinkio/shlink"` | image repository | -| image.tag | string | `"3.7.4"` | Overrides the image tag | +| image.tag | string | `"4.4.0"` | Overrides the image tag | | imagePullSecrets | list | `[]` | If defined, uses a Secret to pull an image from a private Docker registry or repository. | | ingress.annotations | object | `{}` | | | ingress.className | string | `""` | | @@ -67,31 +135,34 @@ The command removes all the Kubernetes components associated with the chart and | ingress.hosts[0].paths[0].path | string | `"/"` | | | ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | | ingress.tls | list | `[]` | | -| mariadb.auth.database | string | `"shlink"` | | -| mariadb.auth.password | string | `"shlink"` | | -| mariadb.auth.username | string | `"shlink"` | | -| mariadb.enabled | bool | `false` | | -| mysql.auth.database | string | `"shlink"` | | -| mysql.auth.password | string | `"shlink"` | | -| mysql.auth.username | string | `"shlink"` | | -| mysql.enabled | bool | `false` | | +| mariadb.auth.database | string | `"shlink"` | The database name to be used when using the integrated MariaDB database. | +| mariadb.auth.password | string | `"shlink"` | The password credential to be used when using the integrated MariaDB database. | +| mariadb.auth.username | string | `"shlink"` | The username credential to be used when using the integrated MariaDB database. | +| mariadb.enabled | bool | `false` | enable integrated MariaDB™ subchart from Bitnami | +| mysql.auth.database | string | `"shlink"` | The database name to be used when using the integrated MySQL database. | +| mysql.auth.password | string | `"shlink"` | The password credential to be used when using the integrated MySQL database. | +| mysql.auth.username | string | `"shlink"` | The username credential to be used when using the integrated MySQL database. | +| mysql.enabled | bool | `false` | enable integrated MySQL™ subchart from Bitnami | | nameOverride | string | `""` | Provide a name in place of `shlink-backend` | | nodeSelector | object | `{}` | Node labels for pod assignment | | podAnnotations | object | `{}` | Annotations to be added to pods | | podLabels | object | `{}` | Labels to be added to pods | | podSecurityContext | object | `{}` | pod-level security context | -| postgresql.auth.database | string | `"shlink"` | | -| postgresql.auth.password | string | `"shlink"` | | -| postgresql.auth.username | string | `"shlink"` | | -| postgresql.enabled | bool | `false` | | -| rabbitmq.enabled | bool | `false` | | -| redis.auth.enabled | bool | `false` | | -| redis.enabled | bool | `false` | | +| postgresql.auth.database | string | `"shlink"` | The database name to be used when using the integrated PostgreSQL database. | +| postgresql.auth.password | string | `"shlink"` | The password credential to be used when using the integrated PostgreSQL database. | +| postgresql.auth.username | string | `"shlink"` | The username credential to be used when using the integrated PostgreSQL database. | +| postgresql.enabled | bool | `false` | enable integrated PostgreSQL™ subchart from Bitnami | +| rabbitmq.enabled | bool | `false` | enable integrated RabbitMQ™ subchart from Bitnami | +| redis.architecture | string | `"standalone"` | Redis™ architecture. Allowed values: `standalone` or `replication` | +| redis.auth.enabled | bool | `false` | Enable password authentication | +| redis.auth.sentinel | bool | `false` | Enable password authentication on Redis™ Sentinels | +| redis.enabled | bool | `false` | enable integrated Redis™ subchart from Bitnami | +| redis.sentinel.enabled | bool | `false` | Use Redis™ Sentinel on Redis™ pods | | replicaCount | int | `1` | Number of replicas | | resources | object | `{}` | Resource limits and requests for the headwind pods. | | revisionHistoryLimit | int | `10` | The number of old ReplicaSets to retain | | securityContext | object | `{}` | container-level security context | -| service.port | int | `80` | Kubernetes port where service is exposed | +| service.port | int | `8080` | Kubernetes port where service is exposed | | service.type | string | `"ClusterIP"` | Kubernetes service type | | serviceAccount.annotations | object | `{}` | Annotations to add to the service account | | serviceAccount.create | bool | `true` | Specifies whether a service account should be created | @@ -108,6 +179,20 @@ helm install my-release -f values.yaml christianhuth/shlink-backend ## Upgrading the Chart +### To 5.0.0 + +This major updates the following dependencies: + +- MariaDB to its newest major, 20.2.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/mariadb#to-2020) you can find more information about the changes introduced in that version. +- MySQL to its newest major, 12.2.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/mysql#to-1220) you can find more information about the changes introduced in that version. +- PostgreSQL to its newest major, 16.3.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/postgresql#to-1630) you can find more information about the changes introduced in that version. +- RabbitMQ to its newest major, 15.2.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/rabbitmq#to-1520) you can find more information about the changes introduced in that version. +- Redis to its newest major, 20.5.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/redis#to-2050) you can find more information about the changes introduced in that version. + +It also upgrades the Shlink Backend to its newest major, 4.4.0 and introduces a new way to define the configuration using the `config.*` Values. +If you have been using the `env` attribute so far to configure Shlink it is strongly recommended to migrate to the corresponding `config.*` Value. +The `env` attribute further has been replaced by an `extraEnv` attribute. + ### To 4.0.0 This major updates the PostgreSQL subchart to its newest major, 14.0.0. [Here](https://github.com/bitnami/charts/tree/master/bitnami/postgresql#to-1400) you can find more information about the changes introduced in that version. diff --git a/charts/shlink-backend/README.md.gotmpl b/charts/shlink-backend/README.md.gotmpl index b57e3d466..1fc4ca392 100644 --- a/charts/shlink-backend/README.md.gotmpl +++ b/charts/shlink-backend/README.md.gotmpl @@ -53,6 +53,20 @@ helm install my-release -f values.yaml christianhuth/shlink-backend ## Upgrading the Chart +### To 5.0.0 + +This major updates the following dependencies: + +- MariaDB to its newest major, 20.2.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/mariadb#to-2020) you can find more information about the changes introduced in that version. +- MySQL to its newest major, 12.2.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/mysql#to-1220) you can find more information about the changes introduced in that version. +- PostgreSQL to its newest major, 16.3.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/postgresql#to-1630) you can find more information about the changes introduced in that version. +- RabbitMQ to its newest major, 15.2.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/rabbitmq#to-1520) you can find more information about the changes introduced in that version. +- Redis to its newest major, 20.5.0: [Here](https://github.com/bitnami/charts/tree/main/bitnami/redis#to-2050) you can find more information about the changes introduced in that version. + +It also upgrades the Shlink Backend to its newest major, 4.4.0 and introduces a new way to define the configuration using the `config.*` Values. +If you have been using the `env` attribute so far to configure Shlink it is strongly recommended to migrate to the corresponding `config.*` Value. +The `env` attribute further has been replaced by an `extraEnv` attribute. + ### To 4.0.0 This major updates the PostgreSQL subchart to its newest major, 14.0.0. [Here](https://github.com/bitnami/charts/tree/master/bitnami/postgresql#to-1400) you can find more information about the changes introduced in that version. diff --git a/charts/shlink-backend/ci/00-sqlite-values.yaml b/charts/shlink-backend/ci/00-sqlite-values.yaml new file mode 100644 index 000000000..ed97d539c --- /dev/null +++ b/charts/shlink-backend/ci/00-sqlite-values.yaml @@ -0,0 +1 @@ +--- diff --git a/charts/shlink-backend/ci/01-mariadb-values.yaml b/charts/shlink-backend/ci/01-mariadb-values.yaml new file mode 100644 index 000000000..a4c88595d --- /dev/null +++ b/charts/shlink-backend/ci/01-mariadb-values.yaml @@ -0,0 +1,3 @@ +--- +mariadb: + enabled: true diff --git a/charts/shlink-backend/ci/02-mysql-values.yaml b/charts/shlink-backend/ci/02-mysql-values.yaml new file mode 100644 index 000000000..ab4187ef2 --- /dev/null +++ b/charts/shlink-backend/ci/02-mysql-values.yaml @@ -0,0 +1,3 @@ +--- +mysql: + enabled: true diff --git a/charts/shlink-backend/ci/03-postgresql-values.yaml b/charts/shlink-backend/ci/03-postgresql-values.yaml new file mode 100644 index 000000000..334482a3d --- /dev/null +++ b/charts/shlink-backend/ci/03-postgresql-values.yaml @@ -0,0 +1,3 @@ +--- +postgresql: + enabled: true diff --git a/charts/shlink-backend/ci/04-integrations-values.yaml b/charts/shlink-backend/ci/04-integrations-values.yaml new file mode 100644 index 000000000..7945767a4 --- /dev/null +++ b/charts/shlink-backend/ci/04-integrations-values.yaml @@ -0,0 +1,14 @@ +--- +config: + matomo: + enabled: true + auth: + apiToken: "a-test-api-tokeen" + baseUrl: "my-matomo.com" + siteId: "SMj6N3zV5eK0Y8dO7TXG41I9LvfDoRl2" + mercure: + enabled: true + auth: + jwtSecret: "a-test-jwt-secret" + publicHubUrl: "my-public-mercure-hub.com" + internalHubUrl: "my-internal-mercure-hub.com" diff --git a/charts/shlink-backend/ci/05-rabbitmq-values.yaml b/charts/shlink-backend/ci/05-rabbitmq-values.yaml new file mode 100644 index 000000000..bc7c7f197 --- /dev/null +++ b/charts/shlink-backend/ci/05-rabbitmq-values.yaml @@ -0,0 +1,5 @@ +--- +rabbitmq: + enabled: true + auth: + password: my-test-password diff --git a/charts/shlink-backend/ci/06-redis-values.yaml b/charts/shlink-backend/ci/06-redis-values.yaml new file mode 100644 index 000000000..f94feb642 --- /dev/null +++ b/charts/shlink-backend/ci/06-redis-values.yaml @@ -0,0 +1,3 @@ +--- +redis: + enabled: true diff --git a/charts/shlink-backend/templates/database/_database.tpl b/charts/shlink-backend/templates/database/_database.tpl new file mode 100644 index 000000000..45a7fd2be --- /dev/null +++ b/charts/shlink-backend/templates/database/_database.tpl @@ -0,0 +1,144 @@ +{{/* +Define the database driver +*/}} +{{- define "shlink-backend.database.driver" -}} +{{- $driver := "" -}} +{{- if .Values.mariadb.enabled -}} + {{- $driver = "maria" -}} +{{- else if .Values.mysql.enabled -}} + {{- $driver = "mysql" -}} +{{- else if .Values.postgresql.enabled -}} + {{- $driver = "postgres" -}} +{{- else -}} + {{- $driver = .Values.config.database.driver -}} +{{- end -}} +{{- if not $driver -}} + {{- fail "Unable to determine the database driver. Use config.database.driver or activate one of the integrated databases" -}} +{{- end -}} +{{- $driver -}} +{{- end }} + +{{/* +Define the database host +*/}} +{{- define "shlink-backend.database.host" -}} +{{- $host := "" -}} +{{- if .Values.mariadb.enabled -}} + {{- $host = (include "mariadb.primary.fullname" .Subcharts.mariadb) -}} +{{- else if .Values.mysql.enabled -}} + {{- $host = (include "mysql.primary.fullname" .Subcharts.mysql) -}} +{{- else if .Values.postgresql.enabled -}} + {{- $host = (include "postgresql.v1.primary.fullname" .Subcharts.postgresql) -}} +{{- else -}} + {{- $host = .Values.config.database.host -}} +{{- end -}} +{{- if and (not $host) (not (eq (include "shlink-backend.database.driver" .) "sqlite")) -}} + {{- fail "Unable to determine the database host. Use config.database.host or activate one of the integrated databases" -}} +{{- end -}} +{{- $host -}} +{{- end }} + +{{/* +Define the database port +*/}} +{{- define "shlink-backend.database.port" -}} +{{- $port := "" -}} +{{- if .Values.mariadb.enabled -}} + {{- $port = .Values.mariadb.primary.service.ports.mysql -}} +{{- else if .Values.mysql.enabled -}} + {{- $port = .Values.mysql.primary.service.ports.mysql -}} +{{- else if .Values.postgresql.enabled -}} + {{- $port = (include "postgresql.v1.service.port" .Subcharts.postgresql) -}} +{{- else -}} + {{- $port = .Values.config.database.port -}} +{{- end -}} +{{- if not $port -}} + {{- $driver := (include "shlink-backend.database.driver" .) -}} + {{- if (eq $driver "maria") -}} + {{- $port = 3306 -}} + {{- else if (eq $driver "mysql") -}} + {{- $port = 3306 -}} + {{- else if (eq $driver "postgres") -}} + {{- $port = 5432 -}} + {{- else if (eq $driver "sqlite") -}} + {{- $port = 0 -}} + {{- end -}} +{{- end -}} +{{- $port -}} +{{- end }} + +{{/* +Define the database username +*/}} +{{- define "shlink-backend.database.auth.username" -}} +{{- $username := "" -}} +{{- if .Values.mariadb.enabled -}} + {{- $username = .Values.mariadb.auth.username -}} +{{- else if .Values.mysql.enabled -}} + {{- $username = .Values.mysql.auth.username -}} +{{- else if .Values.postgresql.enabled -}} + {{- $username = (include "postgresql.v1.username" .Subcharts.postgresql) -}} +{{- else -}} + {{- $username = .Values.config.database.auth.username -}} +{{- end -}} +{{- if not $username -}} + {{- fail "Unable to determine the database username. Use config.database.auth.username or activate one of the integrated databases" -}} +{{- end -}} +{{- $username -}} +{{- end }} + +{{/* +Define the name of the database +*/}} +{{- define "shlink-backend.database.auth.database" -}} +{{- $database := "" -}} +{{- if .Values.mariadb.enabled -}} + {{- $database = .Values.mariadb.auth.database -}} +{{- else if .Values.mysql.enabled -}} + {{- $database = .Values.mysql.auth.database -}} +{{- else if .Values.postgresql.enabled -}} + {{- $database = (include "postgresql.v1.database" .Subcharts.postgresql) -}} +{{- else -}} + {{- $database = .Values.config.database.auth.database -}} +{{- end -}} +{{- if not $database -}} + {{- fail "Unable to determine the database name. Use config.database.auth.database or activate one of the integrated databases" -}} +{{- end -}} +{{- $database -}} +{{- end }} + +{{/* +Get the name of the secret containing the database password +*/}} +{{- define "shlink-backend.database.auth.secretName" -}} +{{- $secretName := "" -}} +{{- if .Values.mariadb.enabled -}} + {{- $secretName = (include "mariadb.secretName" .Subcharts.mariadb) -}} +{{- else if .Values.mysql.enabled -}} + {{- $secretName = (include "mysql.secretName" .Subcharts.mysql) -}} +{{- else if .Values.postgresql.enabled -}} + {{- $secretName = (include "postgresql.v1.secretName" .Subcharts.postgresql) -}} +{{- else if .Values.config.database.auth.existingSecret -}} + {{- $secretName = .Values.config.database.auth.existingSecret -}} +{{- else -}} + {{- $secretName = printf "%s-database" (include "shlink-backend.fullname" .) -}} +{{- end -}} +{{- $secretName -}} +{{- end -}} + +{{/* +Get the key of the secret containing the database password +*/}} +{{- define "shlink-backend.database.auth.secretKey" -}} +{{- $secretKey := "" -}} +{{- if .Values.mariadb.enabled -}} + {{- $secretKey = "mariadb-password" -}} +{{- else if .Values.mysql.enabled -}} + {{- $secretKey = "mysql-password" -}} +{{- else if .Values.postgresql.enabled -}} + {{- $secretKey = (include "postgresql.v1.userPasswordKey" .Subcharts.postgresql) -}} +{{- else -}} + {{- $secretKey = "database-password" -}} +{{- end -}} +{{- $secretKey -}} +{{- end -}} diff --git a/charts/shlink-backend/templates/database/secret.yaml b/charts/shlink-backend/templates/database/secret.yaml new file mode 100644 index 000000000..0092cbd75 --- /dev/null +++ b/charts/shlink-backend/templates/database/secret.yaml @@ -0,0 +1,11 @@ +{{- if and (not .Values.mariadb.enabled) (not .Values.mysql.enabled) (not .Values.postgresql.enabled) (not .Values.config.database.auth.existingSecret) -}} +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + {{- include "shlink-backend.labels" . | nindent 4 }} + name: {{ include "shlink-backend.database.auth.secretName" . }} +data: + {{- include "shlink-backend.database.auth.secretKey" . | nindent 2 }}: {{ .Values.config.database.auth.password | b64enc }} +{{- end }} diff --git a/charts/shlink-backend/templates/deployment.yaml b/charts/shlink-backend/templates/deployment.yaml deleted file mode 100644 index 9f4133ee6..000000000 --- a/charts/shlink-backend/templates/deployment.yaml +++ /dev/null @@ -1,149 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "shlink-backend.fullname" . }} - labels: - {{- include "shlink-backend.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} - selector: - matchLabels: - {{- include "shlink-backend.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "shlink-backend.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "shlink-backend.serviceAccountName" . }} - {{- with .Values.podSecurityContext }} - securityContext: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - {{- with .Values.securityContext }} - securityContext: - {{- toYaml . | nindent 12 }} - {{- end }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - {{- toYaml .Values.env | nindent 12 }} - # MariaDB Settings - {{- if and .Values.mariadb.enabled (not .Values.mysql.enabled) (not .Values.postgresql.enabled) }} - - name: DB_DRIVER - value: mariadb - - name: DB_HOST - value: {{ include "mariadb.primary.fullname" .Subcharts.mariadb }} - - name: DB_PORT - value: {{ coalesce .Values.mariadb.primary.service.ports.mysql .Values.mariadb.primary.service.port | quote }} - - name: DB_NAME - value: {{ .Values.mariadb.auth.database | quote }} - - name: DB_USER - value: {{ .Values.mariadb.auth.username | quote }} - - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" .Subcharts.mariadb }} - key: mariadb-password - {{- end }} - # MySQL Settings - {{- if and (not .Values.mariadb.enabled) .Values.mysql.enabled (not .Values.postgresql.enabled) }} - - name: DB_DRIVER - value: mysql - - name: DB_HOST - value: {{ include "mysql.primary.fullname" .Subcharts.mysql }} - - name: DB_PORT - value: {{ .Values.mysql.primary.service.ports.mysql | quote }} - - name: DB_NAME - value: {{ .Values.mysql.auth.database | quote }} - - name: DB_USER - value: {{ .Values.mysql.auth.username | quote }} - - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mysql.secretName" .Subcharts.mysql }} - key: mysql-password - {{- end }} - # PostgreSQL Settings - {{- if and (not .Values.mariadb.enabled) (not .Values.mysql.enabled) .Values.postgresql.enabled }} - - name: DB_DRIVER - value: postgres - - name: DB_HOST - value: {{ include "postgresql.v1.primary.fullname" .Subcharts.postgresql }} - - name: DB_PORT - value: {{ include "postgresql.v1.service.port" .Subcharts.postgresql | quote }} - - name: DB_NAME - value: {{ include "postgresql.v1.database" .Subcharts.postgresql }} - - name: DB_USER - value: {{ include "postgresql.v1.username" .Subcharts.postgresql }} - - name: DB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "postgresql.v1.secretName" .Subcharts.postgresql }} - key: {{ template "postgresql.v1.userPasswordKey" .Subcharts.postgresql }} - {{- end }} - # RabbitMQ Settings - {{- if .Values.rabbitmq.enabled }} - - name: RABBITMQ_ENABLED - value: "true" - - name: RABBITMQ_HOST - value: {{ include "common.names.fullname" .Subcharts.rabbitmq | quote }} - - name: RABBITMQ_PORT - {{- if or (.Values.rabbitmq.service.portEnabled) (not .Values.rabbitmq.auth.tls.enabled) }} - value: {{ .Values.rabbitmq.service.ports.amqp | quote }} - {{- else if .Values.rabbitmq.auth.tls.enabled }} - value: {{ .Values.rabbitmq.service.ports.amqpTls | quote }} - {{- end }} - - name: RABBITMQ_USER - value: {{ .Values.rabbitmq.auth.username | quote }} - - name: RABBITMQ_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "rabbitmq.secretPasswordName" .Subcharts.rabbitmq }} - key: rabbitmq-password - {{- end }} - # Redis Settings - {{- if .Values.redis.enabled }} - - name: REDIS_SERVERS - value: {{ printf "%s-master" (include "common.names.fullname" .Subcharts.redis) }}:{{ .Values.redis.master.service.ports.redis }} - {{- end }} - ports: - - name: http - containerPort: 8080 - protocol: TCP - livenessProbe: - httpGet: - path: /rest/health - port: http - readinessProbe: - httpGet: - path: /rest/health - port: http - {{- with .Values.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/shlink-backend/templates/matomo/_matomo.tpl b/charts/shlink-backend/templates/matomo/_matomo.tpl new file mode 100644 index 000000000..f9d0fd6a5 --- /dev/null +++ b/charts/shlink-backend/templates/matomo/_matomo.tpl @@ -0,0 +1,23 @@ +{{/* +Define if the Matomo integration is enabled +*/}} +{{- define "shlink-backend.matomo.enabled" -}} +{{- $enabled := "" -}} +{{- if .Values.config.matomo.enabled -}} + {{- $enabled = "true" -}} +{{- end }} +{{- $enabled -}} +{{- end }} + +{{/* +Get the name of the secret containing the API token +*/}} +{{- define "shlink-backend.matomo.auth.secretName" -}} +{{- $secretName := "" -}} +{{- if .Values.config.matomo.auth.existingSecret -}} + {{- $secretName = .Values.config.matomo.auth.existingSecret -}} +{{- else -}} + {{- $secretName = printf "%s-matomo" (include "shlink-backend.fullname" .) -}} +{{- end -}} +{{- $secretName -}} +{{- end -}} diff --git a/charts/shlink-backend/templates/matomo/secret.yaml b/charts/shlink-backend/templates/matomo/secret.yaml new file mode 100644 index 000000000..37d48edc4 --- /dev/null +++ b/charts/shlink-backend/templates/matomo/secret.yaml @@ -0,0 +1,11 @@ +{{- if and (include "shlink-backend.matomo.enabled" .) (not .Values.config.matomo.auth.existingSecret) -}} +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + {{- include "shlink-backend.labels" . | nindent 4 }} + name: {{ include "shlink-backend.matomo.auth.secretName" . }} +data: + api-token: {{ .Values.config.matomo.auth.apiToken | b64enc }} +{{- end }} diff --git a/charts/shlink-backend/templates/mercure/_mercure.tpl b/charts/shlink-backend/templates/mercure/_mercure.tpl new file mode 100644 index 000000000..270fe9743 --- /dev/null +++ b/charts/shlink-backend/templates/mercure/_mercure.tpl @@ -0,0 +1,23 @@ +{{/* +Define if the Mercure integration is enabled +*/}} +{{- define "shlink-backend.mercure.enabled" -}} +{{- $enabled := "" -}} +{{- if .Values.config.mercure.enabled -}} + {{- $enabled = "true" -}} +{{- end }} +{{- $enabled -}} +{{- end }} + +{{/* +Get the name of the secret containing the API token +*/}} +{{- define "shlink-backend.mercure.auth.secretName" -}} +{{- $secretName := "" -}} +{{- if .Values.config.mercure.auth.existingSecret -}} + {{- $secretName = .Values.config.mercure.auth.existingSecret -}} +{{- else -}} + {{- $secretName = printf "%s-mercure" (include "shlink-backend.fullname" .) -}} +{{- end -}} +{{- $secretName -}} +{{- end -}} diff --git a/charts/shlink-backend/templates/mercure/secret.yaml b/charts/shlink-backend/templates/mercure/secret.yaml new file mode 100644 index 000000000..d9677e9f0 --- /dev/null +++ b/charts/shlink-backend/templates/mercure/secret.yaml @@ -0,0 +1,11 @@ +{{- if and (include "shlink-backend.mercure.enabled" .) (not .Values.config.mercure.auth.existingSecret) -}} +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + {{- include "shlink-backend.labels" . | nindent 4 }} + name: {{ include "shlink-backend.mercure.auth.secretName" . }} +data: + jwt-secret: {{ .Values.config.mercure.auth.jwtSecret | b64enc }} +{{- end }} diff --git a/charts/shlink-backend/templates/rabbitmq/_rabbitmq.tpl b/charts/shlink-backend/templates/rabbitmq/_rabbitmq.tpl new file mode 100644 index 000000000..df9987ce6 --- /dev/null +++ b/charts/shlink-backend/templates/rabbitmq/_rabbitmq.tpl @@ -0,0 +1,77 @@ +{{/* +Define if the RabbitMQ integration is enabled +*/}} +{{- define "shlink-backend.rabbitmq.enabled" -}} +{{- $enabled := "" -}} +{{- if or (.Values.rabbitmq.enabled) (.Values.config.rabbitmq.enabled) -}} + {{- $enabled = "true" -}} +{{- end }} +{{- $enabled -}} +{{- end }} + +{{/* +Get the name of the secret containing the RabbitMQ password +*/}} +{{- define "shlink-backend.rabbitmq.auth.secretName" -}} +{{- $secretName := "" -}} +{{- if .Values.rabbitmq.enabled -}} + {{- $secretName = (include "rabbitmq.secretPasswordName" .Subcharts.rabbitmq) -}} +{{- else if .Values.config.rabbitmq.auth.existingSecret -}} + {{- $secretName = .Values.config.rabbitmq.auth.existingSecret -}} +{{- else -}} + {{- $secretName = printf "%s-rabbitmq" (include "shlink-backend.fullname" .) -}} +{{- end -}} +{{- $secretName -}} +{{- end -}} + +{{/* +Define the RabbitMQ username +*/}} +{{- define "shlink-backend.rabbitmq.auth.username" -}} +{{- $username := "" -}} +{{- if .Values.rabbitmq.enabled -}} + {{- $username = .Values.rabbitmq.auth.username -}} +{{- else -}} + {{- $username = .Values.config.rabbitmq.auth.username -}} +{{- end -}} +{{- if not $username -}} + {{- fail "Unable to determine the RabbitMQ username. Use config.rabbitmq.auth.username or activate the integrated RabbitMQ subchart." -}} +{{- end -}} +{{- $username -}} +{{- end }} + +{{/* +Define the RabbitMQ host +*/}} +{{- define "shlink-backend.rabbitmq.host" -}} +{{- $host := "" -}} +{{- if .Values.rabbitmq.enabled -}} + {{- $host = (include "common.names.fullname" .Subcharts.rabbitmq) -}} +{{- else -}} + {{- $host = .Values.config.rabbitmq.host -}} +{{- end -}} +{{- if not $host -}} + {{- fail "Unable to determine the RabbitMQ host. Use config.rabbitmq.host or activate the integrated RabbitMQ subchart." -}} +{{- end -}} +{{- $host -}} +{{- end }} + +{{/* +Define the RabbitMQ port +*/}} +{{- define "shlink-backend.rabbitmq.port" -}} +{{- $port := "" -}} +{{- if .Values.rabbitmq.enabled -}} + {{- if or (.Values.rabbitmq.service.portEnabled) (not .Values.rabbitmq.auth.tls.enabled) }} + {{ $port = .Values.rabbitmq.service.ports.amqp }} + {{- else if .Values.rabbitmq.auth.tls.enabled }} + {{ $port = .Values.rabbitmq.service.ports.amqpTls }} + {{- end }} +{{- else -}} + {{- $port = .Values.config.rabbitmq.port -}} +{{- end -}} +{{- if not $port -}} + {{- fail "Unable to determine the RabbitMQ port. Use config.rabbitmq.port or activate the integrated RabbitMQ subchart." -}} +{{- end -}} +{{- $port -}} +{{- end }} diff --git a/charts/shlink-backend/templates/rabbitmq/secret.yaml b/charts/shlink-backend/templates/rabbitmq/secret.yaml new file mode 100644 index 000000000..7b2095e6a --- /dev/null +++ b/charts/shlink-backend/templates/rabbitmq/secret.yaml @@ -0,0 +1,11 @@ +{{- if and (not .Values.rabbitmq.enabled) (.Values.config.rabbitmq.auth.existingSecret) -}} +--- +apiVersion: v1 +kind: Secret +metadata: + labels: + {{- include "shlink-backend.labels" . | nindent 4 }} + name: {{ include "shlink-backend.rabbitmq.auth.secretName" . }} +data: + rabbitmq-password: {{ .Values.config.rabbitmq.auth.password | b64enc }} +{{- end }} diff --git a/charts/shlink-backend/templates/redis/_redis.tpl b/charts/shlink-backend/templates/redis/_redis.tpl new file mode 100644 index 000000000..dc673bb17 --- /dev/null +++ b/charts/shlink-backend/templates/redis/_redis.tpl @@ -0,0 +1,61 @@ +{{/* +Define if the Redis integration is enabled +*/}} +{{- define "shlink-backend.redis.enabled" -}} +{{- $enabled := "" -}} +{{- if or (.Values.redis.enabled) (.Values.config.redis.enabled) -}} + {{- $enabled = "true" -}} +{{- end }} +{{- $enabled -}} +{{- end }} + +{{/* +Define the redis servers +*/}} +{{- define "shlink-backend.redis.servers" -}} +{{- $servers := "" -}} +{{- if .Values.redis.enabled -}} + {{- $host := (include "common.names.fullname" .Subcharts.redis) -}} + {{- $port := (.Values.redis.master.service.ports.redis | toString) -}} + {{- if (include "shlink-backend.redis.sentinal.enabled" .) -}} + {{- $servers = (printf "%s:%s" $host $port) -}} + {{- else -}} + {{- $servers = (printf "%s-master:%s" $host $port) -}} + {{- end -}} +{{- else -}} + {{- $servers = .Values.config.redis.servers -}} +{{- end -}} +{{- if not $servers -}} + {{- fail "Unable to determine the list of redis server. Use config.redis.servers or activate the integrated Redis subchart." -}} +{{- end -}} +{{- $servers -}} +{{- end }} + +{{/* +Define the redis sentinal service is enabled +*/}} +{{- define "shlink-backend.redis.sentinal.enabled" -}} +{{- $enabled := "" -}} +{{- if or (.Values.redis.sentinel.enabled) (.Values.config.redis.sentinal.enabled) -}} + {{- $enabled = "true" -}} +{{- end }} +{{- $enabled -}} +{{- end }} + +{{/* +Define the redis sentinal service +*/}} +{{- define "shlink-backend.redis.sentinal.service" -}} +{{- $sentinalService := "" -}} +{{- if .Values.redis.enabled -}} + {{- $host := (include "common.names.fullname" .Subcharts.redis) -}} + {{- $port := (.Values.redis.sentinel.containerPorts.sentinel | toString) -}} + {{- $sentinalService = (printf "%s:%s" $host $port) -}} +{{- else -}} + {{- $sentinalService = .Values.config.redis.sentinalService -}} +{{- end -}} +{{- if not $sentinalService -}} + {{- fail "Unable to determine the name of the redis sentinal service. Use config.redis.sentinal.service or activate the integrated Redis subchart." -}} +{{- end -}} +{{- $sentinalService -}} +{{- end }} diff --git a/charts/shlink-backend/templates/shlink-backend/deployment.yaml b/charts/shlink-backend/templates/shlink-backend/deployment.yaml new file mode 100644 index 000000000..48b0a06e0 --- /dev/null +++ b/charts/shlink-backend/templates/shlink-backend/deployment.yaml @@ -0,0 +1,320 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + {{- include "shlink-backend.labels" . | nindent 4 }} + name: {{ include "shlink-backend.fullname" . }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + selector: + matchLabels: + {{- include "shlink-backend.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "shlink-backend.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "shlink-backend.serviceAccountName" . }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + # Database Settings + - name: DB_DRIVER + value: {{ include "shlink-backend.database.driver" . | quote }} + {{- if not (eq (include "shlink-backend.database.driver" .) "sqlite") }} + - name: DB_HOST + value: {{ include "shlink-backend.database.host" . | quote }} + - name: DB_NAME + value: {{ include "shlink-backend.database.auth.database" . | quote }} + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "shlink-backend.database.auth.secretName" . | quote }} + key: {{ include "shlink-backend.database.auth.secretKey" . | quote }} + - name: DB_PORT + value: {{ include "shlink-backend.database.port" . | quote }} + - name: DB_USE_ENCRYPTION + value: {{ .Values.config.database.useEncryption | quote }} + - name: DB_USER + value: {{ include "shlink-backend.database.auth.username" . | quote }} + {{- end }} + + # Docker Settings + - name: PORT + value: {{ .Values.service.port | quote }} + + # General Settings + {{- if .Values.config.general.basePath }} + - name: BASE_PATH + value: {{ .Values.config.general.basePath | quote }} + {{- end }} + {{- if .Values.config.general.cacheNamespace }} + - name: CACHE_NAMESPACE + value: {{ .Values.config.general.cacheNamespace | quote }} + {{- end }} + {{- if .Values.config.general.defaultDomain }} + - name: DEFAULT_DOMAIN + value: {{ .Values.config.general.defaultDomain | quote }} + {{- end }} + {{- if .Values.config.general.initialApiKey }} + - name: INITIAL_API_KEY + value: {{ .Values.config.general.initialApiKey | quote }} + {{- end }} + - name: IS_HTTPS_ENABLED + value: {{ .Values.config.general.isHttpsEnabled | quote }} + {{- if .Values.config.general.memoryLimit }} + - name: MEMORY_LIMIT + value: {{ .Values.config.general.memoryLimit | quote }} + {{- end }} + {{- if .Values.config.general.timezone }} + - name: TIMEZONE + value: {{ .Values.config.general.timezone | quote }} + {{- end }} + + # Geolite Settings + {{- if .Values.config.geolite.licenseKey }} + - name: GEOLITE_LICENSE_KEY + value: {{ .Values.config.geolite.licenseKey | quote }} + {{- end }} + - name: SKIP_INITIAL_GEOLITE_DOWNLOAD + value: {{ .Values.config.geolite.skipInitialDownload | quote }} + + {{- if (include "shlink-backend.matomo.enabled" .) }} + # Matomo Settings + - name: MATOMO_ENABLED + value: {{ (include "shlink-backend.matomo.enabled" .) | quote }} + {{- if or (.Values.config.matomo.auth.apiToken) (.Values.config.matomo.auth.existingSecret) }} + - name: MATOMO_API_TOKEN + valueFrom: + secretKeyRef: + name: {{ include "shlink-backend.matomo.auth.secretName" . }} + key: api-token + {{- end }} + {{- if .Values.config.matomo.baseUrl }} + - name: MATOMO_BASE_URL + value: {{ .Values.config.matomo.baseUrl | quote }} + {{- end }} + {{- if .Values.config.matomo.siteId }} + - name: MATOMO_SITE_ID + value: {{ .Values.config.matomo.siteId | quote }} + {{- end }} + {{- end }} + + {{- if (include "shlink-backend.mercure.enabled" .) }} + # Mercure Hub Settings + {{- if .Values.config.mercure.internalHubUrl }} + - name: MERCURE_INTERNAL_HUB_URL + value: {{ .Values.config.mercure.internalHubUrl | quote }} + {{- end }} + {{- if or (.Values.config.mercure.auth.jwtSecret) (.Values.config.mercure.auth.existingSecret) }} + - name: MERCURE_JWT_SECRET + valueFrom: + secretKeyRef: + name: {{ include "shlink-backend.mercure.auth.secretName" . }} + key: jwt-secret + {{- end }} + {{- if .Values.config.mercure.publicHubUrl }} + - name: MERCURE_PUBLIC_HUB_URL + value: {{ .Values.config.mercure.publicHubUrl | quote }} + {{- end }} + {{- end }} + + # QR Codes Settings + {{- if .Values.config.qrCodes.defaultColors.background }} + - name: DEFAULT_QR_CODE_BG_COLOR + value: {{ .Values.config.qrCodes.defaultColors.background | quote }} + {{- end }} + {{- if .Values.config.qrCodes.defaultColors.foreground }} + - name: DEFAULT_QR_CODE_COLOR + value: {{ .Values.config.qrCodes.defaultColors.foreground | quote }} + {{- end }} + {{- if .Values.config.qrCodes.defaultErrorCorrection }} + - name: DEFAULT_QR_CODE_ERROR_CORRECTION + value: {{ .Values.config.qrCodes.defaultErrorCorrection | quote }} + {{- end }} + {{- if .Values.config.qrCodes.defaultFormat }} + - name: DEFAULT_QR_CODE_FORMAT + value: {{ .Values.config.qrCodes.defaultFormat | quote }} + {{- end }} + {{- if .Values.config.qrCodes.defaultLogoUrl }} + - name: DEFAULT_QR_CODE_LOGO_URL + value: {{ .Values.config.qrCodes.defaultLogoUrl | quote }} + {{- end }} + {{- if .Values.config.qrCodes.defaultMargin }} + - name: DEFAULT_QR_CODE_MARGIN + value: {{ .Values.config.qrCodes.defaultMargin | quote }} + {{- end }} + {{- if .Values.config.qrCodes.defaultSize }} + - name: DEFAULT_QR_CODE_SIZE + value: {{ .Values.config.qrCodes.defaultSize | quote }} + {{- end }} + - name: DEFAULT_QR_CODE_ROUND_BLOCK_SIZE + value: {{ .Values.config.qrCodes.defaultRoundBlockSize | quote }} + - name: QR_CODE_FOR_DISABLED_SHORT_URLS + value: {{ .Values.config.qrCodes.codeForDisabledShortUrls | quote }} + + {{- if (include "shlink-backend.rabbitmq.enabled" .) }} + # RabbitMQ Settings + - name: RABBITMQ_ENABLED + value: {{ (include "shlink-backend.rabbitmq.enabled" .) | quote }} + - name: RABBITMQ_HOST + value: {{ (include "shlink-backend.rabbitmq.host" .) | quote }} + - name: RABBITMQ_PASSWORD + valueFrom: + secretKeyRef: + name: {{ include "shlink-backend.rabbitmq.auth.secretName" . }} + key: rabbitmq-password + - name: RABBITMQ_PORT + value: {{ (include "shlink-backend.rabbitmq.port" .) | quote }} + - name: RABBITMQ_USER + value: {{ (include "shlink-backend.rabbitmq.auth.username" .) | quote }} + - name: RABBITMQ_USE_SSL + value: {{ .Values.config.rabbitmq.useSsl | quote }} + {{- if .Values.config.rabbitmq.vhost }} + - name: RABBITMQ_VHOST + value: {{ .Values.config.rabbitmq.vhost | quote }} + {{- end }} + {{- end }} + + # Redirects Settings + {{- if .Values.config.redirects.defaultBaseUrlRedirect }} + - name: DEFAULT_BASE_URL_REDIRECT + value: {{ .Values.config.redirects.defaultBaseUrlRedirect | quote }} + {{- end }} + {{- if .Values.config.redirects.defaultInvalidShortUrlRedirect }} + - name: DEFAULT_INVALID_SHORT_URL_REDIRECT + value: {{ .Values.config.redirects.defaultInvalidShortUrlRedirect | quote }} + {{- end }} + {{- if .Values.config.redirects.defaultRegular404Redirect }} + - name: DEFAULT_REGULAR_404_REDIRECT + value: {{ .Values.config.redirects.defaultRegular404Redirect | quote }} + {{- end }} + {{- if .Values.config.redirects.cacheLifetime }} + - name: REDIRECT_CACHE_LIFETIME + value: {{ .Values.config.redirects.cacheLifetime | quote }} + {{- end }} + {{- if .Values.config.redirects.extraPathMode }} + - name: REDIRECT_EXTRA_PATH_MODE + value: {{ .Values.config.redirects.extraPathMode | quote }} + {{- end }} + {{- if .Values.config.redirects.statusCode }} + - name: REDIRECT_STATUS_CODE + value: {{ .Values.config.redirects.statusCode | quote }} + {{- end }} + + {{- if (include "shlink-backend.redis.enabled" .) }} + # Redis Settings + - name: REDIS_PUB_SUB_ENABLED + value: {{ .Values.config.redis.pubSubEnabled | quote }} + {{- if (include "shlink-backend.redis.sentinal.enabled" .) }} + - name: REDIS_SENTINEL_SERVICE + value: {{ include "shlink-backend.redis.sentinal.service" . | quote }} + {{- end }} + - name: REDIS_SERVERS + value: {{ include "shlink-backend.redis.servers" . | quote }} + {{- end }} + + # Robot.txt Settings + - name: ROBOTS_ALLOW_ALL_SHORT_URLS + value: {{ .Values.config.robots.allowAllShortUrls | quote }} + {{- if .Values.config.robots.userAgents }} + - name: ROBOTS_USER_AGENTS + value: {{ .Values.config.robots.userAgents | quote }} + {{- end }} + + # URL Shortening Settings + - name: AUTO_RESOLVE_TITLES + value: {{ .Values.config.urlShortening.autoResolveTitles | quote }} + {{- if .Values.config.urlShortening.defaultShortCodesLength }} + - name: DEFAULT_SHORT_CODES_LENGTH + value: {{ .Values.config.urlShortening.defaultShortCodesLength | quote }} + {{- end }} + {{- if .Values.config.urlShortening.deleteShortUrlThreshold }} + - name: DELETE_SHORT_URL_THRESHOLD + value: {{ .Values.config.urlShortening.deleteShortUrlThreshold | quote }} + {{- end }} + - name: MULTI_SEGMENT_SLUGS_ENABLED + value: {{ .Values.config.urlShortening.multiSegmentSlugsEnabled | quote }} + {{- if .Values.config.urlShortening.shortUrlMode }} + - name: SHORT_URL_MODE + value: {{ .Values.config.urlShortening.shortUrlMode | quote }} + {{- end }} + - name: SHORT_URL_TRAILING_SLASH + value: {{ .Values.config.urlShortening.shortUrlTrailingSlash | quote }} + + # Visits Tracking Settings + - name: ANONYMIZE_REMOTE_ADDR + value: {{ .Values.config.trackingVisits.anonymizeRemoteAddr | quote }} + - name: DISABLE_IP_TRACKING + value: {{ .Values.config.trackingVisits.disableIpTracking | quote }} + - name: DISABLE_REFERRER_TRACKING + value: {{ .Values.config.trackingVisits.disableReferrerTracking | quote }} + - name: DISABLE_TRACKING + value: {{ .Values.config.trackingVisits.disabled | quote }} + {{- if .Values.config.trackingVisits.disableTrackingFrom }} + - name: DISABLE_TRACKING_FROM + value: {{ .Values.config.trackingVisits.disableTrackingFrom | quote }} + {{- end }} + {{- if .Values.config.trackingVisits.disableTrackingParam }} + - name: DISABLE_TRACK_PARAM + value: {{ .Values.config.trackingVisits.disableTrackingParam | quote }} + {{- end }} + - name: DISABLE_UA_TRACKING + value: {{ .Values.config.trackingVisits.disableUaTracking | quote }} + - name: TRACK_ORPHAN_VISITS + value: {{ .Values.config.trackingVisits.trackOrphanVisits | quote }} + + {{- if .Values.extraEnv }} + # Extra Environment Variables + {{- .Values.extraEnv | toYaml | nindent 12 }} + {{- end }} + ports: + - name: http + containerPort: {{ .Values.service.port | int }} + protocol: TCP + livenessProbe: + httpGet: + path: /rest/health + port: http + readinessProbe: + httpGet: + path: /rest/health + port: http + {{- with .Values.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/shlink-backend/templates/hpa.yaml b/charts/shlink-backend/templates/shlink-backend/hpa.yaml similarity index 100% rename from charts/shlink-backend/templates/hpa.yaml rename to charts/shlink-backend/templates/shlink-backend/hpa.yaml index 30d8b3c9a..428c3abc0 100644 --- a/charts/shlink-backend/templates/hpa.yaml +++ b/charts/shlink-backend/templates/shlink-backend/hpa.yaml @@ -6,9 +6,9 @@ apiVersion: autoscaling/v2beta1 {{- end }} kind: HorizontalPodAutoscaler metadata: - name: {{ include "shlink-backend.fullname" . }} labels: {{- include "shlink-backend.labels" . | nindent 4 }} + name: {{ include "shlink-backend.fullname" . }} spec: scaleTargetRef: apiVersion: apps/v1 diff --git a/charts/shlink-backend/templates/ingress.yaml b/charts/shlink-backend/templates/shlink-backend/ingress.yaml similarity index 100% rename from charts/shlink-backend/templates/ingress.yaml rename to charts/shlink-backend/templates/shlink-backend/ingress.yaml index 34e075307..09d6b4e9c 100644 --- a/charts/shlink-backend/templates/ingress.yaml +++ b/charts/shlink-backend/templates/shlink-backend/ingress.yaml @@ -15,13 +15,13 @@ apiVersion: extensions/v1beta1 {{- end }} kind: Ingress metadata: - name: {{ $fullName }} - labels: - {{- include "shlink-backend.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} + labels: + {{- include "shlink-backend.labels" . | nindent 4 }} + name: {{ $fullName }} spec: {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} ingressClassName: {{ .Values.ingress.className }} diff --git a/charts/shlink-backend/templates/service.yaml b/charts/shlink-backend/templates/shlink-backend/service.yaml similarity index 98% rename from charts/shlink-backend/templates/service.yaml rename to charts/shlink-backend/templates/shlink-backend/service.yaml index f310c9a4d..4705938f0 100644 --- a/charts/shlink-backend/templates/service.yaml +++ b/charts/shlink-backend/templates/shlink-backend/service.yaml @@ -1,9 +1,10 @@ +--- apiVersion: v1 kind: Service metadata: - name: {{ include "shlink-backend.fullname" . }} labels: {{- include "shlink-backend.labels" . | nindent 4 }} + name: {{ include "shlink-backend.fullname" . }} spec: type: {{ .Values.service.type }} ports: diff --git a/charts/shlink-backend/templates/serviceaccount.yaml b/charts/shlink-backend/templates/shlink-backend/serviceaccount.yaml similarity index 100% rename from charts/shlink-backend/templates/serviceaccount.yaml rename to charts/shlink-backend/templates/shlink-backend/serviceaccount.yaml index 2534050cf..8cc9ff080 100644 --- a/charts/shlink-backend/templates/serviceaccount.yaml +++ b/charts/shlink-backend/templates/shlink-backend/serviceaccount.yaml @@ -2,11 +2,11 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "shlink-backend.serviceAccountName" . }} - labels: - {{- include "shlink-backend.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} + labels: + {{- include "shlink-backend.labels" . | nindent 4 }} + name: {{ include "shlink-backend.serviceAccountName" . }} {{- end }} diff --git a/charts/shlink-backend/values-dev.yaml b/charts/shlink-backend/values-dev.yaml new file mode 100644 index 000000000..d235d791b --- /dev/null +++ b/charts/shlink-backend/values-dev.yaml @@ -0,0 +1,27 @@ +extraEnv: + - name: test + value: yeah + +config: + database: + driver: sqlite + host: my-sqlite + port: 20 + +mariadb: + enabled: false + auth: + user: mariadb + +mysql: + enabled: false + auth: + user: mysql + +postgresql: + enabled: false + auth: + user: postgresql + +redis: + enabled: true diff --git a/charts/shlink-backend/values.schema.json b/charts/shlink-backend/values.schema.json index f33f13af2..6dd6a2f67 100644 --- a/charts/shlink-backend/values.schema.json +++ b/charts/shlink-backend/values.schema.json @@ -43,57 +43,742 @@ "title": "autoscaling", "type": "object" }, - "env": { - "description": "see https://shlink.io/documentation/environment-variables/ for a complete list", - "items": { - "anyOf": [ - { - "properties": { - "name": { - "default": "DEFAULT_DOMAIN", - "required": [], - "title": "name", - "type": "string" + "config": { + "properties": { + "database": { + "properties": { + "auth": { + "properties": { + "database": { + "default": "", + "description": "The database name to be used when using an external database driver. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled", + "required": [], + "title": "database", + "type": "string" + }, + "existingSecret": { + "default": "", + "description": "Use existing secret for password details (`config.database.auth.password` will be ignored and picked up from this secret). The secret has to contain the key `database-password`.", + "required": [], + "title": "existingSecret", + "type": "string" + }, + "password": { + "default": "", + "description": "The password credential to be used when using an external database driver.", + "required": [], + "title": "password", + "type": "string" + }, + "username": { + "default": "", + "description": "The username credential to be used when using an external database driver.", + "required": [], + "title": "username", + "type": "string" + } }, - "value": { - "default": "doma.in", - "required": [], - "title": "value", - "type": "string" - } + "required": [ + "database", + "existingSecret", + "password", + "username" + ], + "title": "auth", + "type": "object" }, - "required": [ - "name", - "value" - ], - "type": "object" + "driver": { + "default": "sqlite", + "description": "mysql, maria, postgres or sqlite. Will be set automatically when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled", + "required": [], + "title": "driver", + "type": "string" + }, + "host": { + "default": "", + "description": "The host name of the database server when using an external database driver. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled", + "required": [], + "title": "host", + "type": "string" + }, + "port": { + "default": 0, + "description": "The port in which the database service is running when using an external database driver. Default value is based on the value provided for DB_DRIVER. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled", + "required": [], + "title": "port", + "type": "integer" + }, + "useEncryption": { + "default": false, + "description": "Whether it is desired to use an encrypted connection with the database or not", + "required": [], + "title": "useEncryption", + "type": "boolean" + } + }, + "required": [ + "auth", + "driver", + "host", + "port", + "useEncryption" + ], + "title": "database", + "type": "object" + }, + "general": { + "properties": { + "basePath": { + "default": "", + "description": "The base path from which you plan to serve Shlink, in case you don’t want to serve it from the root of the domain. It has to start with a bar, like /shlink. Defaults to ''.", + "required": [], + "title": "basePath", + "type": "string" + }, + "cacheNamespace": { + "default": "", + "description": "A prefix used for all cache keys generated by Shlink. It’s important to set a unique value here if you have multiple Shlink instances sharing the same cache store (same server when not using redis, or same redis cluster), otherwise there could be collisions. Defaults to Shlink.", + "required": [], + "title": "cacheNamespace", + "type": "string" + }, + "defaultDomain": { + "default": "", + "description": "The default short domain used for this Shlink instance. For example s.test.", + "required": [], + "title": "defaultDomain", + "type": "string" + }, + "initialApiKey": { + "default": "", + "description": "An API key that will be created once during container start-up, with admin permissions.", + "required": [], + "title": "initialApiKey", + "type": "string" + }, + "isHttpsEnabled": { + "default": false, + "description": "Tells if Shlink is served with https or not (true or false). It’s still up to you to actually serve it with HTTPS.", + "required": [], + "title": "isHttpsEnabled", + "type": "boolean" + }, + "memoryLimit": { + "default": "", + "description": "The maximum amount of memory that every Shlink process can use. You can provide a number, which will be the amount of memory in bytes, or a number followed by K for kilobytes, M for megabytes or G for gigabytes. You can also provide -1 to set no memory limit. Defaults to 512M.", + "required": [], + "title": "memoryLimit", + "type": "string" + }, + "timezone": { + "default": "", + "description": "A timezone code as defined [in this list](https://www.php.net/manual/en/timezones.php). All dates stored by Shlink (visits, short URL creation, etc) will be considered to be on this timezone. By default, the default timezone set in PHP config will be used, which is UTC in the case of the docker image.", + "required": [], + "title": "timezone", + "type": "string" + } }, - { - "properties": { - "name": { - "default": "IS_HTTPS_ENABLED", - "required": [], - "title": "name", - "type": "string" + "required": [ + "basePath", + "cacheNamespace", + "defaultDomain", + "initialApiKey", + "isHttpsEnabled", + "memoryLimit", + "timezone" + ], + "title": "general", + "type": "object" + }, + "geolite": { + "properties": { + "licenseKey": { + "default": "", + "description": "The license key used to download new GeoLite2 database files. Go to GeoLite2 license key to know how to generate it. Not providing a license key will completely disable visits geolocation.", + "required": [], + "title": "licenseKey", + "type": "string" + }, + "skipInitialDownload": { + "default": false, + "description": "If provided with value true, it will skip the initial GeoLite2 db file download, speeding-up the container start-up. As a side effect, first visits on this container will remain un-located until the file finishes downloading in background.", + "required": [], + "title": "skipInitialDownload", + "type": "boolean" + } + }, + "required": [ + "licenseKey", + "skipInitialDownload" + ], + "title": "geolite", + "type": "object" + }, + "matomo": { + "properties": { + "auth": { + "properties": { + "apiToken": { + "default": "", + "description": "The API token so that Shlink can call Matomo’s API", + "required": [], + "title": "apiToken", + "type": "string" + }, + "existingSecret": { + "default": "", + "description": "Use existing secret for the API token details (`config.matomo.auth.apiToken` will be ignored and picked up from this secret). The secret has to contain the key `api-token`.", + "required": [], + "title": "existingSecret", + "type": "string" + } }, - "value": { - "default": "false", - "required": [], - "title": "value", - "type": "string" - } + "required": [ + "apiToken", + "existingSecret" + ], + "title": "auth", + "type": "object" }, - "required": [ - "name", - "value" - ], - "type": "object" - } - ], + "baseUrl": { + "default": "", + "description": "The external Matomo server URL.", + "required": [], + "title": "baseUrl", + "type": "string" + }, + "enabled": { + "default": false, + "description": "Enable the Matomo integration to sent visits", + "required": [], + "title": "enabled", + "type": "boolean" + }, + "siteId": { + "default": "", + "description": "The site ID to be used for Shlink visits.", + "required": [], + "title": "siteId", + "type": "string" + } + }, + "required": [ + "enabled", + "auth", + "baseUrl", + "siteId" + ], + "title": "matomo", + "type": "object" + }, + "mercure": { + "properties": { + "auth": { + "properties": { + "existingSecret": { + "default": "", + "description": "Use existing secret for the JWT secret details (`config.mercure.auth.jwtSecret` will be ignored and picked up from this secret). The secret has to contain the key `jwt-secret`.", + "required": [], + "title": "existingSecret", + "type": "string" + }, + "jwtSecret": { + "default": "", + "description": "The secret key that was provided to the mercure hub server, in order to be able to generate valid JWTs for publishing/subscribing to that server.", + "required": [], + "title": "jwtSecret", + "type": "string" + } + }, + "required": [ + "jwtSecret", + "existingSecret" + ], + "title": "auth", + "type": "object" + }, + "enabled": { + "default": false, + "description": "Enable the Mercure Hub integration.", + "required": [], + "title": "enabled", + "type": "boolean" + }, + "internalHubUrl": { + "default": "", + "description": "An internal URL for a mercure hub. Will be used only when publishing updates to mercure, and does not need to be public.", + "required": [], + "title": "internalHubUrl", + "type": "string" + }, + "publicHubUrl": { + "default": "", + "description": "The public URL of a mercure hub server to which Shlink will sent updates. This URL will also be served to consumers that want to subscribe to those updates.", + "required": [], + "title": "publicHubUrl", + "type": "string" + } + }, + "required": [ + "enabled", + "auth", + "publicHubUrl", + "internalHubUrl" + ], + "title": "mercure", + "type": "object" + }, + "qrCodes": { + "properties": { + "codeForDisabledShortUrls": { + "default": true, + "description": "Whether generating QR codes should work for disabled short URLs. Disabled short URLs are those which reached the maximum amount of visits, have a validSince date in the future, or a validUntil date in the past.", + "required": [], + "title": "codeForDisabledShortUrls", + "type": "boolean" + }, + "defaultColors": { + "properties": { + "background": { + "default": "#FFFFFF", + "description": "The QR code background color.", + "required": [], + "title": "background", + "type": "string" + }, + "foreground": { + "default": "#000000", + "description": "The QR code foreground color.", + "required": [], + "title": "foreground", + "type": "string" + } + }, + "required": [ + "background", + "foreground" + ], + "title": "defaultColors", + "type": "object" + }, + "defaultErrorCorrection": { + "default": "l", + "description": "One of L (Low), M (Medium), Q (Quartile) or H (High), to determine the default error correction of generated QR codes when the errorCorrection query param is not provided.", + "required": [], + "title": "defaultErrorCorrection", + "type": "string" + }, + "defaultFormat": { + "default": "png", + "description": "One of png or svg, to determine the default format of generated QR codes when the format query param is not provided.", + "required": [], + "title": "defaultFormat", + "type": "string" + }, + "defaultLogoUrl": { + "default": "", + "description": "A URL pointing to a logo that will be placed in the middle of the QR code. This one is experimental, as some images might break the QR code.", + "required": [], + "title": "defaultLogoUrl", + "type": "string" + }, + "defaultMargin": { + "default": 0, + "description": "A value greater than 0 to determine the default margin of generated QR codes when the margin query param is not provided.", + "required": [], + "title": "defaultMargin", + "type": "integer" + }, + "defaultRoundBlockSize": { + "default": true, + "description": "Tells if the block size should be round on QR codes, making it more readable, but potentially adding some extra margin as a side effect.", + "required": [], + "title": "defaultRoundBlockSize", + "type": "boolean" + }, + "defaultSize": { + "default": 300, + "description": "A value between 50 and 1000 to determine the default size of generated QR codes when the size query param is not provided.", + "required": [], + "title": "defaultSize", + "type": "integer" + } + }, + "required": [ + "codeForDisabledShortUrls", + "defaultColors", + "defaultErrorCorrection", + "defaultFormat", + "defaultLogoUrl", + "defaultMargin", + "defaultRoundBlockSize", + "defaultSize" + ], + "title": "qrCodes", + "type": "object" + }, + "rabbitmq": { + "properties": { + "auth": { + "properties": { + "existingSecret": { + "default": "", + "description": "Use existing secret for password details (`config.rabbitmq.auth.password` will be ignored and picked up from this secret). The secret has to contain the key `rabbitmq-password`.", + "required": [], + "title": "existingSecret", + "type": "string" + }, + "password": { + "default": "", + "description": "The password credential to be used when using an external database driver.", + "required": [], + "title": "password", + "type": "string" + }, + "username": { + "default": "", + "description": "The username credential to be used when using an external database driver.", + "required": [], + "title": "username", + "type": "string" + } + }, + "required": [ + "existingSecret", + "password", + "username" + ], + "title": "auth", + "type": "object" + }, + "enabled": { + "default": false, + "description": "enable RabbitMQ™ Integration", + "required": [], + "title": "enabled", + "type": "boolean" + }, + "host": { + "default": "", + "description": "The RabbitMQ server host name", + "required": [], + "title": "host", + "type": "string" + }, + "useSsl": { + "default": false, + "description": "Whether connection is encrypted with SSL/TLS or not.", + "required": [], + "title": "useSsl", + "type": "boolean" + }, + "vhost": { + "default": "/", + "description": "The RabbitMQ server VHost", + "required": [], + "title": "vhost", + "type": "string" + } + }, + "required": [ + "enabled", + "auth", + "host", + "useSsl", + "vhost" + ], + "title": "rabbitmq", + "type": "object" + }, + "redirects": { + "properties": { + "cacheLifetime": { + "default": 30, + "description": "Allows to set the amount of seconds that redirects should be cached when redirect status is 301 or 308.", + "required": [], + "title": "cacheLifetime", + "type": "integer" + }, + "defaultBaseUrlRedirect": { + "default": "", + "description": "If a URL is provided here, when a user tries to access Shlink’s base URL, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page.", + "required": [], + "title": "defaultBaseUrlRedirect", + "type": "string" + }, + "defaultInvalidShortUrlRedirect": { + "default": "", + "description": "If a URL is provided here, when a user tries to access an invalid short URL, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page.", + "required": [], + "title": "defaultInvalidShortUrlRedirect", + "type": "string" + }, + "defaultRegular404Redirect": { + "default": "", + "description": "If a URL is provided here, when a user tries to access a URL not matching any supported by the router, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page.", + "required": [], + "title": "defaultRegular404Redirect", + "type": "string" + }, + "extraPathMode": { + "default": "default", + "description": "Determines how Shlink should match short URLs when they start with a known short code. Valid values are default, append and ignore. (See [Extra path forwarding](https://shlink.io/documentation/some-features/#extra-path-forwarding) for more info).", + "required": [], + "title": "extraPathMode", + "type": "string" + }, + "statusCode": { + "default": 302, + "description": "301, 302, 308 or 307 (last two since v3.5.0). Determines the status code that should be used on redirects from short to long URLs. Setting 308 or 307 implicitly makes requests to short URLs work regardless the HTTP method.", + "required": [], + "title": "statusCode", + "type": "integer" + } + }, + "required": [ + "cacheLifetime", + "defaultBaseUrlRedirect", + "defaultInvalidShortUrlRedirect", + "defaultRegular404Redirect", + "extraPathMode", + "statusCode" + ], + "title": "redirects", + "type": "object" + }, + "redis": { + "properties": { + "enabled": { + "default": false, + "description": "enable Redis™ Integration", + "required": [], + "title": "enabled", + "type": "boolean" + }, + "pubSubEnabled": { + "default": false, + "description": "Tells if the configured redis instance/cluster should also be used to publish real-time updates via redis pub/sub.", + "required": [], + "title": "pubSubEnabled", + "type": "boolean" + }, + "sentinal": { + "properties": { + "enabled": { + "default": false, + "required": [], + "title": "enabled", + "type": "boolean" + }, + "service": { + "default": "", + "description": "The name of the sentinel service if you want to use redis sentinel. If this value is provided, the servers provided in config.redis.servers will be considered sentinel instances.", + "required": [], + "title": "service", + "type": "string" + } + }, + "required": [ + "enabled", + "service" + ], + "title": "sentinal", + "type": "object" + }, + "servers": { + "default": "", + "description": "The comma-separated list of Redis servers when using external Redis servers. Will be ignored when you activate one of the integrated Redis subchart with redis.enabled", + "required": [], + "title": "servers", + "type": "string" + } + }, + "required": [ + "enabled", + "pubSubEnabled", + "sentinal", + "servers" + ], + "title": "redis", + "type": "object" + }, + "robots": { + "properties": { + "allowAllShortUrls": { + "default": false, + "description": "Whether all short URLs should be allowed via robots.txt or not. If set to true, the crawlable option set in individual short URLs will be ignored.", + "required": [], + "title": "allowAllShortUrls", + "type": "boolean" + }, + "userAgents": { + "default": "*", + "description": "A comma-separated list of allowed user agents via robots.txt.", + "required": [], + "title": "userAgents", + "type": "string" + } + }, + "required": [ + "allowAllShortUrls", + "userAgents" + ], + "title": "robots", + "type": "object" + }, + "trackingVisits": { + "properties": { + "anonymizeRemoteAddr": { + "default": true, + "description": "Tells if IP addresses from visitors should be obfuscated before storing them in the database. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info.", + "required": [], + "title": "anonymizeRemoteAddr", + "type": "boolean" + }, + "disable": { + "default": false, + "description": "Tells if visits tracking should be completely disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info.", + "required": [], + "title": "disable", + "type": "boolean" + }, + "disableIpTracking": { + "default": false, + "description": "Tells if tracking of the IP address (and therefore visitors location) should be disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info.", + "required": [], + "title": "disableIpTracking", + "type": "boolean" + }, + "disableReferrerTracking": { + "default": false, + "description": "Tells if tracking of the referrer should be disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info.", + "required": [], + "title": "disableReferrerTracking", + "type": "boolean" + }, + "disableTrackingFrom": { + "default": "", + "description": "A comma-separated list of IP address patterns from which all tracking should be disabled. It allows providing fixed IP addresses (100.200.80.40), CIDR blocks (192.168.10.0/24) or wildcard patterns (11.22.*.*)", + "required": [], + "title": "disableTrackingFrom", + "type": "string" + }, + "disableTrackingParam": { + "default": "", + "description": "The name of a query param that can be used to visit short URLs avoiding the visit to be tracked. This feature won’t be available if no value is provided. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info.", + "required": [], + "title": "disableTrackingParam", + "type": "string" + }, + "disableUaTracking": { + "default": false, + "description": "Tells if tracking of the user agent should be disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info.", + "required": [], + "title": "disableUaTracking", + "type": "boolean" + }, + "trackOrphanVisits": { + "default": true, + "description": "Tells if orphan visits should be tracked or not. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info.", + "required": [], + "title": "trackOrphanVisits", + "type": "boolean" + } + }, + "required": [ + "anonymizeRemoteAddr", + "disable", + "disableIpTracking", + "disableReferrerTracking", + "disableTrackingParam", + "disableTrackingFrom", + "disableUaTracking", + "trackOrphanVisits" + ], + "title": "trackingVisits", + "type": "object" + }, + "urlShortening": { + "properties": { + "autoResolveTitles": { + "default": true, + "description": "Used to automatically resolve the short URL’s title based on the title-tag in the long URL", + "required": [], + "title": "autoResolveTitles", + "type": "boolean" + }, + "defaultShortCodesLength": { + "default": 5, + "description": "The length you want generated short codes to have. It defaults to 5 and has to be at least 4, so any value smaller than that will fall back to 4.", + "required": [], + "title": "defaultShortCodesLength", + "type": "integer" + }, + "deleteShortUrlThreshold": { + "default": "", + "description": "The amount of visits on short URLs which will not allow them to be deleted. If not provided, this restriction will be disabled.", + "required": [], + "title": "deleteShortUrlThreshold", + "type": "string" + }, + "multiSegmentSlugsEnabled": { + "default": false, + "description": "Allows to create and handle multi-segment custom slugs when true is provided. See [multi-segment custom slugs](https://shlink.io/documentation/some-features/#multi-segment-custom-slugs) for more information.", + "required": [], + "title": "multiSegmentSlugsEnabled", + "type": "boolean" + }, + "shortUrlMode": { + "default": "strict", + "description": "Determines how to match short URLs. Valid values are strict or loose. See [short URLs mode](https://shlink.io/documentation/some-features/#short-urls-mode) for more information.", + "required": [], + "title": "shortUrlMode", + "type": "string" + }, + "shortUrlTrailingSlash": { + "default": false, + "description": "Allows to enable support for trailing slashes in short URLs when true is provided. See [short URLs trailing slash](https://shlink.io/documentation/some-features/#short-urls-trailing-slash) for more information.", + "required": [], + "title": "shortUrlTrailingSlash", + "type": "boolean" + } + }, + "required": [ + "autoResolveTitles", + "defaultShortCodesLength", + "deleteShortUrlThreshold", + "multiSegmentSlugsEnabled", + "shortUrlMode", + "shortUrlTrailingSlash" + ], + "title": "urlShortening", + "type": "object" + } + }, + "required": [ + "database", + "general", + "geolite", + "matomo", + "mercure", + "qrCodes", + "rabbitmq", + "redirects", + "redis", + "robots", + "trackingVisits", + "urlShortening" + ], + "title": "config", + "type": "object" + }, + "extraEnv": { + "description": "additional environment variables to be added to the pods. See https://shlink.io/documentation/environment-variables for a complete list.", + "items": { "required": [] }, "required": [], - "title": "env", + "title": "extraEnv", "type": "array" }, "fullnameOverride": { @@ -118,6 +803,13 @@ "title": "pullPolicy", "type": "string" }, + "registry": { + "default": "docker.io", + "description": "image registry", + "required": [], + "title": "registry", + "type": "string" + }, "repository": { "default": "shlinkio/shlink", "description": "image repository", @@ -126,7 +818,7 @@ "type": "string" }, "tag": { - "default": "3.7.4", + "default": "4.4.0", "description": "Overrides the image tag", "required": [], "title": "tag", @@ -134,6 +826,7 @@ } }, "required": [ + "registry", "repository", "pullPolicy", "tag" @@ -251,18 +944,21 @@ "properties": { "database": { "default": "shlink", + "description": "The database name to be used when using the integrated MariaDB database.", "required": [], "title": "database", "type": "string" }, "password": { "default": "shlink", + "description": "The password credential to be used when using the integrated MariaDB database.", "required": [], "title": "password", "type": "string" }, "username": { "default": "shlink", + "description": "The username credential to be used when using the integrated MariaDB database.", "required": [], "title": "username", "type": "string" @@ -278,6 +974,7 @@ }, "enabled": { "default": false, + "description": "enable integrated MariaDB™ subchart from Bitnami", "required": [], "title": "enabled", "type": "boolean" @@ -296,18 +993,21 @@ "properties": { "database": { "default": "shlink", + "description": "The database name to be used when using the integrated MySQL database.", "required": [], "title": "database", "type": "string" }, "password": { "default": "shlink", + "description": "The password credential to be used when using the integrated MySQL database.", "required": [], "title": "password", "type": "string" }, "username": { "default": "shlink", + "description": "The username credential to be used when using the integrated MySQL database.", "required": [], "title": "username", "type": "string" @@ -323,6 +1023,7 @@ }, "enabled": { "default": false, + "description": "enable integrated MySQL™ subchart from Bitnami", "required": [], "title": "enabled", "type": "boolean" @@ -372,18 +1073,21 @@ "properties": { "database": { "default": "shlink", + "description": "The database name to be used when using the integrated PostgreSQL database.", "required": [], "title": "database", "type": "string" }, "password": { "default": "shlink", + "description": "The password credential to be used when using the integrated PostgreSQL database.", "required": [], "title": "password", "type": "string" }, "username": { "default": "shlink", + "description": "The username credential to be used when using the integrated PostgreSQL database.", "required": [], "title": "username", "type": "string" @@ -399,6 +1103,7 @@ }, "enabled": { "default": false, + "description": "enable integrated PostgreSQL™ subchart from Bitnami", "required": [], "title": "enabled", "type": "boolean" @@ -415,6 +1120,7 @@ "properties": { "enabled": { "default": false, + "description": "enable integrated RabbitMQ™ subchart from Bitnami", "required": [], "title": "enabled", "type": "boolean" @@ -428,31 +1134,66 @@ }, "redis": { "properties": { + "architecture": { + "default": "standalone", + "description": "Redis™ architecture. Allowed values: `standalone` or `replication`", + "required": [], + "title": "architecture", + "type": "string" + }, "auth": { "properties": { "enabled": { "default": false, + "description": "Enable password authentication", "required": [], "title": "enabled", "type": "boolean" + }, + "sentinel": { + "default": false, + "description": "Enable password authentication on Redis™ Sentinels", + "required": [], + "title": "sentinel", + "type": "boolean" } }, "required": [ - "enabled" + "enabled", + "sentinel" ], "title": "auth", "type": "object" }, "enabled": { "default": false, + "description": "enable integrated Redis™ subchart from Bitnami", "required": [], "title": "enabled", "type": "boolean" + }, + "sentinel": { + "properties": { + "enabled": { + "default": false, + "description": "Use Redis™ Sentinel on Redis™ pods", + "required": [], + "title": "enabled", + "type": "boolean" + } + }, + "required": [ + "enabled" + ], + "title": "sentinel", + "type": "object" } }, "required": [ "enabled", - "auth" + "architecture", + "auth", + "sentinel" ], "title": "redis", "type": "object" @@ -486,7 +1227,7 @@ "service": { "properties": { "port": { - "default": 80, + "default": 8080, "description": "Kubernetes port where service is exposed", "required": [], "title": "port", @@ -567,7 +1308,8 @@ "nodeSelector", "tolerations", "affinity", - "env", + "extraEnv", + "config", "mariadb", "mysql", "postgresql", diff --git a/charts/shlink-backend/values.yaml b/charts/shlink-backend/values.yaml index fd1a9e48b..7b536370d 100644 --- a/charts/shlink-backend/values.yaml +++ b/charts/shlink-backend/values.yaml @@ -4,12 +4,14 @@ nameOverride: "" fullnameOverride: "" image: + # -- image registry + registry: docker.io # -- image repository repository: shlinkio/shlink # -- image pull policy pullPolicy: Always # -- Overrides the image tag - tag: "3.7.4" + tag: "4.4.0" # -- If defined, uses a Secret to pull an image from a private Docker registry or repository. imagePullSecrets: [] @@ -52,7 +54,7 @@ service: # -- Kubernetes service type type: ClusterIP # -- Kubernetes port where service is exposed - port: 80 + port: 8080 ingress: enabled: false @@ -99,38 +101,215 @@ tolerations: [] # -- Affinity settings for pod assignment affinity: {} -# see https://shlink.io/documentation/environment-variables/ for a complete list -env: - - name: DEFAULT_DOMAIN - value: doma.in - - name: IS_HTTPS_ENABLED - value: "false" +# -- additional environment variables to be added to the pods. See https://shlink.io/documentation/environment-variables for a complete list. +extraEnv: [] + +config: + database: + auth: + # -- The database name to be used when using an external database driver. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled + database: "" + # -- Use existing secret for password details (`config.database.auth.password` will be ignored and picked up from this secret). The secret has to contain the key `database-password`. + existingSecret: "" + # -- The password credential to be used when using an external database driver. + password: "" + # -- The username credential to be used when using an external database driver. + username: "" + # -- mysql, maria, postgres or sqlite. Will be set automatically when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled + driver: sqlite + # -- The host name of the database server when using an external database driver. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled + host: "" + # -- The port in which the database service is running when using an external database driver. Default value is based on the value provided for DB_DRIVER. Will be ignored when you activate one of the integrated databases with mariadb.enabled, mysql.enabled or postgresql.enabled + port: 0 + # -- Whether it is desired to use an encrypted connection with the database or not + useEncryption: false + general: + # -- The base path from which you plan to serve Shlink, in case you don’t want to serve it from the root of the domain. It has to start with a bar, like /shlink. Defaults to ''. + basePath: "" + # -- A prefix used for all cache keys generated by Shlink. It’s important to set a unique value here if you have multiple Shlink instances sharing the same cache store (same server when not using redis, or same redis cluster), otherwise there could be collisions. Defaults to Shlink. + cacheNamespace: "" + # -- The default short domain used for this Shlink instance. For example s.test. + defaultDomain: "" + # -- An API key that will be created once during container start-up, with admin permissions. + initialApiKey: "" + # -- Tells if Shlink is served with https or not (true or false). It’s still up to you to actually serve it with HTTPS. + isHttpsEnabled: false + # -- The maximum amount of memory that every Shlink process can use. You can provide a number, which will be the amount of memory in bytes, or a number followed by K for kilobytes, M for megabytes or G for gigabytes. You can also provide -1 to set no memory limit. Defaults to 512M. + memoryLimit: "" + # -- A timezone code as defined [in this list](https://www.php.net/manual/en/timezones.php). All dates stored by Shlink (visits, short URL creation, etc) will be considered to be on this timezone. By default, the default timezone set in PHP config will be used, which is UTC in the case of the docker image. + timezone: "" + geolite: + # -- The license key used to download new GeoLite2 database files. Go to GeoLite2 license key to know how to generate it. Not providing a license key will completely disable visits geolocation. + licenseKey: "" + # -- If provided with value true, it will skip the initial GeoLite2 db file download, speeding-up the container start-up. As a side effect, first visits on this container will remain un-located until the file finishes downloading in background. + skipInitialDownload: false + matomo: + # -- Enable the Matomo integration to sent visits + enabled: false + auth: + # -- The API token so that Shlink can call Matomo’s API + apiToken: "" + # -- Use existing secret for the API token details (`config.matomo.auth.apiToken` will be ignored and picked up from this secret). The secret has to contain the key `api-token`. + existingSecret: "" + # -- The external Matomo server URL. + baseUrl: "" + # -- The site ID to be used for Shlink visits. + siteId: "" + mercure: + # -- Enable the Mercure Hub integration. + enabled: false + auth: + # -- The secret key that was provided to the mercure hub server, in order to be able to generate valid JWTs for publishing/subscribing to that server. + jwtSecret: "" + # -- Use existing secret for the JWT secret details (`config.mercure.auth.jwtSecret` will be ignored and picked up from this secret). The secret has to contain the key `jwt-secret`. + existingSecret: "" + # -- The public URL of a mercure hub server to which Shlink will sent updates. This URL will also be served to consumers that want to subscribe to those updates. + publicHubUrl: "" + # -- An internal URL for a mercure hub. Will be used only when publishing updates to mercure, and does not need to be public. + internalHubUrl: "" + qrCodes: + # -- Whether generating QR codes should work for disabled short URLs. Disabled short URLs are those which reached the maximum amount of visits, have a validSince date in the future, or a validUntil date in the past. + codeForDisabledShortUrls: true + defaultColors: + # -- The QR code background color. + background: "#FFFFFF" + # -- The QR code foreground color. + foreground: "#000000" + # -- One of L (Low), M (Medium), Q (Quartile) or H (High), to determine the default error correction of generated QR codes when the errorCorrection query param is not provided. + defaultErrorCorrection: l + # -- One of png or svg, to determine the default format of generated QR codes when the format query param is not provided. + defaultFormat: png + # -- A URL pointing to a logo that will be placed in the middle of the QR code. This one is experimental, as some images might break the QR code. + defaultLogoUrl: "" + # -- A value greater than 0 to determine the default margin of generated QR codes when the margin query param is not provided. + defaultMargin: 0 + # -- Tells if the block size should be round on QR codes, making it more readable, but potentially adding some extra margin as a side effect. + defaultRoundBlockSize: true + # -- A value between 50 and 1000 to determine the default size of generated QR codes when the size query param is not provided. + defaultSize: 300 + rabbitmq: + # -- enable RabbitMQ™ Integration + enabled: false + auth: + # -- Use existing secret for password details (`config.rabbitmq.auth.password` will be ignored and picked up from this secret). The secret has to contain the key `rabbitmq-password`. + existingSecret: "" + # -- The password credential to be used when using an external database driver. + password: "" + # -- The username credential to be used when using an external database driver. + username: "" + # -- The RabbitMQ server host name + host: "" + # -- Whether connection is encrypted with SSL/TLS or not. + useSsl: false + # -- The RabbitMQ server VHost + vhost: "/" + redirects: + # -- Allows to set the amount of seconds that redirects should be cached when redirect status is 301 or 308. + cacheLifetime: 30 + # -- If a URL is provided here, when a user tries to access Shlink’s base URL, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page. + defaultBaseUrlRedirect: "" + # -- If a URL is provided here, when a user tries to access an invalid short URL, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page. + defaultInvalidShortUrlRedirect: "" + # -- If a URL is provided here, when a user tries to access a URL not matching any supported by the router, and the visited domain does not have a redirect URL of its own, he/she will be redirected to this value. If this env var is not provided, the user will see a generic 404 - not found page. + defaultRegular404Redirect: "" + # -- Determines how Shlink should match short URLs when they start with a known short code. Valid values are default, append and ignore. (See [Extra path forwarding](https://shlink.io/documentation/some-features/#extra-path-forwarding) for more info). + extraPathMode: default + # -- 301, 302, 308 or 307 (last two since v3.5.0). Determines the status code that should be used on redirects from short to long URLs. Setting 308 or 307 implicitly makes requests to short URLs work regardless the HTTP method. + statusCode: 302 + redis: + # -- enable Redis™ Integration + enabled: false + # -- Tells if the configured redis instance/cluster should also be used to publish real-time updates via redis pub/sub. + pubSubEnabled: false + sentinal: + enabled: false + # -- The name of the sentinel service if you want to use redis sentinel. If this value is provided, the servers provided in config.redis.servers will be considered sentinel instances. + service: "" + # -- The comma-separated list of Redis servers when using external Redis servers. Will be ignored when you activate one of the integrated Redis subchart with redis.enabled + servers: "" + robots: + # -- Whether all short URLs should be allowed via robots.txt or not. If set to true, the crawlable option set in individual short URLs will be ignored. + allowAllShortUrls: false + # -- A comma-separated list of allowed user agents via robots.txt. + userAgents: "*" + trackingVisits: + # -- Tells if IP addresses from visitors should be obfuscated before storing them in the database. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. + anonymizeRemoteAddr: true + # -- Tells if visits tracking should be completely disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. + disable: false + # -- Tells if tracking of the IP address (and therefore visitors location) should be disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. + disableIpTracking: false + # -- Tells if tracking of the referrer should be disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. + disableReferrerTracking: false + # -- The name of a query param that can be used to visit short URLs avoiding the visit to be tracked. This feature won’t be available if no value is provided. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. + disableTrackingParam: "" + # -- A comma-separated list of IP address patterns from which all tracking should be disabled. It allows providing fixed IP addresses (100.200.80.40), CIDR blocks (192.168.10.0/24) or wildcard patterns (11.22.*.*) + disableTrackingFrom: "" + # -- Tells if tracking of the user agent should be disabled. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. + disableUaTracking: false + # -- Tells if orphan visits should be tracked or not. See [Tracking visits](https://shlink.io/documentation/tracking-visits/) for more info. + trackOrphanVisits: true + urlShortening: + # -- Used to automatically resolve the short URL’s title based on the title-tag in the long URL + autoResolveTitles: true + # -- The length you want generated short codes to have. It defaults to 5 and has to be at least 4, so any value smaller than that will fall back to 4. + defaultShortCodesLength: 5 + # -- The amount of visits on short URLs which will not allow them to be deleted. If not provided, this restriction will be disabled. + deleteShortUrlThreshold: "" + # -- Allows to create and handle multi-segment custom slugs when true is provided. See [multi-segment custom slugs](https://shlink.io/documentation/some-features/#multi-segment-custom-slugs) for more information. + multiSegmentSlugsEnabled: false + # -- Determines how to match short URLs. Valid values are strict or loose. See [short URLs mode](https://shlink.io/documentation/some-features/#short-urls-mode) for more information. + shortUrlMode: strict + # -- Allows to enable support for trailing slashes in short URLs when true is provided. See [short URLs trailing slash](https://shlink.io/documentation/some-features/#short-urls-trailing-slash) for more information. + shortUrlTrailingSlash: false mariadb: + # -- enable integrated MariaDB™ subchart from Bitnami enabled: false auth: + # -- The database name to be used when using the integrated MariaDB database. database: shlink + # -- The password credential to be used when using the integrated MariaDB database. password: shlink + # -- The username credential to be used when using the integrated MariaDB database. username: shlink mysql: + # -- enable integrated MySQL™ subchart from Bitnami enabled: false auth: + # -- The database name to be used when using the integrated MySQL database. database: shlink + # -- The password credential to be used when using the integrated MySQL database. password: shlink + # -- The username credential to be used when using the integrated MySQL database. username: shlink postgresql: + # -- enable integrated PostgreSQL™ subchart from Bitnami enabled: false auth: + # -- The database name to be used when using the integrated PostgreSQL database. database: shlink + # -- The password credential to be used when using the integrated PostgreSQL database. password: shlink + # -- The username credential to be used when using the integrated PostgreSQL database. username: shlink rabbitmq: + # -- enable integrated RabbitMQ™ subchart from Bitnami enabled: false redis: + # -- enable integrated Redis™ subchart from Bitnami enabled: false + # -- Redis™ architecture. Allowed values: `standalone` or `replication` + architecture: standalone auth: + # -- Enable password authentication + enabled: false + # -- Enable password authentication on Redis™ Sentinels + sentinel: false + sentinel: + # -- Use Redis™ Sentinel on Redis™ pods enabled: false