Compare commits

..

62 Commits

Author SHA1 Message Date
13b4d8af15 Update Paperless-NGX chart version and app version
All checks were successful
Build Helm Chart / helm-package (push) Successful in 1m45s
Updated the version to 0.27.3 and appVersion to 2.20.3 in the
Chart.yaml for the Paperless-NGX Helm chart. These updates reflect
the latest changes in the deployment and software releases,
ensuring compatibility with recent features and bug fixes. No
breaking changes are expected in this update, but it is advisable
to review the release notes for the changes associated with
appVersion 2.20.3.
2025-12-19 13:53:05 +01:00
6eda29a864 Update paperless-ngx version to 0.27.2
All checks were successful
Build Helm Chart / helm-package (push) Successful in 29s
This commit updates the version of the paperless-ngx Helm chart
from 0.26.2 to 0.27.2 in the Chart.yaml file. This version bump
incorporates new features and bug fixes that are crucial for
maintaining compatibility with the latest release of the paperless-ngx
application.

No breaking changes are introduced with this version, but it is
important for users to upgrade to ensure they benefit from the
latest improvements and security updates. Consider reviewing the
release notes for version 0.27.2 to understand all changes.
2025-12-15 08:56:08 +01:00
aa4d753907 Bump paperless-ngx chart version to 0.26.2
All checks were successful
Build Helm Chart / helm-package (push) Successful in 32s
Updated the version of the paperless-ngx Helm chart from 0.26.1 to
0.26.2 in the Chart.yaml file. This change is necessary to ensure
that users have access to the latest features, improvements, and
bug fixes included in this new release. It is important to keep
the Helm chart version aligned with the application updates for
consistent deployment and compatibility with newer features in
the underlying service. No breaking changes are noted in this
version bump, but users should review the release notes for any
important updates.
2025-12-15 08:51:33 +01:00
5daee90a67 Update paperless-ngx chart version to 0.26.1
All checks were successful
Build Helm Chart / helm-package (push) Successful in 25s
Changed the chart version in Chart.yaml from 0.26.3 to 0.26.1
to align with the latest stable release. This version bump was
necessary to ensure compatibility with the recent updates and
bug fixes in the application. Additionally, updated the image
tag in values.yaml to utilize the AppVersion variable instead
of a static value, allowing for easier management of
image versions in line with the chart versioning. No breaking
changes are introduced with this update.
2025-12-15 08:25:58 +01:00
f23dcab3a2 Update paperless-ngx chart version to 0.26.3
All checks were successful
Build Helm Chart / helm-package (push) Successful in 29s
This commit updates the version of the paperless-ngx Helm chart
from 0.26.2 to 0.26.3. The version bump reflects upstream changes
and improvements incorporated in the latest release of the chart.
Updating to the new version ensures users benefit from the latest
features and bug fixes associated with paperless-ngx. There are no
breaking changes or major modifications to the chart structure in
this update.
2025-12-15 08:19:52 +01:00
94a2b7ea50 Remove image tag for paperless-ngx chart
This update changes the image tag for the paperless-ngx Helm chart
from a specific version (2.20.1) to an empty string. This allows
the chart to use the latest available image version, which is
important for ensuring that users always receive the latest
features and security updates without needing to update the
Helm chart manually.

No breaking changes are introduced; however, users should be
aware that using an empty tag may lead to unexpected behavior
if there are breaking changes in newer image versions. Users
should ensure they test their deployments when upgrading to
monitor for any issues.
2025-12-15 08:19:15 +01:00
be1676bd1e Update paperless-ngx chart version and app version
All checks were successful
Build Helm Chart / helm-package (push) Successful in 32s
Updated the Chart.yaml file for the paperless-ngx Helm chart.
This change increments the chart version from 0.25.11 to 0.26.2 and
the app version from 2.20.1 to 2.20.2. These updates were necessary
to ensure users have access to the latest features and bug fixes
included in these versions. No breaking changes are introduced,
but users should review the release notes for each version for
any specific updates or changes in behavior.
2025-12-15 07:52:59 +01:00
cdcc32c588 Bump calibre-web version to 0.9.1 and adjust probes
All checks were successful
Build Helm Chart / helm-package (push) Successful in 4s
Updated the calibre-web Helm chart version from 0.1.4 to 0.9.1
to reflect the latest release and ensure compatibility with
new features and fixes. Additionally, modified the
readiness and liveness probes in the deployment configuration
by increasing the failureThreshold from 1 to 3. This change
is intended to provide a more resilient deployment, allowing
for a few additional failures before the pod is marked as
unhealthy, which can be beneficial in environments with
intermittent issues. No breaking changes are introduced in
this update.
2025-12-10 14:49:15 +01:00
3e1aa342de Bump version to 0.1.4 and adjust readiness probe delay
All checks were successful
Build Helm Chart / helm-package (push) Successful in 4s
Updated the chart version in `Chart.yaml` from 0.1.3 to 0.1.4 to
reflect enhancements and bug fixes since the last release.

In `deployment.yaml`, reduced the initial delay for both the
liveness and readiness probes from 30 seconds to 10 seconds to
help the application start responding faster after deployment.
This change aims to improve the overall user experience by
ensuring services are available sooner. No breaking changes
are introduced with this update.
2025-12-10 08:43:42 +01:00
139c8c6d5f Bump calibre-web version to 0.1.3 and update probes
All checks were successful
Build Helm Chart / helm-package (push) Successful in 4s
Updated the Chart.yaml version from 0.1.2 to 0.1.3 to reflect
the new release of the calibre-web application. Modified
the liveness and readiness probes in deployment.yaml to
enhance the application's health checks. The liveness probe
now has a failure threshold of 1 and an initial delay of
30 seconds, while the readiness probe has an initial delay
of 30 seconds as well but with a period of 5 seconds.
These changes were made to improve the deployment stability
and response time of the application, ensuring quicker
feedback on the health status of the pods.
2025-12-10 08:37:31 +01:00
4425a0e703 Update Calibre-Web Helm chart metadata and configurations
All checks were successful
Build Helm Chart / helm-package (push) Successful in 4s
Updated the Calibre-Web Helm chart's metadata in `Chart.yaml`,
including a more descriptive app description, updated version to
0.1.2, and added keywords, home URL, source references, and
maintainer information.

In `deployment.yaml`, modified the image reference to allow
a customizable image tag instead of defaulting to the app version.

In `values.yaml`, adjusted the size of persistent storage
volumes for `data` and `config`, changing them to 2Gi and
50Mi respectively. This ensures more manageable resource
allocation for deployments, addressing potential over-provisioning.

These changes collectively enhance the usability and
maintainability of the Helm chart for Calibre-Web deployments.
2025-12-10 07:58:33 +01:00
fa9e8afde4 Rename calibre-web chart files for consistency
All checks were successful
Build Helm Chart / helm-package (push) Successful in 1m15s
All files related to the calibre-web Helm chart were renamed from
`cailbre-web` to `calibre-web` to correct the spelling and ensure
consistency across the file structure. This includes the main chart
directory, templates, and values file.

These changes were necessary to avoid confusion and to maintain
standard naming conventions. There are no breaking changes or
functional updates in this commit; it purely targets file names
to ensure clarity when managing the chart in future developments.
2025-12-09 08:43:41 +01:00
9e35b1cfad Add Helm chart for calibre-web deployment
This commit introduces a new Helm chart for deploying calibre-web
on Kubernetes. The chart includes essential templates for
deployment, service, ingress, and persistent volume claims, along
with default values configured in a `values.yaml` file.

The addition of the Helm chart enables easier deployment and
management of calibre-web, allowing users to customize settings
like the replica count, image settings, service type, and storage
options through the `values.yaml`. A GitHub Actions workflow
(`build-chart-calibre-web.yml`) is also included to automate the
packaging and uploading of the Helm chart upon updates to the
main branch.

The structure and organization of the templates adhere to Helm
best practices, ensuring compatibility and ease of use. There are no
breaking changes associated with this addition, but users should
review the `values.yaml` for configurable options.
2025-12-09 08:42:24 +01:00
0dd4d4853e chore(audiobookshelf): bump chart and app versions
All checks were successful
Build Helm Chart / helm-package (push) Successful in 5s
Update Audiobookshelf Helm chart version from 1.11.0 to 1.11.1 and
 application version from 2.30.0 to 2.31.0. This ensures the chart
 references the latest available application version with its new features
 and bug fixes. Regular version maintenance keeps the deployment current
 with upstream changes.
2025-12-03 21:12:39 +01:00
5e9fed1d71 chore(paperless-ngx): update to version 2.20.1
All checks were successful
Build Helm Chart / helm-package (push) Successful in 32s
Update Paperless-ngx chart version to 0.25.11 and application version to
 2.20.1. This updates the Docker image tag in both Chart.yaml and
 values.yaml files to ensure consistency across the deployment. This is a
 minor version update that likely includes bug fixes and improvements from
 the upstream Paperless-ngx project.
2025-12-03 20:58:02 +01:00
943c7e0523 Update Paperless AI version and app version in Chart.yaml
All checks were successful
Build Helm Chart / helm-package (push) Successful in 5s
This commit updates the version of the Paperless AI Helm chart
from 0.1.7 to 0.1.8 and changes the app version from 3.0.10 to
3.0.9. The bump in the chart version indicates that there are
new changes made since the last release, which may include
bug fixes, dependency updates, or improvements. The app version
downgrade reflects a rollback to a previous version of the
application, possibly due to issues found in version 3.0.10.
This should be noted by users upgrading to this chart version.
2025-11-26 06:13:37 +01:00
724a609c9c Update appVersion and add public images directory
All checks were successful
Build Helm Chart / helm-package (push) Successful in 5s
Updated the appVersion in Chart.yaml from 3.0.9 to 3.0.10 to
reflect the latest version of Paperless AI. In the deployment.yaml,
added a new volume mount for a public images directory at
'/app/public/images' with a size limit of 100Mi. This change
ensures that the application has a dedicated space for public
images, which can help in organizing image storage and manage
resources more effectively. No breaking changes are introduced
with this update.
2025-11-26 06:07:46 +01:00
8e15b8630d Bump version to 0.1.7 and change deployment strategy
All checks were successful
Build Helm Chart / helm-package (push) Successful in 4s
In the Chart.yaml, the version has been updated from 0.1.6 to 0.1.7
to reflect the new changes made in the deployment configuration.

The deployment.yaml has modified the update strategy from
'RollingUpdate' to 'Recreate'. This change was necessary to ensure
that the application is completely rebuilt from scratch instead
of being updated in place, which may help avoid issues during
deployment where existing pods could interfere with new pods.
No breaking changes were introduced, but it is important to note
that this may lead to downtime during deployments since all pods
will be terminated before new ones are created.
2025-11-25 14:19:43 +01:00
de5561ceab Update chart version to 0.1.6 and add rollout strategy
All checks were successful
Build Helm Chart / helm-package (push) Successful in 4s
The version of the Paperless AI Helm chart has been updated
from 0.1.5 to 0.1.6 to reflect recent changes. Additionally,
a rollout strategy of type "RollingUpdate" has been introduced
to the deployment.yaml template. This change allows for
controlled updates to the application, minimizing downtime and
ensuring a smooth deployment process.

There are no breaking changes associated with this update, but
users should note the new strategy for future deployments.
2025-11-25 14:15:21 +01:00
68d1b04223 Update Paperless AI Helm chart version and configuration
All checks were successful
Build Helm Chart / helm-package (push) Successful in 4s
Updated the Paperless AI Helm chart version from 0.1.4-test1 to 0.1.5
to reflect the latest changes. The environment variable configuration
for PUID and PGID has been updated from 0 to 1000 and 2000, respectively,
to align with common user and group IDs used within Docker containers.
Additionally, the security context for the pod is now enabled to
enhance security practices by running the container with the
specified user and group IDs. This change may impact existing
deployments that relied on the previous settings.
2025-11-25 14:02:08 +01:00
2d67af32a2 Add support for logs directory in paperless-ai chart
All checks were successful
Build Helm Chart / helm-package (push) Successful in 5s
This commit introduces a new volume mount for a logs directory in the
paperless-ai Helm chart. The deployment configuration is updated to
include a `logs-dir` volume that is mounted at `/app/logs`, allowing
for the collection and management of logs generated by the application.
Additionally, the version of the chart has been incremented to
`0.1.4-test1` to reflect this change.

The build workflow is also modified to trigger on pushes to the
`patch-paperless-ai` branch, ensuring that changes can be tested
separately from the main branch. These adjustments enhance
observability and facilitate better troubleshooting by storing logs
in a dedicated directory. No breaking changes are introduced.
2025-11-25 13:51:44 +01:00
f09df7388e Bump Helm chart version and update user IDs for Paperless AI
All checks were successful
Build Helm Chart / helm-package (push) Successful in 5s
Updated the version of the Paperless AI Helm chart from 0.1.3 to
0.1.4 to reflect subsequent changes. The environment variables
PUID and PGID have been modified from 1000 and 2000 to 0,
respectively. This change is made to simplify permissions in
the context of the deployment, ensuring that the application runs
with root privileges, which might be necessary for certain
operations.

Additionally, the resource requests and limits sections have been
commented out to allow for flexibility in resource allocation
based on deployment needs. Ensure that when deploying,
appropriate resource constraints are defined externally if required.
2025-11-24 17:08:18 +01:00
41f1a18887 Bump Paperless AI chart version and app version
All checks were successful
Build Helm Chart / helm-package (push) Successful in 1m11s
Updated the version number of the Paperless AI Helm chart from
0.1.2 to 0.1.3 and the application version from 3.0.7 to 3.0.9.
These changes are necessary to reflect the latest updates and
improvements in the application, ensuring compatibility with
new features and bug fixes. No breaking changes were introduced,
so existing configurations should remain functional. This
update aligns the chart metadata with the current state of the
application.
2025-11-24 14:20:37 +01:00
872ada2e0c Bump version to 0.25.10 and update readiness/liveness probes
Some checks failed
Build Helm Chart / helm-package (push) Failing after 34s
Updated the Paperless-ngx Helm chart version to 0.25.10. The
README and Chart.yaml files were modified to reflect this new
version. Additionally, the readiness and liveness probes in the
values.yaml were changed from EXEC type to HTTP type for better
monitoring and consistency. This adjustment ensures that the probes
directly check the application’s health through HTTP requests to
the main path, improving the reliability of the health checks.
No breaking changes are introduced, but users should verify that
the application responds correctly to the new health check
configuration.
2025-11-23 16:50:33 +01:00
27a30f6041 Update paperless-ngx to version 0.25.9 and modify probes
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
Updated the paperless-ngx Helm chart to version 0.25.9, which
includes a change in the readiness and liveness probes. The probe
type has been switched from HTTP to EXEC, utilizing the curl
command to ensure proper container health checks. This adjustment
provides a more reliable method for checking the application's
availability as traditional HTTP checks may not work correctly when
the service is still initializing or dependent services are not
fully ready. The standard path and port settings have been commented
out to accommodate this change. No breaking changes are introduced,
but users should validate probe functionality in their deployments.
2025-11-23 16:39:07 +01:00
cbc54e4a02 Update paperless-ngx to version 0.25.8
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
Bumped the paperless-ngx chart version from 0.25.7 to 0.25.8 in
Chart.yaml and updated the version badge in README.md to reflect
this change. The appVersion remains at 2.20.0.

Additionally, modified the type fields for readiness and liveness
probes in values.yaml from lowercase 'http' to uppercase 'HTTP'
for consistency and adherence to expected conventions. This change
ensures proper interpretation by Kubernetes. No breaking changes
have been introduced in this update.
2025-11-23 16:30:32 +01:00
acf95d58a3 Bump paperless-ngx version to 0.25.7 and update probes
All checks were successful
Build Helm Chart / helm-package (push) Successful in 22s
Updated the paperless-ngx Helm chart to version 0.25.7 from
0.25.6 to incorporate the latest features and fixes. The appVersion
remains at 2.20.0.

Additionally, modified the liveness and readiness probes
configuration in the values.yaml file to nest probe options
under the spec field, aligning with best practices for Helm charts.
These changes normalize the probe specifications, ensuring better
compatibility and clarity for users managing their Kubernetes
deployments. No breaking changes were introduced in these updates.
2025-11-23 16:26:06 +01:00
841a8dafb0 Update paperless-ngx to version 0.25.6
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
Updated the Chart.yaml and README.md files for the
paperless-ngx Helm chart to reflect the new version
0.25.6. This change is necessary to ensure that users
are aware of the latest updates and improvements in
the software. The appVersion remains at 2.20.0, and
the kubeVersion is still set to ">=1.28.0-0". The
README badge for the version has also been updated
to maintain consistency and inform users of the
current version being used.
2025-11-23 16:22:18 +01:00
48f0388d3b Update paperless-ngx chart version and readiness checks
All checks were successful
Build Helm Chart / helm-package (push) Successful in 22s
Improved the readiness and liveness probes for the paperless-ngx
chart by switching from exec commands to HTTP GET requests. This
change allows for more reliable checks that verify the application
is up and fully running based on the web server's response.

The readiness probe now checks the root path and will only return
success if the application is fully connected to the database and
Redis, improving traffic flow during startup.

In addition, the chart version was updated from 0.25.0 to 0.25.1
to reflect these changes. There are no breaking changes, but the
adjustments to the probes enhance the overall stability and
monitoring capabilities of the deployment.
2025-11-23 16:17:13 +01:00
32e59538a4 Update paperless-ngx chart version to 0.25.0
All checks were successful
Build Helm Chart / helm-package (push) Successful in 22s
Changed the chart version from 0.25.4 to 0.25.0 in Chart.yaml and
README.md to reflect the correct release version. This ensures that
users are aware of the currently deployed version of the application.

Additionally, updated the configuration in values.yaml by adding
the `spec` section under the `readiness` and `liveness` probes.
This clarifies the configuration structure and ensures compatibility
with the latest Helm chart practices.

No breaking changes were introduced in this update.
2025-11-23 16:09:59 +01:00
b8bbe61b5c Update paperless-ngx to version 0.25.4 and add probes
All checks were successful
Build Helm Chart / helm-package (push) Successful in 22s
This commit updates the paperless-ngx Helm chart to version
0.25.4, reflecting the latest version in Chart.yaml and in
the README.md badge. The homepage URL has been changed to
point to the new repository location.

Additionally, liveness and readiness probes have been added
to the values.yaml configuration. These probes utilize curl
to check the application's health on localhost:8000, ensuring
better handling of container lifecycles.

The readiness probe starts after a 60-second delay, while
the liveness probe has a longer delay of 120 seconds, helping
to manage startup times effectively.

No breaking changes are introduced, but users should review
the new probes configuration for their deployments.
2025-11-23 15:48:57 +01:00
c571f6b93e Bump chart version to 0.25.3 for paperless-ngx
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
Updated the version in the Chart.yaml file from 0.25.2 to 0.25.3.
This change reflects the latest stable release of the paperless-ngx
chart, ensuring users can access the most recent features and
patches. Keeping the chart version aligned with upstream releases is
essential for maintaining compatibility and leveraging enhancements
in new versions. No breaking changes are introduced with this update.
2025-11-23 15:13:05 +01:00
712b12e1b4 Bump paperless-ngx chart version to 0.25.2
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
This commit updates the version of the paperless-ngx Helm chart
from 0.25.1 to 0.25.2. This change is necessary to ensure that
users are able to utilize the latest features, enhancements,
and bug fixes introduced in the new chart version. The app
version remains at 2.20.0, compatible with Kubernetes
version >=1.28.0-0. No breaking changes are introduced with
this version bump.
2025-11-23 15:10:04 +01:00
84c0c59b2b Fix version number and update persistence configuration
All checks were successful
Build Helm Chart / helm-package (push) Successful in 22s
Updated the version number in `Chart.yaml` from 0.25.2 to 0.25.1 to
reflect the correct release version. In the `values.yaml`, modified
the persistence configuration for data, media, export, and consume
to remove the old `mountPath` entries and added a new `globalMounts`
list that includes path specifications for each of these persistence
types. This change is intended to simplify the configuration and make
it more flexible by using global mounts for better data organization
and easier access management.

No breaking changes are introduced in this update.
2025-11-23 15:08:40 +01:00
0ceef2beaa Update paperless-ngx chart version to 0.25.2
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
This commit updates the version of the paperless-ngx Helm chart
from 0.25.1 to 0.25.2. This change is necessary to ensure that
users are able to take advantage of the latest features,
bug fixes, and improvements provided in the new release.
The appVersion remains at 2.20.0, and the kubeVersion
requirement is maintained at ">=1.28.0-0". No breaking changes
are introduced with this version bump.
2025-11-23 14:13:34 +01:00
b87edead66 Update paperless-ngx chart version to 0.25.1
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
This commit updates the version of the paperless-ngx Helm chart
from 0.25.0 to 0.25.1. This change is necessary to ensure that users
can take advantage of the latest features, improvements, and bug
fixes that come with the updated version of the application.

It's essential for users to keep their deployments updated to
maintain compatibility and benefit from ongoing enhancements.
There are no breaking changes or important notes related to this
version bump.
2025-11-23 14:07:51 +01:00
070ca0e62c Update paperless-ngx chart version to 0.25.0
All checks were successful
Build Helm Chart / helm-package (push) Successful in 22s
The version number for the paperless-ngx chart has been
downgraded from 0.25.1 to 0.25.0 in the Chart.yaml file.
This change may have been necessary due to issues or bugs
identified in the 0.25.1 release that require reverting to
a more stable version. The appVersion remains unchanged at
2.20.0, and the kubeVersion requirement is still set to
"">=1.28.0-0".

No breaking changes are introduced with this version
rollback, but users should ensure that their deployments
are compatible with the features and functionality provided
in version 0.25.0.
2025-11-23 14:06:24 +01:00
ac8181519c Refactor hardcoded environment variables in common.yaml
Removed hardcoded environment variables from the `common.yaml` template and
refactored them to utilize the newly structured values from `Values.controllers.main.containers.main.env`.
This change enhances maintainability and clarity by aligning environmental
variables with the current values schema. Additionally, the code was cleaned
up by ensuring proper indentation and structure for readability.
No breaking changes or significant shifts in functionality were introduced;
the refactor merely improves the organization of environment configuration.
2025-11-23 14:05:37 +01:00
5f201ba918 Refactor environment variable definitions in common.yaml
This commit refactors the environment variable definitions
in the `common.yaml` template for the Paperless-ngx chart.
The structure has been simplified by removing the unnecessary
nested "controllers: main: type: deployment" section, directly
defining the `env` block. This improves readability and
maintainability of the Helm template.

No functional changes were introduced, and existing behaviors
are preserved. The refactor aims to streamline the configuration
management process for better clarity when setting up
environment variables related to services like PostgreSQL,
MariaDB, and Redis.
2025-11-23 13:12:58 +01:00
d3a54f13b0 Refactor environment variables in deployment template
The environment variables for the Paperless-NGX deployment have been
refactored and moved into the main container section within the
Kubernetes deployment manifest. This change organizes the
environment variable definitions, enhancing readability and
maintainability.

Key modifications include:
- Moved the `env` section under `containers.main`, allowing for
  a clearer structure.
- Retained the logic for PostgreSQL, MariaDB, and Redis database
  configuration while ensuring environment variables are set
  within the context of the main application container.

This change does not introduce any breaking functionality, but
it does improve the clarity and intent of the configuration.
2025-11-23 13:01:43 +01:00
5bac34870f Update paperless-ngx version to 0.25.1 and dependencies
All checks were successful
Build Helm Chart / helm-package (push) Successful in 22s
The version of the paperless-ngx chart has been incremented from 0.25.0
to 0.25.1 to reflect updates. The appVersion remains at 2.20.0, but
the Kubernetes version requirement has been updated from `>=1.22.0-0`
to `>=1.28.0-0`.

Additionally, the dependencies for the chart have been updated to
reflect newer versions:
- common: 4.4.0
- mariadb: 23.2.4
- postgresql: 18.1.11
- redis: 24.0.0

The installation instructions have also been updated to use a new
repository, changing the command from `gabe565` to `cooltux`.

These changes ensure compatibility with more recent Kubernetes versions
and dependencies, improving overall stability and performance of the
chart.
2025-11-23 12:08:39 +01:00
c843b3697c Remove Chart.lock and update values.yaml for persistence
In this commit, the `Chart.lock` file for the `paperless-ngx` chart
has been deleted, which typically signifies a change in dependencies
or a reset of the chart environment. This may be necessary when
dependencies have been altered or are no longer needed.

Additionally, the `values.yaml` file was modified to uncomment and
standardize the persistence volume configuration parameters. The
`storageClass`, `accessMode`, and `size` fields for multiple
persisted volumes (data, media, export, consume) were adjusted to
enable the volumes in a clearer format. This change improves the
2025-11-23 12:01:36 +01:00
97c32612d6 Update workflow to build Helm chart on main branch
This commit modifies the Git workflow for building the Helm chart
for Paperless NGX. The primary change is the update of the
triggering branch from 'patch-new-paperless' to 'main' for push
events. Additionally, the paths filter is re-enabled to ensure
that the workflow only triggers when changes are made to
"charts/paperless-ngx/Chart.yaml".

These adjustments were necessary to align the workflow with the
project's main branch, ensuring that any updates to the Helm
chart are promptly built and packaged. There are no breaking
changes in this update, but the workflow will not execute for
changes on other branches.
2025-11-23 11:21:45 +01:00
aa63d656a9 Refactor container settings in values.yaml for clarity
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
The structure of the container options in the `values.yaml` file has been
modified to improve clarity and organization. The `defaultContainerOptions`
section has been replaced with a `containers` section containing a
`main` container. This change enhances readability and aligns with common
best practices for defining container settings in Helm charts.

No breaking changes were introduced, and the default image repository
and tag remain unchanged. This refactor aims to streamline the
configuration process for users.
2025-11-23 11:18:38 +01:00
c4447d9b97 Set resources to default in Paperless-NGX values.yaml
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
This commit modifies the `values.yaml` file for the Paperless-NGX Helm
chart by changing the configuration for resources under the controllers
section. The line for resource request/limits was previously commented
out, and this change officially sets the `resources` field to an empty
object (`{}`).

This update provides a clearer structure for users to configure resource
requests and limits for their container setup, allowing for easier
customization according to their deployment needs. No breaking changes
are introduced, but users should now be aware that they can specify
resource requirements directly in this section if desired.
2025-11-23 10:50:23 +01:00
bf6bc5933b Add resource requests/limits documentation in values.yaml
All checks were successful
Build Helm Chart / helm-package (push) Successful in 20s
This commit adds documentation comments in the
charts/paperless-ngx/values.yaml file regarding the
setting of resource requests and limits for the
container. The addition aims to clarify how users can
customize resource management for their Paperless-ngx
deployment. There were no functional changes made to
the code; the comment serves as a guide for future
configuration. No breaking changes were introduced.
2025-11-23 10:48:23 +01:00
51b93689be Remove unnecessary commented options in values.yaml
All checks were successful
Build Helm Chart / helm-package (push) Successful in 23s
In the `charts/paperless-ngx/values.yaml` file, I removed the
uncommented `enabled` and `replicas` options under the `controllers.main`
section. These configurations were previously commented out and were not
being used, which can lead to confusion for users looking to configure
the deployment.

This change simplifies the file, making it clearer that these options
are not currently in use. There are no breaking changes as this does not
affect the existing functionality of the chart.
2025-11-23 09:22:03 +01:00
55f527a927 Disable main controller in Paperless-NGX values
All checks were successful
Build Helm Chart / helm-package (push) Successful in 21s
The main controller in the Paperless-NGX Helm chart has been
disabled by commenting out the 'enabled' and 'replicas' options in
the values.yaml file. This change was made to prevent
unintended deployment of the main controller when the chart
is installed or upgraded.

Since the main controller is not currently needed, this will
allow for easier management of resources and prevent any
potential conflicts during deployments. Please ensure that
this change is aligned with the project's deployment strategy.
2025-11-23 09:18:23 +01:00
2b7c10b774 Remove unnecessary header from NOTES.txt file
All checks were successful
Build Helm Chart / helm-package (push) Successful in 22s
This commit removes the header that was previously included at the
beginning of the NOTES.txt file in the Paperless-NGX chart. The
header line, which referenced a common library for rendering, was
not needed for the proper function of the NOTES.txt file and
cluttered the installation message.

The main content of the file now directly congratulates users on
the successful installation of the Paperless-NGX chart and
provides instructions for accessing the application. No
functional changes to the application were introduced, and there
are no breaking changes associated with this update.
2025-11-23 09:14:33 +01:00
cd0b54da0e Refactor environment variable section in values.yaml
Some checks failed
Build Helm Chart / helm-package (push) Failing after 20s
Updated the formatting of the `env` section in the
`charts/paperless-ngx/values.yaml` file for improved clarity.
The changes include reformatting the environment variables
under the `env` key, placing them in a more readable structure
while maintaining the same functionality. This adjustment
enhances consistency across the configuration file, aiding
in better comprehension and maintenance. No breaking changes
were introduced, and the existing values remain unchanged.
2025-11-23 09:12:19 +01:00
173421cc42 Update environment variable formatting in values.yaml
Some checks failed
Build Helm Chart / helm-package (push) Failing after 21s
Improved the formatting of the environment variable section in the
`values.yaml` file within the `charts/paperless-ngx` directory. The
change includes a reindentation of the `env` block to enhance readability
and maintain consistency. This adjustment does not affect functionality
or introduce any breaking changes, but it ensures that the YAML
structure remains clean and is easier to understand for future
modifications.
2025-11-23 09:10:35 +01:00
cc4992be24 Add installation notes and restructure environment variables
Some checks failed
Build Helm Chart / helm-package (push) Failing after 22s
Updated the NOTES.txt template to include a congratulatory
message upon successful installation of the Paperless-NGX
chart and added a reminder to check the 'main' service for
access details.

In the values.yaml file, the structure of the environment
variables section has been modified for improved clarity
and readability. This rearrangement maintains the existing
configuration while making it easier to understand where
environment variables are defined.

No breaking changes were introduced; the functionality remains
intact.
2025-11-23 09:02:01 +01:00
44675e0046 Refactor image configuration in paperless-ngx chart
Some checks failed
Build Helm Chart / helm-package (push) Failing after 20s
This commit restructures the image configuration in the
paperless-ngx Helm chart. The image repository, pull policy,
and tag have been moved under a new `controllers` section
to standardize the deployment options. The main controller
is now explicitly defined with settings for type and
replicas, improving clarity and maintainability of the
values.yaml configuration.

This change was necessary to align the structure with
updated chart specifications and to facilitate future
expansion of controller types within the chart.

No breaking changes are introduced, but users should be
aware of the new hierarchy in the configuration
structure.
2025-11-23 08:54:25 +01:00
bdc614097e Add controller setting and persistence configurations
Some checks failed
Build Helm Chart / helm-package (push) Failing after 20s
Updated the `values.yaml` file for the Paperless-ngx chart.
- Added a `controller` setting under the `main` service to specify
  the controller explicitly for better clarity and configuration.
- Removed the annotations under the `ingress.main` section to simplify
  the configuration for better customization, if needed in the future.
- Uncommented and defined `accessMode` and `size` for both the
  `export` and `consume` persistence volumes to ensure proper
  configuration is applied, thereby enabling persistent data storage.

These changes help in improving the chart's configurability
and ensure that default values for persistence settings are applied,
preventing issues with data retention. There are no breaking changes.
2025-11-23 08:40:37 +01:00
062744c989 Update dependencies for PostgreSQL, MariaDB, and Redis
Some checks failed
Build Helm Chart / helm-package (push) Failing after 21s
Updated the versions of PostgreSQL, MariaDB, and Redis in the
paperless-ngx Chart.yaml file. The PostgreSQL version was
bumped from 17.0.1 to 18.1.11, MariaDB from 23.0.1 to 23.2.4,
and Redis from 23.0.4 to 24.0.0. These updates are necessary
to ensure compatibility with the latest features and fixes
introduced in these dependencies. No breaking changes
are anticipated as the updates remain within the major version
boundaries. It's essential to test the application after
these updates to confirm stability and functionality.
2025-11-23 08:20:39 +01:00
0e7b22122e Update dependencies and kubeVersion in Chart.yaml
Some checks failed
Build Helm Chart / helm-package (push) Failing after 14s
The kubeVersion has been updated from ">=1.22.0-0" to
">=1.28.0-0" to ensure compatibility with newer Kubernetes
versions.

Dependencies have also been updated: the "common" chart
repository was updated from "https://bjw-s.github.io/helm-charts"
to "https://bjw-s-labs.github.io/helm-charts/" and its version
was bumped to 4.4.0. The "postgresql" dependency version was
changed from 14.0.5 to 17.0.1, the "mariadb" version
was updated from 20.1.1 to 23.0.1, and the "redis" version
was upgraded from 20.7.0 to 23.0.4.

These updates are necessary to take advantage of the latest
features, improvements, and security patches in the respective
charts while ensuring compatibility with Paperless-ngx.
2025-11-23 08:17:01 +01:00
0218a1f707 Update Helm repository URL and modify workflow paths
Some checks failed
Build Helm Chart / helm-package (push) Failing after 8s
The workflow file for building the Paperless-NGX Helm chart
has been updated. The path specification for the "push" event
has been commented out, allowing the workflow to trigger for
any changes to the branch rather than just modifications to
the "Chart.yaml" file.

Additionally, the Helm repository URL for "bjw-s" has been
corrected to point to the proper location at
"bjw-s-labs.github.io/helm-charts/" to ensure that the latest
charts are accessible.

These changes help improve the workflow flexibility and
correct repository access.
2025-11-23 08:10:08 +01:00
9ec413f50c new paperless-ngx
Some checks failed
Build Helm Chart / helm-package (push) Failing after 17s
2025-11-23 08:03:38 +01:00
363946b064 Update Dokuwiki image version to 20251031
All checks were successful
Build Helm Chart / helm-package (push) Successful in 4s
This commit updates the Dokuwiki Docker image version in both
the Chart.yaml and values.yaml files from
`20250918-debian-12` to `20251031`.

The change was necessary to ensure users are running the latest
version of the Dokuwiki application, which may include important
security patches, bug fixes, and new features that enhance
overall stability and performance.

Additionally, the chart version has been updated to `1.2.1`
to reflect this change. No breaking changes are introduced with
this update, but users should test the new version to ensure
compatibility with their existing configurations.
2025-10-31 16:25:39 +01:00
1b93a9612d Delete Keycloak Helm chart and related files
This commit removes the entire Keycloak Helm chart and its related
resources from the repository. The decision to delete the chart was
necessary due to a strategic shift in managing our infrastructure,
which no longer requires the use of this particular Helm chart.

As part of this change, all relevant files including the
`.gitea/workflows/build-chart-keycloak.yml`, `README.md`,
`Chart.yaml`, `Chart.lock`, and all templates and values files
associated with the Keycloak chart have been deleted. This action
eliminates overhead and potential confusion related to outdated and
unnecessary configurations.

No direct replacements or migration paths are provided, and users
should seek alternative solutions for deploying Keycloak or related
functionalities. Future updates will focus on the remaining
components of our infrastructure.
2025-10-31 12:23:08 +01:00
f4d9561330 Update paperless-ngx version to 0.25.1
Some checks failed
Build Helm Chart / helm-package (push) Failing after 7s
Updated the version number in the Chart.yaml file for the
paperless-ngx chart from 0.25.0 to 0.25.1. This change was made
to reflect the latest release version of the application,
ensuring that users can deploy the updated features and
bug fixes included in this version. No breaking changes
are introduced with this update, and it is important for
users to keep their deployments current with the latest
releases for optimal performance and security.
2025-10-31 12:19:24 +01:00
c724a38dda Fix app path in build-chart-paperless-ngx.yml
Updated the APP environment variable in the Helm package job from
'charts/pperless-ngx' to 'charts/paperless-ngx'. This change was
necessary to correct the path to the Paperless NGX chart, ensuring
that the workflow refers to the correct directory. The previous path
contained a typo which would have resulted in build errors. There are
no breaking changes introduced with this update.
2025-10-31 12:18:45 +01:00
306 changed files with 683 additions and 38039 deletions

View File

@@ -4,13 +4,13 @@ on:
branches: branches:
- main - main
paths: paths:
- "charts/keycloak/Chart.yaml" - "charts/calibre-web/Chart.yaml"
jobs: jobs:
helm-package: helm-package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
APP: charts/keycloak APP: charts/calibre-web
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3

View File

@@ -10,7 +10,7 @@ jobs:
helm-package: helm-package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
APP: charts/pperless-ngx APP: charts/paperless-ngx
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@@ -32,6 +32,11 @@ jobs:
curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.4 && chmod +x /usr/local/bin/helm curl -kSso /usr/local/bin/helm https://debmirror.cooltux.net/helm-v3.18.4 && chmod +x /usr/local/bin/helm
helm version helm version
- name: Add Helm repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add bjw-s https://bjw-s-labs.github.io/helm-charts/
- name: Package Helm Chart - name: Package Helm Chart
run: | run: |
helm dependency update ${{ env.APP }} helm dependency update ${{ env.APP }}

View File

@@ -2,8 +2,8 @@ apiVersion: v2
name: audiobookshelf name: audiobookshelf
description: A Helm chart for Audiobookshelf description: A Helm chart for Audiobookshelf
type: application type: application
version: 1.11.0 version: 1.11.1
appVersion: "2.30.0" appVersion: "2.31.0"
home: https://git.cooltux.net/marko/HelmChartSammlung/src/branch/main/charts/audiobookshelf home: https://git.cooltux.net/marko/HelmChartSammlung/src/branch/main/charts/audiobookshelf
keywords: keywords:
- audiobookshelf - audiobookshelf

View File

@@ -0,0 +1,17 @@
apiVersion: v2
name: calibre-web
description: Calibre-Web is a web app that offers a clean and intuitive interface for browsing, reading, and downloading eBooks using a valid Calibre database.
version: 0.9.1
appVersion: 0.6.25-ls360
keywords:
- calibre
- ebook
- calibre-web
home: https://git.cooltux.net/marko/HelmChartSammlung/src/branch/main/charts/calibre-web
sources:
- https://github.com/janeczku/calibre-web
- https://git.cooltux.net/marko/HelmChartSammlung/src/branch/main/charts/calibre-web
maintainers:
- name: Marko Oldenburg
email: development@cooltux.net
url: https://git.cooltux.net/marko

View File

@@ -0,0 +1,18 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "calibre-web.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "calibre-web.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "calibre-web.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "calibre-web.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
{{- end }}

View File

@@ -0,0 +1,63 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "calibre-web.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "calibre-web.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "calibre-web.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "calibre-web.labels" -}}
helm.sh/chart: {{ include "calibre-web.chart" . }}
{{ include "calibre-web.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "calibre-web.selectorLabels" -}}
app.kubernetes.io/name: {{ include "calibre-web.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "calibre-web.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "calibre-web.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,91 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "calibre-web.fullname" . }}
labels:
{{- include "calibre-web.labels" . | nindent 4 }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "calibre-web.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "calibre-web.selectorLabels" . | nindent 8 }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "calibre-web.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{ toYaml .Values.env | nindent 12 }}
ports:
- name: http
containerPort: 8083
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
periodSeconds: 10
failureThreshold: 3
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /
port: http
periodSeconds: 5
failureThreshold: 3
initialDelaySeconds: 10
volumeMounts:
- name: data
mountPath: /books
- name: config
mountPath: /config
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: data
persistentVolumeClaim:
{{- if .Values.persistence.data.claimName }}
claimName: "{{ .Values.persistence.data.claimName }}"
{{- else }}
claimName: "{{ template "calibre-web.fullname" . }}-data"
{{- end }}
- name: config
persistentVolumeClaim:
{{- if .Values.persistence.config.claimName }}
claimName: "{{ .Values.persistence.config.claimName }}"
{{- else }}
claimName: "{{ template "calibre-web.fullname" . }}-config"
{{- 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 }}

View File

@@ -0,0 +1,64 @@
{{- if .Values.ingress.enabled }}
{{- $fullName := "calibre-web" -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app.kubernetes.io/name: excalidraw
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "calibre-web.fullname" . }}
labels:
{{- include "calibre-web.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "calibre-web.selectorLabels" . | nindent 4 }}

View File

@@ -0,0 +1,8 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "calibre-web.serviceAccountName" . }}
labels:
{{ include "calibre-web.labels" . | nindent 4 }}
{{- end -}}

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "calibre-web.fullname" . }}-test-connection"
labels:
{{ include "calibre-web.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "calibre-web.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never

View File

@@ -0,0 +1,44 @@
{{- if not .Values.persistence.config.claimName }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "calibre-web.fullname" . }}-config
labels:
app: {{ template "calibre-web.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: config
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: {{ .Values.persistence.config.size | quote }}
{{- if .Values.persistence.config.storageClass }}
storageClassName: {{ .Values.persistence.config.storageClass | quote }}
{{- end }}
---
{{- end }}
{{- if not .Values.persistence.data.claimName }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "calibre-web.fullname" . }}-data
labels:
app: {{ template "calibre-web.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: data
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: {{ .Values.persistence.data.size | quote }}
{{- if .Values.persistence.data.storageClass }}
storageClassName: {{ .Values.persistence.data.storageClass | quote }}
{{- end }}
---
{{- end }}

View File

@@ -0,0 +1,114 @@
# Default values for calibre-web.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: linuxserver/calibre-web
tag: ""
pullPolicy: IfNotPresent
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 80
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
env: []
# - name: USE_CONFIG_DIR
# value: "true"
# - name: SET_CONTAINER_TIMEZONE
# value: "true"
# - name: CONTAINER_TIMEZONE
# value: "UTC"
# - name: PUID
# value: 1029
# - name: PGID
# value: 65539
# - name: ADVANCED_DISABLEUPDATES
# value: "true"
persistence:
data:
# Optionally specify claimName to manually override the PVC to be used for
# the data directory. If claimName is specified, storageClass and size are
# ignored.
## claimName: "calibre-data-pvc"
# Optionally specify a storage class to be used for the data directory.
# If not specified and claimName is not specified, the default storage
# class will be used.
storageClass: ""
# The requested size of the volume to be used when creating a
# PersistentVolumeClaim.
size: 2Gi
config:
# Optionally specify claimName to manually override the PVC to be used for
# the config directory. If claimName is specified, storageClass and size
# are ignored.
## claimName: "calibre-config-pvc"
# Optionally specify a storage class to be used for the config directory.
# If not specified and claimName is not specified, the default storage
# class will be used.
storageClass: ""
# The requested size of the volume to be used when creating a
# PersistentVolumeClaim.
size: 50Mi
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
annotations: []
podAnnotations: []
affinity: {}

View File

@@ -8,16 +8,16 @@ annotations:
- name: apache-exporter - name: apache-exporter
image: docker.io/bitnami/apache-exporter:1.0.10-debian-12-r5 image: docker.io/bitnami/apache-exporter:1.0.10-debian-12-r5
- name: dokuwiki - name: dokuwiki
image: git.cooltux.net/marko/docker-dokuwiki-debian12:20250516-debian-12 image: git.cooltux.net/marko/docker-dokuwiki-debian12:20251031
- name: os-shell - name: os-shell
image: docker.io/bitnami/os-shell:12-debian-12-r43 image: docker.io/bitnami/os-shell:12-debian-12-r43
apiVersion: v2 apiVersion: v2
dependencies: dependencies:
- name: common - name: common
repository: oci://registry-1.docker.io/bitnamicharts repository: oci://registry-1.docker.io/bitnamicharts
tags: tags:
- bitnami-common - bitnami-common
version: 2.x.x version: 2.x.x
description: DokuWiki is a standards-compliant wiki optimized for creating documentation. Designed to be simple to use for small organizations, it stores all data in plain text files so no database is required. description: DokuWiki is a standards-compliant wiki optimized for creating documentation. Designed to be simple to use for small organizations, it stores all data in plain text files so no database is required.
home: https://bitnami.com home: https://bitnami.com
icon: https://bitnami.com/assets/stacks/dokuwiki/img/dokuwiki-stack-220x234.png icon: https://bitnami.com/assets/stacks/dokuwiki/img/dokuwiki-stack-220x234.png
@@ -32,5 +32,5 @@ maintainers: []
name: dokuwiki name: dokuwiki
sources: sources:
- https://git.cooltux.net/Interne-Entwicklungen/TuxNet-helm-charts.git/dokuwiki - https://git.cooltux.net/Interne-Entwicklungen/TuxNet-helm-charts.git/dokuwiki
version: 1.2.0 version: 1.2.1
appVersion: "20250918-debian-12" appVersion: "20251031"

View File

@@ -70,7 +70,7 @@ extraDeploy: []
image: image:
registry: git.cooltux.net registry: git.cooltux.net
repository: marko/docker-dokuwiki-debian12 repository: marko/docker-dokuwiki-debian12
tag: "20250918-debian-12" tag: "20251031"
digest: "" digest: ""
## Specify a imagePullPolicy ## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'

View File

@@ -1,25 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
# img folder
img/
# Changelog
CHANGELOG.md

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +0,0 @@
dependencies:
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 16.7.24
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.31.3
digest: sha256:d8069a70d0f19ff31989b0755d92997aae49301596058d679b002f678315ab9e
generated: "2025-08-10T11:18:09.390206634+02:00"

View File

@@ -1,40 +0,0 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
annotations:
category: DeveloperTools
images: |
- name: keycloak
image: docker.io/bitnami/keycloak:26.3.2-debian-12-r1
- name: keycloak-config-cli
image: docker.io/bitnami/keycloak-config-cli:6.4.0-debian-12-r11
licenses: Apache-2.0
tanzuCategory: application
apiVersion: v2
appVersion: 26.3.2
dependencies:
- condition: postgresql.enabled
name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 16.x.x
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- bitnami-common
version: 2.x.x
description:
Keycloak is a high performance Java-based identity and access management
solution. It lets developers add an authentication layer to their applications with
minimum effort.
home: https://bitnami.com
icon: https://dyltqmyl993wv.cloudfront.net/assets/stacks/keycloak/img/keycloak-stack-220x234.png
keywords:
- keycloak
- access-management
maintainers:
- name: Broadcom, Inc. All Rights Reserved.
url: https://github.com/bitnami/charts
name: keycloak
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/keycloak
version: 24.9.1

View File

@@ -1,883 +0,0 @@
<!--- app-name: Keycloak -->
# Bitnami package for Keycloak
Keycloak is a high performance Java-based identity and access management solution. It lets developers add an authentication layer to their applications with minimum effort.
[Overview of Keycloak](https://www.keycloak.org/)
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
## TL;DR
```console
helm install my-release oci://registry-1.docker.io/bitnamicharts/keycloak
```
Looking to use Keycloak in production? Try [VMware Tanzu Application Catalog](https://bitnami.com/enterprise), the commercial edition of the Bitnami catalog.
## ⚠️ Important Notice: Upcoming changes to the Bitnami Catalog
Beginning August 28th, 2025, Bitnami will evolve its public catalog to offer a curated set of hardened, security-focused images under the new [Bitnami Secure Images initiative](https://news.broadcom.com/app-dev/broadcom-introduces-bitnami-secure-images-for-production-ready-containerized-applications). As part of this transition:
- Granting community users access for the first time to security-optimized versions of popular container images.
- Bitnami will begin deprecating support for non-hardened, Debian-based software images in its free tier and will gradually remove non-latest tags from the public catalog. As a result, community users will have access to a reduced number of hardened images. These images are published only under the “latest” tag and are intended for development purposes
- Starting August 28th, over two weeks, all existing container images, including older or versioned tags (e.g., 2.50.0, 10.6), will be migrated from the public catalog (docker.io/bitnami) to the “Bitnami Legacy” repository (docker.io/bitnamilegacy), where they will no longer receive updates.
- For production workloads and long-term support, users are encouraged to adopt Bitnami Secure Images, which include hardened containers, smaller attack surfaces, CVE transparency (via VEX/KEV), SBOMs, and enterprise support.
These changes aim to improve the security posture of all Bitnami users by promoting best practices for software supply chain integrity and up-to-date deployments. For more details, visit the [Bitnami Secure Images announcement](https://github.com/bitnami/containers/issues/83267).
## Introduction
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
This chart bootstraps a [Keycloak](https://github.com/bitnami/containers/tree/main/bitnami/keycloak) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Prerequisites
- Kubernetes 1.23+
- Helm 3.8.0+
## Installing the Chart
To install the chart with the release name `my-release`:
```console
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/keycloak
```
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
These commands deploy a Keycloak application on the Kubernetes cluster in the default configuration.
> **Tip**: List all releases using `helm list`
## Configuration and installation details
### Resource requests and limits
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the `resources` value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
To make this process easier, the chart contains the `resourcesPreset` values, which automatically sets the `resources` section according to different presets. Check these presets in [the bitnami/common chart](https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15). However, in production workloads using `resourcesPreset` is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).
### Prometheus metrics
This chart can be integrated with Prometheus by setting `metrics.enabled` to `true`. This will expose Keycloak native Prometheus endpoint in a `metrics` service, which can be configured under the `metrics.service` section. It will have the necessary annotations to be automatically scraped by Prometheus.
#### Prometheus requirements
It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the [Bitnami Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/prometheus) or the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) to easily have a working Prometheus in your cluster.
#### Integration with Prometheus Operator
The chart can deploy `ServiceMonitor` objects for integration with Prometheus Operator installations. To do so, set the value `metrics.serviceMonitor.enabled=true`. Ensure that the Prometheus Operator `CustomResourceDefinitions` are installed in the cluster or it will fail with the following error:
```text
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
```
Install the [Bitnami Kube Prometheus helm chart](https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus) for having the necessary CRDs and the Prometheus Operator.
### [Rolling vs Immutable tags](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html)
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
### Update credentials
Bitnami charts configure credentials at first boot. Any further change in the secrets or credentials require manual intervention. Follow these instructions:
- Update the user password following [the upstream documentation](https://www.keycloak.org/server/configuration)
- Update the password secret with the new values (replace the SECRET_NAME and PASSWORD placeholders)
```shell
kubectl create secret generic SECRET_NAME --from-literal=admin-password=PASSWORD --dry-run -o yaml | kubectl apply -f -
```
### Use an external database
Sometimes, you may want to have Keycloak connect to an external PostgreSQL database rather than a database within your cluster - for example, when using a managed database service, or when running a single database server for all your applications. To do this, set the `postgresql.enabled` parameter to `false` and specify the credentials for the external database using the `externalDatabase.*` parameters. Here is an example:
```text
postgresql.enabled=false
externalDatabase.host=myexternalhost
externalDatabase.user=myuser
externalDatabase.password=mypassword
externalDatabase.database=mydatabase
externalDatabase.port=5432
externalDatabase.schema=public
```
> NOTE: Only PostgreSQL database server is supported as external database
It is not supported but possible to run Keycloak with an external MSSQL database with the following settings:
```yaml
externalDatabase:
host: "mssql.example.com"
port: 1433
user: keycloak
database: keycloak
existingSecret: passwords
extraEnvVars:
- name: KC_DB # override values from the conf file
value: 'mssql'
- name: KC_DB_URL
value: 'jdbc:sqlserver://mssql.example.com:1433;databaseName=keycloak;'
```
### Importing and exporting a realm
#### Importing a realm
You can import a realm by setting the `KEYCLOAK_EXTRA_ARGS` to contain the `--import-realm` argument.
This will import all `*.json` under `/opt/bitnami/keycloak/data/import` files as a realm into keycloak as per the
official documentation [here](https://www.keycloak.org/server/importExport#_importing_a_realm_from_a_directory). You
can supply the files by mounting a volume e.g. with docker compose as follows:
```yaml
keycloak:
image: bitnami/keycloak:latest
volumes:
- /local/path/to/realms/folder:/opt/bitnami/keycloak/data/import
```
#### Exporting a realm
You can export a realm through the GUI but it will not export users even the option is set, this is a known keycloak
[bug](https://github.com/keycloak/keycloak/issues/23970).
By using the `kc.sh` script you can export a realm with users. Be sure to mount the export folder to a local folder:
```yaml
keycloak:
image: bitnami/keycloak:latest
volumes:
- /local/path/to/export/folder:/export
```
Then open a terminal in the running keycloak container and run:
```bash
kc.sh export --dir /export/ --users realm_file
````
This will export the all the realms with users to the `/export` folder.
### Configure Ingress
This chart provides support for Ingress resources. If you have an ingress controller installed on your cluster, such as [nginx-ingress-controller](https://github.com/bitnami/charts/tree/main/bitnami/nginx-ingress-controller) or [contour](https://github.com/bitnami/charts/tree/main/bitnami/contour) you can utilize the ingress controller to serve your application.To enable Ingress integration, set `ingress.enabled` to `true`.
The most common scenario is to have one host name mapped to the deployment. In this case, the `ingress.hostname` property can be used to set the host name. The `ingress.tls` parameter can be used to add the TLS configuration for this host.
However, it is also possible to have more than one host. To facilitate this, the `ingress.extraHosts` parameter (if available) can be set with the host names specified as an array. The `ingress.extraTLS` parameter (if available) can also be used to add the TLS configuration for extra hosts.
> NOTE: For each host specified in the `ingress.extraHosts` parameter, it is necessary to set a name, path, and any annotations that the Ingress controller should know about. Not all annotations are supported by all Ingress controllers, but [this annotation reference document](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md) lists the annotations supported by many popular Ingress controllers.
Adding the TLS parameter (where available) will cause the chart to generate HTTPS URLs, and the application will be available on port 443. The actual TLS secrets do not have to be generated by this chart. However, if TLS is enabled, the Ingress record will not work until the TLS secret exists.
[Learn more about Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/).
### Configure admin Ingress
In addition to the Ingress resource described above, this chart also provides the ability to define an Ingress for the admin area of Keycloak, for example the `master` realm.
For this scenario, you can use the Keycloak Config CLI integration with the following values, where `keycloak-admin.example.com` is to be replaced by the actual hostname:
```yaml
adminIngress:
enabled: true
hostname: keycloak-admin.example.com
keycloakConfigCli:
enabled: true
configuration:
master.json: |
{
"realm" : "master",
"attributes": {
"frontendUrl": "https://keycloak-admin.example.com"
}
}
```
### Configure TLS Secrets for use with Ingress
This chart facilitates the creation of TLS secrets for use with the Ingress controller (although this is not mandatory). There are several common use cases:
- Generate certificate secrets based on chart parameters.
- Enable externally generated certificates.
- Manage application certificates via an external service (like [cert-manager](https://github.com/jetstack/cert-manager/)).
- Create self-signed certificates within the chart (if supported).
In the first two cases, a certificate and a key are needed. Files are expected in `.pem` format.
Here is an example of a certificate file:
> NOTE: There may be more than one certificate if there is a certificate chain.
```text
-----BEGIN CERTIFICATE-----
MIID6TCCAtGgAwIBAgIJAIaCwivkeB5EMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV
...
jScrvkiBO65F46KioCL9h5tDvomdU1aqpI/CBzhvZn1c0ZTf87tGQR8NK7v7
-----END CERTIFICATE-----
```
Here is an example of a certificate key:
```text
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAvLYcyu8f3skuRyUgeeNpeDvYBCDcgq+LsWap6zbX5f8oLqp4
...
wrj2wDbCDCFmfqnSJ+dKI3vFLlEz44sAV8jX/kd4Y6ZTQhlLbYc=
-----END RSA PRIVATE KEY-----
```
- If using Helm to manage the certificates based on the parameters, copy these values into the `certificate` and `key` values for a given `*.ingress.secrets` entry.
- If managing TLS secrets separately, it is necessary to create a TLS secret with name `INGRESS_HOSTNAME-tls` (where INGRESS_HOSTNAME is a placeholder to be replaced with the hostname you set using the `*.ingress.hostname` parameter).
- If your cluster has a [cert-manager](https://github.com/jetstack/cert-manager) add-on to automate the management and issuance of TLS certificates, add to `*.ingress.annotations` the [corresponding ones](https://cert-manager.io/docs/usage/ingress/#supported-annotations) for cert-manager.
- If using self-signed certificates created by Helm, set both `*.ingress.tls` and `*.ingress.selfSigned` to `true`.
### Securing traffic using TLS
Keycloak can work with TLS interally by setting `tls.enabled=true`. The chart allows two configuration options:
- Provide your own secret using the `tls.existingSecret` value. Also set the correct name of the truststore and keystore using the `tls.truststoreFilename` and `tls.keystoreFilename` values.
- Have the chart auto-generate the certificates using `tls.autoGenerated=true`.
### Use with ingress offloading SSL
If your ingress controller has the SSL Termination, you should set `proxy` to `edge`.
### Manage secrets and passwords
This chart provides several ways to manage passwords:
- Values passed to the chart: In this scenario, a new secret including all the passwords will be created during the chart installation. When upgrading, it is necessary to provide the secrets to the chart as shown below. Replace the KC_BOOTSTRAP_ADMIN_PASSWORD, POSTGRESQL_PASSWORD and POSTGRESQL_PVC placeholders with the correct passwords and PVC name.
```console
helm upgrade keycloak bitnami/keycloak \
--set auth.adminPassword=KC_BOOTSTRAP_ADMIN_PASSWORD \
--set postgresql.postgresqlPassword=POSTGRESQL_PASSWORD \
--set postgresql.persistence.existingClaim=POSTGRESQL_PVC
```
- An existing secret with all the passwords via the `existingSecret` parameter.
### Backup and restore
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using [Velero](https://velero.io/), a Kubernetes backup/restore tool. Find the instructions for using Velero in [this guide](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-backup-restore-deployments-velero-index.html).
### Add extra environment variables
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property.
```yaml
extraEnvVars:
- name: KEYCLOAK_LOG_LEVEL
value: DEBUG
```
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values.
### Use Sidecars and Init Containers
If additional containers are needed in the same pod (such as additional metrics or logging exporters), they can be defined using the `sidecars` config parameter.
```yaml
sidecars:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
```
If these sidecars export extra ports, extra port definitions can be added using the `service.extraPorts` parameter (where available), as shown in the example below:
```yaml
service:
extraPorts:
- name: extraPort
port: 11311
targetPort: 11311
```
> NOTE: This Helm chart already includes sidecar containers for the Prometheus exporters (where applicable). These can be activated by adding the `--enable-metrics=true` parameter at deployment time. The `sidecars` parameter should therefore only be used for any extra sidecar containers.
If additional init containers are needed in the same pod, they can be defined using the `initContainers` parameter. Here is an example:
```yaml
initContainers:
- name: your-image-name
image: your-image
imagePullPolicy: Always
ports:
- name: portname
containerPort: 1234
```
Learn more about [sidecar containers](https://kubernetes.io/docs/concepts/workloads/pods/) and [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/).
### Initialize a fresh instance
The [Bitnami Keycloak](https://github.com/bitnami/containers/tree/main/bitnami/keycloak) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, you can specify custom scripts using the `initdbScripts` parameter as dict.
In addition to this option, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the previous option.
The allowed extensions is `.sh`.
### Deploy extra resources
There are cases where you may want to deploy extra objects, such a ConfigMap containing your app's configuration or some extra deployment with a micro service used by your app. For covering this case, the chart allows adding the full specification of other objects using the `extraDeploy` parameter.
### Set Pod affinity
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod's affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/main/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
## Parameters
### Global parameters
| Name | Description | Value |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `global.imageRegistry` | Global Docker image registry | `""` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
| `global.defaultStorageClass` | Global default StorageClass for Persistent Volume(s) | `""` |
| `global.storageClass` | DEPRECATED: use global.defaultStorageClass instead | `""` |
| `global.security.allowInsecureImages` | Allows skipping image verification | `false` |
| `global.compatibility.openshift.adaptSecurityContext` | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | `auto` |
### Common parameters
| Name | Description | Value |
| ------------------------ | --------------------------------------------------------------------------------------- | --------------- |
| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `""` |
| `nameOverride` | String to partially override common.names.fullname | `""` |
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
| `namespaceOverride` | String to fully override common.names.namespace | `""` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `enableServiceLinks` | If set to false, disable Kubernetes service links in the pod spec | `true` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `dnsPolicy` | DNS Policy for pod | `""` |
| `dnsConfig` | DNS Configuration pod | `{}` |
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
| `usePasswordFiles` | Mount credentials as files instead of using environment variables | `true` |
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
| `diagnosticMode.command` | Command to override all containers in the the statefulset | `["sleep"]` |
| `diagnosticMode.args` | Args to override all containers in the the statefulset | `["infinity"]` |
### Keycloak parameters
| Name | Description | Value |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- |
| `image.registry` | Keycloak image registry | `REGISTRY_NAME` |
| `image.repository` | Keycloak image repository | `REPOSITORY_NAME/keycloak` |
| `image.digest` | Keycloak image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
| `image.pullPolicy` | Keycloak image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
| `image.debug` | Specify if debug logs should be enabled | `false` |
| `auth.adminUser` | Keycloak administrator user | `user` |
| `auth.adminPassword` | Keycloak administrator password for the new user | `""` |
| `auth.existingSecret` | Existing secret containing Keycloak admin password | `""` |
| `auth.passwordSecretKey` | Key where the Keycloak admin password is being stored inside the existing secret. | `""` |
| `auth.annotations` | Additional custom annotations for Keycloak auth secret object | `{}` |
| `customCaExistingSecret` | Name of the secret containing the Keycloak custom CA certificates. The secret will be mounted as a directory and configured using KC_TRUSTSTORE_PATHS. | `""` |
| `tls.enabled` | Enable TLS encryption. Required for HTTPs traffic. | `false` |
| `tls.autoGenerated` | Generate automatically self-signed TLS certificates. Currently only supports PEM certificates | `false` |
| `tls.existingSecret` | Existing secret containing the TLS certificates per Keycloak replica | `""` |
| `tls.usePem` | Use PEM certificates as input instead of PKS12/JKS stores | `false` |
| `tls.truststoreFilename` | Truststore filename inside the existing secret | `keycloak.truststore.jks` |
| `tls.keystoreFilename` | Keystore filename inside the existing secret | `keycloak.keystore.jks` |
| `tls.keystorePassword` | Password to access the keystore when it's password-protected | `""` |
| `tls.truststorePassword` | Password to access the truststore when it's password-protected | `""` |
| `tls.passwordsSecret` | Secret containing the Keystore and Truststore passwords. | `""` |
| `spi.existingSecret` | Existing secret containing the Keycloak truststore for SPI connection over HTTPS/TLS | `""` |
| `spi.truststorePassword` | Password to access the truststore when it's password-protected | `""` |
| `spi.truststoreFilename` | Truststore filename inside the existing secret | `keycloak-spi.truststore.jks` |
| `spi.passwordsSecret` | Secret containing the SPI Truststore passwords. | `""` |
| `spi.hostnameVerificationPolicy` | Verify the hostname of the server's certificate. Allowed values: "ANY", "WILDCARD", "STRICT". | `""` |
| `adminRealm` | Name of the admin realm | `master` |
| `production` | Run Keycloak in production mode. TLS configuration is required except when using proxy=edge. | `false` |
| `proxyHeaders` | Set Keycloak proxy headers | `""` |
| `proxy` | reverse Proxy mode edge, reencrypt, passthrough or none | `""` |
| `httpRelativePath` | Set the path relative to '/' for serving resources. Useful if you are migrating from older version which were using '/auth/' | `/` |
| `configuration` | Keycloak Configuration. Auto-generated based on other parameters when not specified | `""` |
| `existingConfigmap` | Name of existing ConfigMap with Keycloak configuration | `""` |
| `extraStartupArgs` | Extra default startup args | `""` |
| `enableDefaultInitContainers` | Deploy default init containers | `true` |
| `initdbScripts` | Dictionary of initdb scripts | `{}` |
| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `""` |
| `command` | Override default container command (useful when using custom images) | `[]` |
| `args` | Override default container args (useful when using custom images) | `[]` |
| `extraEnvVars` | Extra environment variables to be set on Keycloak container | `[]` |
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars | `""` |
| `extraEnvVarsSecret` | Name of existing Secret containing extra env vars | `""` |
### Keycloak statefulset parameters
| Name | Description | Value |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `replicaCount` | Number of Keycloak replicas to deploy | `1` |
| `revisionHistoryLimitCount` | Number of controller revisions to keep | `10` |
| `containerPorts.http` | Keycloak HTTP container port | `8080` |
| `containerPorts.https` | Keycloak HTTPS container port | `8443` |
| `containerPorts.metrics` | Keycloak metrics container port | `9000` |
| `extraContainerPorts` | Optionally specify extra list of additional port-mappings for Keycloak container | `[]` |
| `statefulsetAnnotations` | Optionally add extra annotations on the statefulset resource | `{}` |
| `podSecurityContext.enabled` | Enabled Keycloak pods' Security Context | `true` |
| `podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
| `podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
| `podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
| `podSecurityContext.fsGroup` | Set Keycloak pod's Security Context fsGroup | `1001` |
| `containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
| `containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
| `containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
| `containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` |
| `containerSecurityContext.runAsNonRoot` | Set container's Security Context runAsNonRoot | `true` |
| `containerSecurityContext.privileged` | Set container's Security Context privileged | `false` |
| `containerSecurityContext.readOnlyRootFilesystem` | Set container's Security Context readOnlyRootFilesystem | `true` |
| `containerSecurityContext.allowPrivilegeEscalation` | Set container's Security Context allowPrivilegeEscalation | `false` |
| `containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
| `containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` |
| `resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `small` |
| `resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `livenessProbe.enabled` | Enable livenessProbe on Keycloak containers | `true` |
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `300` |
| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `1` |
| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `readinessProbe.enabled` | Enable readinessProbe on Keycloak containers | `true` |
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` |
| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `startupProbe.enabled` | Enable startupProbe on Keycloak containers | `false` |
| `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` |
| `startupProbe.periodSeconds` | Period seconds for startupProbe | `5` |
| `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
| `startupProbe.failureThreshold` | Failure threshold for startupProbe | `60` |
| `startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `customLivenessProbe` | Custom Liveness probes for Keycloak | `{}` |
| `customReadinessProbe` | Custom Rediness probes Keycloak | `{}` |
| `customStartupProbe` | Custom Startup probes for Keycloak | `{}` |
| `lifecycleHooks` | LifecycleHooks to set additional configuration at startup | `{}` |
| `automountServiceAccountToken` | Mount Service Account token in pod | `true` |
| `hostAliases` | Deployment pod host aliases | `[]` |
| `podLabels` | Extra labels for Keycloak pods | `{}` |
| `podAnnotations` | Annotations for Keycloak pods | `{}` |
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set. | `""` |
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
| `affinity` | Affinity for pod assignment | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Tolerations for pod assignment | `[]` |
| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `[]` |
| `podManagementPolicy` | Pod management policy for the Keycloak statefulset | `Parallel` |
| `priorityClassName` | Keycloak pods' Priority Class Name | `""` |
| `schedulerName` | Use an alternate scheduler, e.g. "stork". | `""` |
| `terminationGracePeriodSeconds` | Seconds Keycloak pod needs to terminate gracefully | `""` |
| `updateStrategy.type` | Keycloak statefulset strategy type | `RollingUpdate` |
| `updateStrategy.rollingUpdate` | Keycloak statefulset rolling update configuration parameters | `{}` |
| `minReadySeconds` | How many seconds a pod needs to be ready before killing the next, during update | `0` |
| `extraVolumes` | Optionally specify extra list of additional volumes for Keycloak pods | `[]` |
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for Keycloak container(s) | `[]` |
| `initContainers` | Add additional init containers to the Keycloak pods | `[]` |
| `sidecars` | Add additional sidecar containers to the Keycloak pods | `[]` |
### Exposure parameters
| Name | Description | Value |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| `service.type` | Kubernetes service type | `ClusterIP` |
| `service.http.enabled` | Enable http port on service | `true` |
| `service.ports.http` | Keycloak service HTTP port | `80` |
| `service.ports.https` | Keycloak service HTTPS port | `443` |
| `service.nodePorts` | Specify the nodePort values for the LoadBalancer and NodePort service types. | `{}` |
| `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
| `service.sessionAffinityConfig` | Additional settings for the sessionAffinity | `{}` |
| `service.clusterIP` | Keycloak service clusterIP IP | `""` |
| `service.loadBalancerIP` | loadBalancerIP for the SuiteCRM Service (optional, cloud specific) | `""` |
| `service.loadBalancerSourceRanges` | Address that are allowed when service is LoadBalancer | `[]` |
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
| `service.annotations` | Additional custom annotations for Keycloak service | `{}` |
| `service.extraPorts` | Extra port to expose on Keycloak service | `[]` |
| `service.extraHeadlessPorts` | Extra ports to expose on Keycloak headless service | `[]` |
| `service.headless.annotations` | Annotations for the headless service. | `{}` |
| `service.headless.extraPorts` | Extra ports to expose on Keycloak headless service | `[]` |
| `ingress.enabled` | Enable ingress record generation for Keycloak | `false` |
| `ingress.ingressClassName` | IngressClass that will be be used to implement the Ingress (evaluated as template) (Kubernetes 1.18+) | `""` |
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
| `ingress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
| `ingress.controller` | The ingress controller type. Currently supports `default` and `gce` | `default` |
| `ingress.hostname` | Default host for the ingress record (evaluated as template) | `keycloak.local` |
| `ingress.hostnameStrict` | Disables dynamically resolving the hostname from request headers. | `false` |
| `ingress.path` | Default path for the ingress record (evaluated as template) | `""` |
| `ingress.servicePort` | Backend service port to use | `http` |
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
| `ingress.labels` | Additional labels for the Ingress resource. | `{}` |
| `ingress.tls` | Enable TLS configuration for the host defined at `ingress.hostname` parameter | `false` |
| `ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
| `ingress.extraHosts` | An array with additional hostname(s) to be covered with the ingress record | `[]` |
| `ingress.extraPaths` | Any additional arbitrary paths that may need to be added to the ingress under the main host. | `[]` |
| `ingress.extraTls` | The tls configuration for additional hostnames to be covered with this ingress record. | `[]` |
| `ingress.secrets` | If you're providing your own certificates, please use this to add the certificates as secrets | `[]` |
| `ingress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
| `adminIngress.enabled` | Enable admin ingress record generation for Keycloak | `false` |
| `adminIngress.ingressClassName` | IngressClass that will be be used to implement the Ingress (evaluated as template) (Kubernetes 1.18+) | `""` |
| `adminIngress.pathType` | Ingress path type | `ImplementationSpecific` |
| `adminIngress.apiVersion` | Force Ingress API version (automatically detected if not set) | `""` |
| `adminIngress.controller` | The ingress controller type. Currently supports `default` and `gce` | `default` |
| `adminIngress.hostname` | Default host for the admin ingress record (evaluated as template) | `keycloak.local` |
| `adminIngress.path` | Default path for the admin ingress record (evaluated as template) | `""` |
| `adminIngress.servicePort` | Backend service port to use | `http` |
| `adminIngress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
| `adminIngress.labels` | Additional labels for the Ingress resource. | `{}` |
| `adminIngress.tls` | Enable TLS configuration for the host defined at `adminIngress.hostname` parameter | `false` |
| `adminIngress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
| `adminIngress.extraHosts` | An array with additional hostname(s) to be covered with the admin ingress record | `[]` |
| `adminIngress.extraPaths` | Any additional arbitrary paths that may need to be added to the admin ingress under the main host. | `[]` |
| `adminIngress.extraTls` | The tls configuration for additional hostnames to be covered with this ingress record. | `[]` |
| `adminIngress.secrets` | If you're providing your own certificates, please use this to add the certificates as secrets | `[]` |
| `adminIngress.extraRules` | Additional rules to be covered with this ingress record | `[]` |
| `networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `true` |
| `networkPolicy.allowExternal` | Don't require server label for connections | `true` |
| `networkPolicy.allowExternalEgress` | Allow the pod to access any range of port and all destinations. | `true` |
| `networkPolicy.kubeAPIServerPorts` | List of possible endpoints to kube-apiserver (limit to your cluster settings to increase security) | `[]` |
| `networkPolicy.extraIngress` | Add extra ingress rules to the NetworkPolicy | `[]` |
| `networkPolicy.extraEgress` | Add extra ingress rules to the NetworkPolicy | `[]` |
| `networkPolicy.ingressNSMatchLabels` | Labels to match to allow traffic from other namespaces | `{}` |
| `networkPolicy.ingressNSPodMatchLabels` | Pod labels to match to allow traffic from other namespaces | `{}` |
### RBAC parameter
| Name | Description | Value |
| --------------------------------------------- | --------------------------------------------------------- | ------- |
| `serviceAccount.create` | Enable the creation of a ServiceAccount for Keycloak pods | `true` |
| `serviceAccount.name` | Name of the created ServiceAccount | `""` |
| `serviceAccount.automountServiceAccountToken` | Auto-mount the service account token in the pod | `false` |
| `serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
| `serviceAccount.extraLabels` | Additional labels for the ServiceAccount | `{}` |
| `rbac.create` | Whether to create and use RBAC resources or not | `false` |
| `rbac.rules` | Custom RBAC rules | `[]` |
### Other parameters
| Name | Description | Value |
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------- |
| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` |
| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` |
| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable | `""` |
| `autoscaling.enabled` | Enable autoscaling for Keycloak | `false` |
| `autoscaling.minReplicas` | Minimum number of Keycloak replicas | `1` |
| `autoscaling.maxReplicas` | Maximum number of Keycloak replicas | `11` |
| `autoscaling.targetCPU` | Target CPU utilization percentage | `""` |
| `autoscaling.targetMemory` | Target Memory utilization percentage | `""` |
| `autoscaling.behavior.scaleUp.stabilizationWindowSeconds` | The number of seconds for which past recommendations should be considered while scaling up | `120` |
| `autoscaling.behavior.scaleUp.selectPolicy` | The priority of policies that the autoscaler will apply when scaling up | `Max` |
| `autoscaling.behavior.scaleUp.policies` | HPA scaling policies when scaling up | `[]` |
| `autoscaling.behavior.scaleDown.stabilizationWindowSeconds` | The number of seconds for which past recommendations should be considered while scaling down | `300` |
| `autoscaling.behavior.scaleDown.selectPolicy` | The priority of policies that the autoscaler will apply when scaling down | `Max` |
| `autoscaling.behavior.scaleDown.policies` | HPA scaling policies when scaling down | `[]` |
### Metrics parameters
| Name | Description | Value |
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `metrics.enabled` | Enable exposing Keycloak statistics | `false` |
| `metrics.service.ports.http` | Metrics service HTTP port | `8080` |
| `metrics.service.ports.https` | Metrics service HTTPS port | `8443` |
| `metrics.service.ports.metrics` | Metrics service Metrics port | `9000` |
| `metrics.service.annotations` | Annotations for enabling prometheus to access the metrics endpoints | `{}` |
| `metrics.service.extraPorts` | Add additional ports to the keycloak metrics service (i.e. admin port 9000) | `[]` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator | `false` |
| `metrics.serviceMonitor.port` | Metrics service HTTP port | `metrics` |
| `metrics.serviceMonitor.scheme` | Metrics service scheme | `http` |
| `metrics.serviceMonitor.tlsConfig` | Metrics service TLS configuration | `{}` |
| `metrics.serviceMonitor.endpoints` | The endpoint configuration of the ServiceMonitor. Path is mandatory. Port, scheme, tlsConfig, interval, timeout and labellings can be overwritten. | `[]` |
| `metrics.serviceMonitor.path` | Metrics service HTTP path. Deprecated: Use @param metrics.serviceMonitor.endpoints instead | `""` |
| `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` |
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `""` |
| `metrics.serviceMonitor.labels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
| `metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping | `[]` |
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
| `metrics.serviceMonitor.honorLabels` | honorLabels chooses the metric's labels on collisions with target labels | `false` |
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` |
| `metrics.prometheusRule.enabled` | Create PrometheusRule Resource for scraping metrics using PrometheusOperator | `false` |
| `metrics.prometheusRule.namespace` | Namespace which Prometheus is running in | `""` |
| `metrics.prometheusRule.labels` | Additional labels that can be used so PrometheusRule will be discovered by Prometheus | `{}` |
| `metrics.prometheusRule.groups` | Groups, containing the alert rules. | `[]` |
### keycloak-config-cli parameters
| Name | Description | Value |
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| `keycloakConfigCli.enabled` | Whether to enable keycloak-config-cli job | `false` |
| `keycloakConfigCli.image.registry` | keycloak-config-cli container image registry | `REGISTRY_NAME` |
| `keycloakConfigCli.image.repository` | keycloak-config-cli container image repository | `REPOSITORY_NAME/keycloak-config-cli` |
| `keycloakConfigCli.image.digest` | keycloak-config-cli container image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` |
| `keycloakConfigCli.image.pullPolicy` | keycloak-config-cli container image pull policy | `IfNotPresent` |
| `keycloakConfigCli.image.pullSecrets` | keycloak-config-cli container image pull secrets | `[]` |
| `keycloakConfigCli.annotations` | Annotations for keycloak-config-cli job | `{}` |
| `keycloakConfigCli.command` | Command for running the container (set to default if not set). Use array form | `[]` |
| `keycloakConfigCli.args` | Args for running the container (set to default if not set). Use array form | `[]` |
| `keycloakConfigCli.automountServiceAccountToken` | Mount Service Account token in pod | `true` |
| `keycloakConfigCli.hostAliases` | Job pod host aliases | `[]` |
| `keycloakConfigCli.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if keycloakConfigCli.resources is set (keycloakConfigCli.resources is recommended for production). | `small` |
| `keycloakConfigCli.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `keycloakConfigCli.containerSecurityContext.enabled` | Enabled keycloak-config-cli Security Context | `true` |
| `keycloakConfigCli.containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
| `keycloakConfigCli.containerSecurityContext.runAsUser` | Set keycloak-config-cli Security Context runAsUser | `1001` |
| `keycloakConfigCli.containerSecurityContext.runAsGroup` | Set keycloak-config-cli Security Context runAsGroup | `1001` |
| `keycloakConfigCli.containerSecurityContext.runAsNonRoot` | Set keycloak-config-cli Security Context runAsNonRoot | `true` |
| `keycloakConfigCli.containerSecurityContext.privileged` | Set keycloak-config-cli Security Context privileged | `false` |
| `keycloakConfigCli.containerSecurityContext.readOnlyRootFilesystem` | Set keycloak-config-cli Security Context readOnlyRootFilesystem | `true` |
| `keycloakConfigCli.containerSecurityContext.allowPrivilegeEscalation` | Set keycloak-config-cli Security Context allowPrivilegeEscalation | `false` |
| `keycloakConfigCli.containerSecurityContext.capabilities.drop` | List of capabilities to be dropped | `["ALL"]` |
| `keycloakConfigCli.containerSecurityContext.seccompProfile.type` | Set keycloak-config-cli Security Context seccomp profile | `RuntimeDefault` |
| `keycloakConfigCli.podSecurityContext.enabled` | Enabled keycloak-config-cli pods' Security Context | `true` |
| `keycloakConfigCli.podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
| `keycloakConfigCli.podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
| `keycloakConfigCli.podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
| `keycloakConfigCli.podSecurityContext.fsGroup` | Set keycloak-config-cli pod's Security Context fsGroup | `1001` |
| `keycloakConfigCli.backoffLimit` | Number of retries before considering a Job as failed | `1` |
| `keycloakConfigCli.podLabels` | Pod extra labels | `{}` |
| `keycloakConfigCli.podAnnotations` | Annotations for job pod | `{}` |
| `keycloakConfigCli.nodeSelector` | Node labels for pod assignment | `{}` |
| `keycloakConfigCli.podTolerations` | Tolerations for job pod assignment | `[]` |
| `keycloakConfigCli.availabilityCheck.enabled` | Whether to wait until Keycloak is available | `true` |
| `keycloakConfigCli.availabilityCheck.timeout` | Timeout for the availability check (Default is 120s) | `""` |
| `keycloakConfigCli.extraEnvVars` | Additional environment variables to set | `[]` |
| `keycloakConfigCli.extraEnvVarsCM` | ConfigMap with extra environment variables | `""` |
| `keycloakConfigCli.extraEnvVarsSecret` | Secret with extra environment variables | `""` |
| `keycloakConfigCli.extraVolumes` | Extra volumes to add to the job | `[]` |
| `keycloakConfigCli.extraVolumeMounts` | Extra volume mounts to add to the container | `[]` |
| `keycloakConfigCli.initContainers` | Add additional init containers to the Keycloak config cli pod | `[]` |
| `keycloakConfigCli.sidecars` | Add additional sidecar containers to the Keycloak config cli pod | `[]` |
| `keycloakConfigCli.configuration` | keycloak-config-cli realms configuration | `{}` |
| `keycloakConfigCli.existingConfigmap` | ConfigMap with keycloak-config-cli configuration | `""` |
| `keycloakConfigCli.cleanupAfterFinished.enabled` | Enables Cleanup for Finished Jobs | `false` |
| `keycloakConfigCli.cleanupAfterFinished.seconds` | Sets the value of ttlSecondsAfterFinished | `600` |
### Database parameters
| Name | Description | Value |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------ |
| `postgresql.enabled` | Switch to enable or disable the PostgreSQL helm chart | `true` |
| `postgresql.auth.postgresPassword` | Password for the "postgres" admin user. Ignored if `auth.existingSecret` with key `postgres-password` is provided | `""` |
| `postgresql.auth.username` | Name for a custom user to create | `bn_keycloak` |
| `postgresql.auth.password` | Password for the custom user to create | `""` |
| `postgresql.auth.database` | Name for a custom database to create | `bitnami_keycloak` |
| `postgresql.auth.existingSecret` | Name of existing secret to use for PostgreSQL credentials | `""` |
| `postgresql.auth.secretKeys.userPasswordKey` | Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set. | `password` |
| `postgresql.architecture` | PostgreSQL architecture (`standalone` or `replication`) | `standalone` |
| `externalDatabase.host` | Database host | `""` |
| `externalDatabase.port` | Database port number | `5432` |
| `externalDatabase.user` | Non-root username for Keycloak | `bn_keycloak` |
| `externalDatabase.password` | Password for the non-root username for Keycloak | `""` |
| `externalDatabase.database` | Keycloak database name | `bitnami_keycloak` |
| `externalDatabase.schema` | Keycloak database schema | `public` |
| `externalDatabase.existingSecret` | Name of an existing secret resource containing the database credentials | `""` |
| `externalDatabase.existingSecretHostKey` | Name of an existing secret key containing the database host name | `""` |
| `externalDatabase.existingSecretPortKey` | Name of an existing secret key containing the database port | `""` |
| `externalDatabase.existingSecretUserKey` | Name of an existing secret key containing the database user | `""` |
| `externalDatabase.existingSecretDatabaseKey` | Name of an existing secret key containing the database name | `""` |
| `externalDatabase.existingSecretPasswordKey` | Name of an existing secret key containing the database credentials | `""` |
| `externalDatabase.annotations` | Additional custom annotations for external database secret object | `{}` |
### Keycloak Cache parameters
| Name | Description | Value |
| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `cache.enabled` | Switch to enable or disable the keycloak distributed cache for kubernetes. | `true` |
| `cache.stack` | Set infinispan cache stack to use, sets KC_CACHE_STACK (<https://www.keycloak.org/server/all-config?q=cache-stack>) | `kubernetes` |
| `cache.configFile` | Set infinispan cache stack config filename sets KC_CACHE_CONFIG_FILE (<https://www.keycloak.org/server/all-config?q=cache-config-file>) | `cache-ispn.xml` |
| `cache.useHeadlessServiceWithAppVersion` | Set to true to create the headless service used for ispn containing the app version | `false` |
### Keycloak Logging parameters
| Name | Description | Value |
| ---------------- | ------------------------------------------------------------------------------ | --------- |
| `logging.output` | Alternates between the default log output format or json format | `default` |
| `logging.level` | Allowed values as documented: FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL, OFF | `INFO` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
helm install my-release --set auth.adminPassword=secretpassword oci://REGISTRY_NAME/REPOSITORY_NAME/keycloak
```
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
The above command sets the Keycloak administrator password to `secretpassword`.
> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
```console
helm install my-release -f values.yaml oci://REGISTRY_NAME/REPOSITORY_NAME/keycloak
```
> Note: You need to substitute the placeholders `REGISTRY_NAME` and `REPOSITORY_NAME` with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to use `REGISTRY_NAME=registry-1.docker.io` and `REPOSITORY_NAME=bitnamicharts`.
> **Tip**: You can use the default [values.yaml](https://github.com/bitnami/charts/tree/main/bitnami/keycloak/values.yaml)
Keycloak realms, users and clients can be created from the Keycloak administration panel.
## Troubleshooting
Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
## Upgrading
### To 24.3.0
This version introduces image verification for security purposes. To disable it, set `global.security.allowInsecureImages` to `true`. More details at [GitHub issue](https://github.com/bitnami/charts/issues/30850).
### To 24.1.0
With this update the metrics service listening port is switched to 9000, the same as the keycloak management endpoint is using.
This can be changed by setting `metrics.service.ports.http` to a different value, e.g. 8080 like before this change.
### To 23.0.0
This major updates the PostgreSQL subchart to its newest major, 16.0.0, which uses PostgreSQL 17.x. Follow the [official instructions](https://www.postgresql.org/docs/17/upgrading.html) to upgrade to 17.x.
### To 21.0.0
This major release updates the keycloak branch to its newest major, 24.x.x. Follow the [upstream documentation](https://www.keycloak.org/docs/latest/upgrading/index.html#migrating-to-24-0-0) for upgrade instructions.
### To 20.0.0
This major bump changes the following security defaults:
- `runAsGroup` is changed from `0` to `1001`
- `readOnlyRootFilesystem` is set to `true`
- `resourcesPreset` is changed from `none` to the minimum size working in our test suites (NOTE: `resourcesPreset` is not meant for production usage, but `resources` adapted to your use case).
- `global.compatibility.openshift.adaptSecurityContext` is changed from `disabled` to `auto`.
This could potentially break any customization or init scripts used in your deployment. If this is the case, change the default values to the previous ones.
### To 19.0.0
This major release bumps the PostgreSQL chart version to [14.x.x](https://github.com/bitnami/charts/pull/22750); no major issues are expected during the upgrade.
### To 17.0.0
This major updates the PostgreSQL subchart to its newest major, 13.0.0. [Here](https://github.com/bitnami/charts/tree/master/bitnami/postgresql#to-1300) you can find more information about the changes introduced in that version.
### To 15.0.0
This major updates the default serviceType from `LoadBalancer` to `ClusterIP` to avoid inadvertently exposing Keycloak directly to the internet without an Ingress.
### To 12.0.0
This major updates the PostgreSQL subchart to its newest major, 12.0.0. [Here](https://github.com/bitnami/charts/tree/master/bitnami/postgresql#to-1200) you can find more information about the changes introduced in that version.
### To 10.0.0
This major release updates Keycloak to its major version `19`. Please, refer to the official [Keycloak migration documentation](https://www.keycloak.org/docs/latest/upgrading/index.html#migrating-to-19-0-0) for a complete list of changes and further information.
### To 9.0.0
This major release updates Keycloak to its major version `18`. Please, refer to the official [Keycloak migration documentation](https://www.keycloak.org/docs/latest/upgrading/index.html#migrating-to-18-0-0) for a complete list of changes and further information.
### To 8.0.0
This major release updates Keycloak to its major version `17`. Among other features, this new version has deprecated WildFly in favor of Quarkus, which introduces breaking changes like:
- Removal of `/auth` from the default context path.
- Changes in the configuration and deployment of custom providers.
- Significant changes in configuring Keycloak.
Please, refer to the official [Keycloak migration documentation](https://www.keycloak.org/docs/latest/upgrading/index.html#migrating-to-17-0-0) and [Migrating to Quarkus distribution document](https://www.keycloak.org/migration/migrating-to-quarkus) for a complete list of changes and further information.
### To 7.0.0
This major release updates the PostgreSQL subchart to its newest major *11.x.x*, which contain several changes in the supported values (check the [upgrade notes](https://github.com/bitnami/charts/tree/master/bitnami/postgresql#to-1100) to obtain more information).
#### Upgrading Instructions
To upgrade to *7.0.0* from *6.x*, it should be done reusing the PVC(s) used to hold the data on your previous release. To do so, follow the instructions below (the following example assumes that the release name is *keycloak* and the release namespace *default*):
1. Obtain the credentials and the names of the PVCs used to hold the data on your current release:
```console
export KEYCLOAK_PASSWORD=$(kubectl get secret --namespace default keycloak -o jsonpath="{.data.admin-password}" | base64 --decode)
export POSTGRESQL_PASSWORD=$(kubectl get secret --namespace default keycloak-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
export POSTGRESQL_PVC=$(kubectl get pvc -l app.kubernetes.io/instance=keycloak,app.kubernetes.io/name=postgresql,role=primary -o jsonpath="{.items[0].metadata.name}")
```
1. Delete the PostgreSQL statefulset (notice the option *--cascade=false*) and secret:
```console
kubectl delete statefulsets.apps --cascade=false keycloak-postgresql
kubectl delete secret keycloak-postgresql --namespace default
```
1. Upgrade your release using the same PostgreSQL version:
```console
CURRENT_PG_VERSION=$(kubectl exec keycloak-postgresql-0 -- bash -c 'echo $BITNAMI_IMAGE_VERSION')
helm upgrade keycloak bitnami/keycloak \
--set auth.adminPassword=$KEYCLOAK_PASSWORD \
--set postgresql.image.tag=$CURRENT_PG_VERSION \
--set postgresql.auth.password=$POSTGRESQL_PASSWORD \
--set postgresql.persistence.existingClaim=$POSTGRESQL_PVC
```
1. Delete the existing PostgreSQL pods and the new statefulset will create a new one:
```console
kubectl delete pod keycloak-postgresql-0
```
### To 1.0.0
[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
#### What changes were introduced in this major version?
- Previous versions of this Helm Chart use `apiVersion: v1` (installable by both Helm 2 and 3), this Helm Chart was updated to `apiVersion: v2` (installable by Helm 3 only). [Here](https://helm.sh/docs/topics/charts/#the-apiversion-field) you can find more information about the `apiVersion` field.
- Move dependency information from the *requirements.yaml* to the *Chart.yaml*
- After running *helm dependency update*, a *Chart.lock* file is generated containing the same structure used in the previous *requirements.lock*
- The different fields present in the *Chart.yaml* file has been ordered alphabetically in a homogeneous way for all the Bitnami Helm Chart.
#### Considerations when upgrading to this version
- If you want to upgrade to this version using Helm v2, this scenario is not supported as this version does not support Helm v2 anymore.
- If you installed the previous version with Helm v2 and wants to upgrade to this version with Helm v3, please refer to the [official Helm documentation](https://helm.sh/docs/topics/v2_v3_migration/#migration-use-cases) about migrating from Helm v2 to v3.
#### Useful links
- [Bitnami Tutorial](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-resolve-helm2-helm3-post-migration-issues-index.html)
- [Helm docs](https://helm.sh/docs/topics/v2_v3_migration)
- [Helm Blog](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3)
## License
Copyright &copy; 2025 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
<http://www.apache.org/licenses/LICENSE-2.0>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,109 +0,0 @@
CHART NAME: {{ .Chart.Name }}
CHART VERSION: {{ .Chart.Version }}
APP VERSION: {{ .Chart.AppVersion }}
⚠ WARNING: Since August 28th, 2025, only a limited subset of images/charts are available for free.
Subscribe to Bitnami Secure Images to receive continued support and security updates.
More info at https://bitnami.com and https://github.com/bitnami/containers/issues/83267
** Please be patient while the chart is being deployed **
Keycloak can be accessed through the following DNS name from within your cluster:
{{ include "common.names.fullname" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }} (port {{ coalesce .Values.service.ports.http .Values.service.port }})
To access Keycloak from outside the cluster execute the following commands:
{{- if .Values.ingress.enabled }}
1. Get the Keycloak URL and associate its hostname to your cluster external IP:
export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
echo "Keycloak URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ (tpl .Values.ingress.hostname .) }}/"
echo "$CLUSTER_IP {{ (tpl .Values.ingress.hostname .) }}" | sudo tee -a /etc/hosts
{{- if .Values.adminIngress.enabled }}
The admin area of Keycloak has been configured to point to a different domain ({{ .Values.adminIngress.hostname }}). Please remember to update the `frontendUrl` property of the `{{ .Values.adminRealm | default "master" }}` (or any other) realm for it to work properly (see README for an example) :
echo "Keycloak admin URL: http{{ if .Values.adminIngress.tls }}s{{ end }}://{{ (tpl .Values.adminIngress.hostname .) }}/"
echo "$CLUSTER_IP {{ (tpl .Values.adminIngress.hostname .) }}" | sudo tee -a /etc/hosts
{{- end }}
{{- else }}
1. Get the Keycloak URL by running these commands:
{{- if contains "NodePort" .Values.service.type }}
export HTTP_NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http')].nodePort}" services {{ include "common.names.fullname" . }})
{{- if .Values.tls.enabled }}
export HTTPS_NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='https')].nodePort}" services {{ include "common.names.fullname" . }})
{{- end }}
export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo "http://${NODE_IP}:${HTTP_NODE_PORT}/"
{{- if .Values.tls.enabled }}
echo "https://${NODE_IP}:${HTTPS_NODE_PORT}/"
{{- end }}
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch its status by running 'kubectl get --namespace {{ include "common.names.namespace" . }} svc -w {{ include "common.names.fullname" . }}'
export HTTP_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http')].port}" services {{ include "common.names.fullname" . }})
{{- if .Values.tls.enabled }}
export HTTPS_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='https')].port}" services {{ include "common.names.fullname" . }})
{{- end }}
export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ include "common.names.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo "http://${SERVICE_IP}:${HTTP_SERVICE_PORT}/"
{{- if .Values.tls.enabled }}
echo "https://${SERVICE_IP}:${HTTPS_SERVICE_PORT}/"
{{- end }}
{{- else if contains "ClusterIP" .Values.service.type }}
export HTTP_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http')].port}" services {{ include "common.names.fullname" . }})
{{- if .Values.tls.enabled }}
export HTTPS_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='https')].port}" services {{ include "common.names.fullname" . }})
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "common.names.fullname" . }} ${HTTP_SERVICE_PORT}:${HTTP_SERVICE_PORT} ${HTTPS_SERVICE_PORT}:${HTTPS_SERVICE_PORT} &
{{- else }}
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "common.names.fullname" . }} ${HTTP_SERVICE_PORT}:${HTTP_SERVICE_PORT} &
{{- end }}
echo "http://127.0.0.1:${HTTP_SERVICE_PORT}/"
{{- if .Values.tls.enabled }}
echo "https://127.0.0.1:${HTTPS_SERVICE_PORT}/"
{{- end }}
{{- end }}
{{- end }}
2. Access Keycloak using the obtained URL.
{{- if and .Values.auth.adminUser .Values.auth.adminPassword }}
3. Access the Administration Console using the following credentials:
echo Username: {{ .Values.auth.adminUser }}
echo Password: $(kubectl get secret --namespace {{ include "common.names.namespace" . }} {{ include "keycloak.secretName" . }} -o jsonpath="{.data.{{ include "keycloak.secretKey" .}}}" | base64 -d)
{{- end }}
{{- if .Values.metrics.enabled }}
You can access the Prometheus metrics following the steps below:
1. Get the Keycloak Prometheus metrics URL by running:
{{- $metricsPort := coalesce .Values.metrics.service.ports.metrics .Values.metrics.service.port | toString }}
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ printf "%s-metrics" (include "common.names.fullname" .) }} {{ $metricsPort }}:{{ $metricsPort }} &
echo "Keycloak Prometheus metrics URL: http://127.0.0.1:{{ $metricsPort }}/metrics"
2. Open a browser and access Keycloak Prometheus metrics using the obtained URL.
{{- end }}
{{- include "keycloak.validateValues" . }}
{{- include "common.warnings.rollingTag" .Values.image }}
{{- include "common.warnings.rollingTag" .Values.keycloakConfigCli.image }}
{{- include "common.warnings.resources" (dict "sections" (list "keycloakConfigCli" "") "context" $) }}
{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image .Values.keycloakConfigCli.image) "context" $) }}
{{- include "common.errors.insecureImages" (dict "images" (list .Values.image .Values.keycloakConfigCli.image) "context" $) }}

View File

@@ -1,355 +0,0 @@
{{/*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{/*
Return the proper Keycloak image name
*/}}
{{- define "keycloak.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper keycloak-config-cli image name
*/}}
{{- define "keycloak.keycloakConfigCli.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.keycloakConfigCli.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the keycloak-config-cli configuration configmap.
*/}}
{{- define "keycloak.keycloakConfigCli.configmapName" -}}
{{- if .Values.keycloakConfigCli.existingConfigmap -}}
{{- printf "%s" (tpl .Values.keycloakConfigCli.existingConfigmap $) -}}
{{- else -}}
{{- printf "%s-keycloak-config-cli-configmap" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return true if a configmap object should be created for keycloak-config-cli
*/}}
{{- define "keycloak.keycloakConfigCli.createConfigmap" -}}
{{- if and .Values.keycloakConfigCli.enabled .Values.keycloakConfigCli.configuration (not .Values.keycloakConfigCli.existingConfigmap) -}}
{{- true -}}
{{- end -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "keycloak.imagePullSecrets" -}}
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image .Values.keycloakConfigCli.image) "context" $) -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "keycloak.postgresql.fullname" -}}
{{- include "common.names.dependency.fullname" (dict "chartName" "postgresql" "chartValues" .Values.postgresql "context" $) -}}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "keycloak.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Return the path Keycloak is hosted on. This looks at httpRelativePath and returns it with a trailing slash. For example:
/ -> / (the default httpRelativePath)
/auth -> /auth/ (trailing slash added)
/custom/ -> /custom/ (unchanged)
*/}}
{{- define "keycloak.httpPath" -}}
{{ ternary .Values.httpRelativePath (printf "%s%s" .Values.httpRelativePath "/") (hasSuffix "/" .Values.httpRelativePath) }}
{{- end -}}
{{/*
Return the Keycloak configuration configmap
*/}}
{{- define "keycloak.configmapName" -}}
{{- if .Values.existingConfigmap -}}
{{- printf "%s" (tpl .Values.existingConfigmap $) -}}
{{- else -}}
{{- printf "%s-configuration" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return true if a configmap object should be created
*/}}
{{- define "keycloak.createConfigmap" -}}
{{- if and .Values.configuration (not .Values.existingConfigmap) }}
{{- true -}}
{{- end -}}
{{- end -}}
{{/*
Return the Database hostname
*/}}
{{- define "keycloak.databaseHost" -}}
{{- if eq .Values.postgresql.architecture "replication" }}
{{- ternary (include "keycloak.postgresql.fullname" .) (tpl .Values.externalDatabase.host $) .Values.postgresql.enabled -}}-primary
{{- else -}}
{{- ternary (include "keycloak.postgresql.fullname" .) (tpl .Values.externalDatabase.host $) .Values.postgresql.enabled -}}
{{- end -}}
{{- end -}}
{{/*
Return the Database port
*/}}
{{- define "keycloak.databasePort" -}}
{{- ternary "5432" (tpl (.Values.externalDatabase.port | toString) $) .Values.postgresql.enabled | quote -}}
{{- end -}}
{{/*
Return the Database database name
*/}}
{{- define "keycloak.databaseName" -}}
{{- if .Values.postgresql.enabled }}
{{- if .Values.global.postgresql }}
{{- if .Values.global.postgresql.auth }}
{{- coalesce .Values.global.postgresql.auth.database .Values.postgresql.auth.database -}}
{{- else -}}
{{- .Values.postgresql.auth.database -}}
{{- end -}}
{{- else -}}
{{- .Values.postgresql.auth.database -}}
{{- end -}}
{{- else -}}
{{- tpl .Values.externalDatabase.database $ -}}
{{- end -}}
{{- end -}}
{{/*
Return the Database port
*/}}
{{- define "keycloak.databaseSchema" -}}
{{- ternary "public" (tpl (.Values.externalDatabase.schema | toString) $) .Values.postgresql.enabled | quote -}}
{{- end -}}
{{/*
Return the Database user
*/}}
{{- define "keycloak.databaseUser" -}}
{{- if .Values.postgresql.enabled -}}
{{- if .Values.global.postgresql -}}
{{- if .Values.global.postgresql.auth -}}
{{- coalesce .Values.global.postgresql.auth.username .Values.postgresql.auth.username -}}
{{- else -}}
{{- .Values.postgresql.auth.username -}}
{{- end -}}
{{- else -}}
{{- .Values.postgresql.auth.username -}}
{{- end -}}
{{- else -}}
{{- tpl .Values.externalDatabase.user $ -}}
{{- end -}}
{{- end -}}
{{/*
Return the Database encrypted password
*/}}
{{- define "keycloak.databaseSecretName" -}}
{{- if .Values.postgresql.enabled -}}
{{- if .Values.global.postgresql -}}
{{- if .Values.global.postgresql.auth -}}
{{- if .Values.global.postgresql.auth.existingSecret -}}
{{- tpl .Values.global.postgresql.auth.existingSecret $ -}}
{{- else -}}
{{- default (include "keycloak.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- end -}}
{{- else -}}
{{- default (include "keycloak.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- end -}}
{{- else -}}
{{- default (include "keycloak.postgresql.fullname" .) (tpl .Values.postgresql.auth.existingSecret $) -}}
{{- end -}}
{{- else -}}
{{- default (printf "%s-externaldb" (include "common.names.fullname" .)) (tpl .Values.externalDatabase.existingSecret $) -}}
{{- end -}}
{{- end -}}
{{/*
Add environment variables to configure database values
*/}}
{{- define "keycloak.databaseSecretPasswordKey" -}}
{{- if .Values.postgresql.enabled -}}
{{- printf "%s" (.Values.postgresql.auth.secretKeys.userPasswordKey | default "password") -}}
{{- else -}}
{{- if .Values.externalDatabase.existingSecret -}}
{{- if .Values.externalDatabase.existingSecretPasswordKey -}}
{{- printf "%s" .Values.externalDatabase.existingSecretPasswordKey -}}
{{- else -}}
{{- print "db-password" -}}
{{- end -}}
{{- else -}}
{{- print "db-password" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "keycloak.databaseSecretHostKey" -}}
{{- if .Values.externalDatabase.existingSecretHostKey -}}
{{- printf "%s" .Values.externalDatabase.existingSecretHostKey -}}
{{- else -}}
{{- print "db-host" -}}
{{- end -}}
{{- end -}}
{{- define "keycloak.databaseSecretPortKey" -}}
{{- if .Values.externalDatabase.existingSecretPortKey -}}
{{- printf "%s" .Values.externalDatabase.existingSecretPortKey -}}
{{- else -}}
{{- print "db-port" -}}
{{- end -}}
{{- end -}}
{{- define "keycloak.databaseSecretUserKey" -}}
{{- if .Values.externalDatabase.existingSecretUserKey -}}
{{- printf "%s" .Values.externalDatabase.existingSecretUserKey -}}
{{- else -}}
{{- print "db-user" -}}
{{- end -}}
{{- end -}}
{{- define "keycloak.databaseSecretDatabaseKey" -}}
{{- if .Values.externalDatabase.existingSecretDatabaseKey -}}
{{- printf "%s" .Values.externalDatabase.existingSecretDatabaseKey -}}
{{- else -}}
{{- print "db-database" -}}
{{- end -}}
{{- end -}}
{{/*
Return the Keycloak initdb scripts configmap
*/}}
{{- define "keycloak.initdbScriptsCM" -}}
{{- if .Values.initdbScriptsConfigMap -}}
{{- printf "%s" .Values.initdbScriptsConfigMap -}}
{{- else -}}
{{- printf "%s-init-scripts" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the secret containing the Keycloak admin password
*/}}
{{- define "keycloak.secretName" -}}
{{- $secretName := .Values.auth.existingSecret -}}
{{- if $secretName -}}
{{- printf "%s" (tpl $secretName $) -}}
{{- else -}}
{{- printf "%s" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/*
Return the secret key that contains the Keycloak admin password
*/}}
{{- define "keycloak.secretKey" -}}
{{- $secretName := .Values.auth.existingSecret -}}
{{- if and $secretName .Values.auth.passwordSecretKey -}}
{{- printf "%s" .Values.auth.passwordSecretKey -}}
{{- else -}}
{{- print "admin-password" -}}
{{- end -}}
{{- end -}}
{{/*
Return the secret containing Keycloak HTTPS/TLS certificates
*/}}
{{- define "keycloak.tlsSecretName" -}}
{{- $secretName := .Values.tls.existingSecret -}}
{{- if $secretName -}}
{{- printf "%s" (tpl $secretName $) -}}
{{- else -}}
{{- printf "%s-crt" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the secret containing Keycloak HTTPS/TLS keystore and truststore passwords
*/}}
{{- define "keycloak.tlsPasswordsSecretName" -}}
{{- $secretName := .Values.tls.passwordsSecret -}}
{{- if $secretName -}}
{{- printf "%s" (tpl $secretName $) -}}
{{- else -}}
{{- printf "%s-tls-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/*
Return the secret containing Keycloak SPI TLS certificates
*/}}
{{- define "keycloak.spiPasswordsSecretName" -}}
{{- $secretName := .Values.spi.passwordsSecret -}}
{{- if $secretName -}}
{{- printf "%s" (tpl $secretName $) -}}
{{- else -}}
{{- printf "%s-spi-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/*
Return true if a TLS secret object should be created
*/}}
{{- define "keycloak.createTlsSecret" -}}
{{- if and .Values.tls.enabled .Values.tls.autoGenerated (not .Values.tls.existingSecret) }}
{{- true -}}
{{- end -}}
{{- end -}}
{{/*
Compile all warnings into a single message.
*/}}
{{- define "keycloak.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "keycloak.validateValues.database" .) -}}
{{- $messages := append $messages (include "keycloak.validateValues.tls" .) -}}
{{- $messages := append $messages (include "keycloak.validateValues.production" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}
{{- if $message -}}
{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
{{- end -}}
{{- end -}}
{{/* Validate values of Keycloak - database */}}
{{- define "keycloak.validateValues.database" -}}
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.host) (and (not .Values.externalDatabase.password) (not .Values.externalDatabase.existingSecret)) -}}
keycloak: database
You disabled the PostgreSQL sub-chart but did not specify an external PostgreSQL host.
Either deploy the PostgreSQL sub-chart (--set postgresql.enabled=true),
or set a value for the external database host (--set externalDatabase.host=FOO)
and set a value for the external database password (--set externalDatabase.password=BAR)
or existing secret (--set externalDatabase.existingSecret=BAR).
{{- end -}}
{{- end -}}
{{/* Validate values of Keycloak - TLS enabled */}}
{{- define "keycloak.validateValues.tls" -}}
{{- if and .Values.tls.enabled (not .Values.tls.autoGenerated) (not .Values.tls.existingSecret) }}
keycloak: tls.enabled
In order to enable TLS, you also need to provide
an existing secret containing the Keystore and Truststore or
enable auto-generated certificates.
{{- end -}}
{{- end -}}
{{/* Validate values of Keycloak - Production mode enabled */}}
{{- define "keycloak.validateValues.production" -}}
{{- if and .Values.production (not .Values.tls.enabled) (not (eq .Values.proxy "edge")) (empty .Values.proxyHeaders) -}}
keycloak: production
In order to enable Production mode, you also need to enable HTTPS/TLS
using the value 'tls.enabled' and providing an existing secret containing the Keystore and Trustore.
{{- end -}}
{{- end -}}

View File

@@ -1,57 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.adminIngress.enabled }}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "common.names.fullname" . }}-admin
namespace: {{ include "common.names.namespace" . | quote }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.adminIngress.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if or .Values.adminIngress.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.adminIngress.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.adminIngress.ingressClassName }}
ingressClassName: {{ include "common.tplvalues.render" ( dict "value" .Values.adminIngress.ingressClassName "context" $ ) | quote }}
{{- end }}
rules:
{{- if .Values.adminIngress.hostname }}
- host: {{ (tpl .Values.adminIngress.hostname .) | quote }}
http:
paths:
{{- if .Values.adminIngress.extraPaths }}
{{- toYaml .Values.adminIngress.extraPaths | nindent 10 }}
{{- end }}
- path: {{ include "common.tplvalues.render" ( dict "value" .Values.adminIngress.path "context" $) }}
pathType: {{ .Values.adminIngress.pathType }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" .Values.adminIngress.servicePort "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.adminIngress.extraHosts }}
- host: {{ (tpl .name $) }}
http:
paths:
- path: {{ default "/" .path }}
pathType: {{ default "ImplementationSpecific" .pathType }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" $.Values.adminIngress.servicePort "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.adminIngress.extraRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.adminIngress.extraRules "context" $) | nindent 4 }}
{{- end }}
{{- if or (and .Values.adminIngress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.adminIngress.annotations )) .Values.adminIngress.selfSigned .Values.adminIngress.secrets )) .Values.adminIngress.extraTls }}
tls:
{{- if and .Values.adminIngress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.adminIngress.annotations )) .Values.adminIngress.secrets .Values.adminIngress.selfSigned) }}
- hosts:
- {{ (tpl .Values.adminIngress.hostname .) | quote }}
secretName: {{ printf "%s-tls" (tpl .Values.adminIngress.hostname .) }}
{{- end }}
{{- if .Values.adminIngress.extraTls }}
{{- include "common.tplvalues.render" (dict "value" .Values.adminIngress.extraTls "context" $) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,109 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-env-vars" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
KC_BOOTSTRAP_ADMIN_USERNAME: {{ .Values.auth.adminUser | quote }}
KEYCLOAK_HTTP_PORT: {{ .Values.containerPorts.http | quote }}
{{- if and .Values.proxy (empty .Values.proxyHeaders) }}
KEYCLOAK_PROXY_HEADERS: {{ ternary "" "xforwarded" (eq .Values.proxy "passthrough") | quote }}
{{- else }}
KEYCLOAK_PROXY_HEADERS: {{ .Values.proxyHeaders | quote }}
{{- end }}
{{- if and .Values.adminIngress.enabled .Values.adminIngress.hostname }}
KEYCLOAK_HOSTNAME_ADMIN: |-
{{ ternary "https://" "http://" ( or .Values.adminIngress.tls (eq .Values.proxy "edge") (not (empty .Values.proxyHeaders)) ) -}} {{- include "common.tplvalues.render" (dict "value" .Values.adminIngress.hostname "context" $) -}}
{{- if eq .Values.adminIngress.controller "default" }}
{{- include "common.tplvalues.render" (dict "value" .Values.adminIngress.path "context" $) }}
{{- else if eq .Values.adminIngress.controller "gce" }}
{{- $path := .Values.adminIngress.path -}}
{{- if hasSuffix "*" $path -}}
{{- $path = trimSuffix "*" $path -}}
{{- end -}}
{{- include "common.tplvalues.render" (dict "value" $path "context" $) }}
{{- end }}
{{- end }}
{{- if and .Values.ingress.enabled .Values.ingress.hostname }}
KEYCLOAK_HOSTNAME: |-
{{ ternary "https://" "http://" ( or .Values.ingress.tls (eq .Values.proxy "edge") (not (empty .Values.proxyHeaders)) ) -}} {{- include "common.tplvalues.render" (dict "value" .Values.ingress.hostname "context" $) -}}
{{- if eq .Values.ingress.controller "default" }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.path "context" $) }}
{{- else if eq .Values.ingress.controller "gce" }}
{{- $path := .Values.ingress.path -}}
{{- if hasSuffix "*" $path -}}
{{- $path = trimSuffix "*" $path -}}
{{- end -}}
{{- include "common.tplvalues.render" (dict "value" $path "context" $) }}
{{- end }}
{{- end }}
{{- if .Values.ingress.enabled }}
KEYCLOAK_HOSTNAME_STRICT: {{ ternary "true" "false" .Values.ingress.hostnameStrict | quote }}
{{- end }}
KEYCLOAK_ENABLE_STATISTICS: {{ ternary "true" "false" .Values.metrics.enabled | quote }}
{{- if not .Values.externalDatabase.existingSecretHostKey }}
KEYCLOAK_DATABASE_HOST: {{ include "keycloak.databaseHost" . | quote }}
{{- end }}
{{- if not .Values.externalDatabase.existingSecretPortKey }}
KEYCLOAK_DATABASE_PORT: {{ include "keycloak.databasePort" . }}
{{- end }}
{{- if not .Values.externalDatabase.existingSecretDatabaseKey }}
KEYCLOAK_DATABASE_NAME: {{ include "keycloak.databaseName" . | quote }}
{{- end }}
KEYCLOAK_DATABASE_SCHEMA: {{ include "keycloak.databaseSchema" . }}
{{- if not .Values.externalDatabase.existingSecretUserKey }}
KEYCLOAK_DATABASE_USER: {{ include "keycloak.databaseUser" . | quote }}
{{- end }}
KEYCLOAK_PRODUCTION: {{ ternary "true" "false" .Values.production | quote }}
KEYCLOAK_ENABLE_HTTPS: {{ ternary "true" "false" .Values.tls.enabled | quote }}
{{- if .Values.customCaExistingSecret }}
KC_TRUSTSTORE_PATHS: "/opt/bitnami/keycloak/custom-ca"
{{- end }}
{{- if .Values.tls.enabled }}
KEYCLOAK_HTTPS_PORT: {{ .Values.containerPorts.https | quote }}
KEYCLOAK_HTTPS_USE_PEM: {{ ternary "true" "false" (or .Values.tls.usePem .Values.tls.autoGenerated) | quote }}
{{- if or .Values.tls.usePem .Values.tls.autoGenerated }}
KEYCLOAK_HTTPS_CERTIFICATE_FILE: "/opt/bitnami/keycloak/certs/tls.crt"
KEYCLOAK_HTTPS_CERTIFICATE_KEY_FILE: "/opt/bitnami/keycloak/certs/tls.key"
{{- else }}
KEYCLOAK_HTTPS_KEY_STORE_FILE: {{ printf "/opt/bitnami/keycloak/certs/%s" .Values.tls.keystoreFilename | quote }}
KEYCLOAK_HTTPS_TRUST_STORE_FILE: {{ printf "/opt/bitnami/keycloak/certs/%s" .Values.tls.truststoreFilename | quote }}
{{- end }}
{{- end }}
{{- if .Values.spi.existingSecret }}
{{- if .Values.spi.hostnameVerificationPolicy }}
KEYCLOAK_SPI_TRUSTSTORE_FILE_HOSTNAME_VERIFICATION_POLICY: {{ .Values.spi.hostnameVerificationPolicy | quote }}
{{- end }}
KEYCLOAK_SPI_TRUSTSTORE_FILE: {{ printf "/opt/bitnami/keycloak/spi-certs/%s" .Values.spi.truststoreFilename }}
{{- end }}
{{- if .Values.cache.enabled }}
KC_CACHE_TYPE: "ispn"
{{- if .Values.cache.stack }}
KC_CACHE_STACK: {{ .Values.cache.stack | quote }}
{{- end }}
{{- if .Values.cache.configFile }}
KC_CACHE_CONFIG_FILE: {{ .Values.cache.configFile | quote }}
{{- end }}
{{- if .Values.cache.useHeadlessServiceWithAppVersion }}
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s-headless-ispn-%s.%s.svc.%s" (include "common.names.fullname" .) (replace "." "-" .Chart.AppVersion) (include "common.names.namespace" .) .Values.clusterDomain | quote }}
{{- else }}
JAVA_OPTS_APPEND: {{ printf "-Djgroups.dns.query=%s-headless.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" .) .Values.clusterDomain | quote }}
{{- end }}
{{- else }}
KC_CACHE_TYPE: "local"
{{- end }}
{{- if .Values.logging }}
KEYCLOAK_LOG_OUTPUT: {{ .Values.logging.output | quote }}
KEYCLOAK_LOG_LEVEL: {{ .Values.logging.level | quote }}
{{- end }}

View File

@@ -1,20 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if (include "keycloak.createConfigmap" .) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-configuration" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
keycloak.conf: |-
{{- .Values.configuration | nindent 4 }}
{{- end }}

View File

@@ -1,9 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- range .Values.extraDeploy }}
---
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
{{- end }}

View File

@@ -1,43 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.cache.enabled .Values.cache.useHeadlessServiceWithAppVersion }}
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-headless-ispn-%s" (include "common.names.fullname" .) (replace "." "-" .Chart.AppVersion) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if or .Values.commonAnnotations .Values.service.headless.annotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.headless.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
clusterIP: None
ports:
- name: http
port: {{ .Values.containerPorts.http }}
protocol: TCP
targetPort: http
{{- if .Values.tls.enabled }}
- name: https
port: {{ .Values.containerPorts.https }}
protocol: TCP
targetPort: https
{{- end }}
{{- if .Values.service.extraHeadlessPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraHeadlessPorts "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.service.headless.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.headless.extraPorts "context" $) | nindent 4 }}
{{- end }}
publishNotReadyAddresses: true
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
app.kubernetes.io/app-version: {{ .Chart.AppVersion }}
{{- end }}

View File

@@ -1,40 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if or .Values.commonAnnotations .Values.service.headless.annotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.headless.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
clusterIP: None
ports:
- name: http
port: {{ .Values.containerPorts.http }}
protocol: TCP
targetPort: http
{{- if .Values.tls.enabled }}
- name: https
port: {{ .Values.containerPorts.https }}
protocol: TCP
targetPort: https
{{- end }}
{{- if .Values.service.extraHeadlessPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraHeadlessPorts "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.service.headless.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.headless.extraPorts "context" $) | nindent 4 }}
{{- end }}
publishNotReadyAddresses: true
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak

View File

@@ -1,58 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.autoscaling.enabled }}
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
kind: StatefulSet
name: {{ template "common.names.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPU }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPU }}
{{- end }}
{{- if .Values.autoscaling.targetMemory }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemory }}
{{- end }}
{{- if or .Values.autoscaling.behavior.scaleDown.policies .Values.autoscaling.behavior.scaleUp.policies }}
behavior:
{{- if .Values.autoscaling.behavior.scaleDown.policies }}
scaleDown:
stabilizationWindowSeconds: {{ .Values.autoscaling.behavior.scaleDown.stabilizationWindowSeconds }}
selectPolicy: {{ .Values.autoscaling.behavior.scaleDown.selectPolicy }}
policies:
{{- toYaml .Values.autoscaling.behavior.scaleDown.policies | nindent 8 }}
{{- end }}
{{- if .Values.autoscaling.behavior.scaleUp.policies }}
scaleUp:
stabilizationWindowSeconds: {{ .Values.autoscaling.behavior.scaleUp.stabilizationWindowSeconds }}
selectPolicy: {{ .Values.autoscaling.behavior.scaleUp.selectPolicy }}
policies:
{{- toYaml .Values.autoscaling.behavior.scaleUp.policies | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,57 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.ingress.enabled }}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.ingress.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if or .Values.ingress.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.ingress.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ include "common.tplvalues.render" ( dict "value" .Values.ingress.ingressClassName "context" $ ) | quote }}
{{- end }}
rules:
{{- if .Values.ingress.hostname }}
- host: {{ (tpl .Values.ingress.hostname .) | quote }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
{{- end }}
- path: {{ include "common.tplvalues.render" ( dict "value" .Values.ingress.path "context" $) }}
pathType: {{ .Values.ingress.pathType }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" .) "servicePort" .Values.ingress.servicePort "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.ingress.extraHosts }}
- host: {{ (tpl .name $) }}
http:
paths:
- path: {{ default "/" .path }}
pathType: {{ default "ImplementationSpecific" .pathType }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "common.names.fullname" $) "servicePort" $.Values.ingress.servicePort "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.ingress.extraRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
{{- end }}
{{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned .Values.ingress.secrets )) .Values.ingress.extraTls }}
tls:
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.secrets .Values.ingress.selfSigned) }}
- hosts:
- {{ (tpl .Values.ingress.hostname .) | quote }}
secretName: {{ printf "%s-tls" (tpl .Values.ingress.hostname .) }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,19 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.initdbScripts (not .Values.initdbScriptsConfigMap) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-init-scripts" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- include "common.tplvalues.render" (dict "value" .Values.initdbScripts "context" .) | nindent 2 }}
{{ end }}

View File

@@ -1,23 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if (include "keycloak.keycloakConfigCli.createConfigmap" .) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "keycloak.keycloakConfigCli.configmapName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak-config-cli
data:
{{- range $fileName, $fileContent := .Values.keycloakConfigCli.configuration }}
{{- if $fileContent }}
{{ $fileName }}: |
{{- include "common.tplvalues.render" (dict "value" $fileContent "context" $) | nindent 4 }}
{{- else }}
{{- ($.Files.Glob $fileName).AsConfig | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,142 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.keycloakConfigCli.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ printf "%s-keycloak-config-cli" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak-config-cli
{{- if or .Values.keycloakConfigCli.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.keycloakConfigCli.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
backoffLimit: {{ .Values.keycloakConfigCli.backoffLimit }}
{{- if .Values.keycloakConfigCli.cleanupAfterFinished.enabled }}
ttlSecondsAfterFinished: {{ .Values.keycloakConfigCli.cleanupAfterFinished.seconds }}
{{- end }}
template:
metadata:
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.keycloakConfigCli.podLabels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/component: keycloak-config-cli
annotations:
{{- if (include "keycloak.keycloakConfigCli.createConfigmap" .) }}
checksum/configuration: {{ include (print $.Template.BasePath "/keycloak-config-cli-configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.keycloakConfigCli.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.podAnnotations "context" $) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ template "keycloak.serviceAccountName" . }}
{{- include "keycloak.imagePullSecrets" . | nindent 6 }}
restartPolicy: Never
{{- if .Values.keycloakConfigCli.podSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.keycloakConfigCli.podSecurityContext "context" $) | nindent 8 }}
{{- end }}
automountServiceAccountToken: {{ .Values.keycloakConfigCli.automountServiceAccountToken }}
{{- if .Values.keycloakConfigCli.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.keycloakConfigCli.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.keycloakConfigCli.podTolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.podTolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.keycloakConfigCli.initContainers }}
initContainers:
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: keycloak-config-cli
image: {{ template "keycloak.keycloakConfigCli.image" . }}
imagePullPolicy: {{ .Values.keycloakConfigCli.image.pullPolicy }}
{{- if .Values.keycloakConfigCli.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.command "context" $) | nindent 12 }}
{{- else }}
command:
- java
- -jar
- /opt/bitnami/keycloak-config-cli/keycloak-config-cli.jar
{{- end }}
{{- if .Values.keycloakConfigCli.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.args "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.keycloakConfigCli.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.keycloakConfigCli.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
env:
- name: KEYCLOAK_URL
value: {{ printf "http://%s-headless:%d%s" (include "common.names.fullname" .) (.Values.containerPorts.http | int) (.Values.httpRelativePath) }}
- name: KEYCLOAK_USER
value: {{ .Values.auth.adminUser | quote }}
- name: KEYCLOAK_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "keycloak.secretName" . }}
key: {{ include "keycloak.secretKey" . }}
{{- if or .Values.keycloakConfigCli.configuration .Values.keycloakConfigCli.existingConfigmap }}
- name: IMPORT_FILES_LOCATIONS
value: /config/*
{{- end }}
- name: KEYCLOAK_AVAILABILITYCHECK_ENABLED
value: {{ .Values.keycloakConfigCli.availabilityCheck.enabled | quote }}
{{- if and .Values.keycloakConfigCli.availabilityCheck.enabled .Values.keycloakConfigCli.availabilityCheck.timeout }}
- name: KEYCLOAK_AVAILABILITYCHECK_TIMEOUT
value: {{ .Values.keycloakConfigCli.availabilityCheck.timeout }}
{{- end }}
{{- if .Values.keycloakConfigCli.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
{{- if or .Values.keycloakConfigCli.extraEnvVarsCM .Values.keycloakConfigCli.extraEnvVarsSecret }}
envFrom:
{{- if .Values.keycloakConfigCli.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.keycloakConfigCli.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- end }}
{{- if or .Values.keycloakConfigCli.configuration .Values.keycloakConfigCli.existingConfigmap .Values.keycloakConfigCli.extraVolumeMounts }}
volumeMounts:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
{{- if or .Values.keycloakConfigCli.configuration .Values.keycloakConfigCli.existingConfigmap }}
- name: config-volume
mountPath: /config
{{- end }}
{{- if .Values.keycloakConfigCli.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.keycloakConfigCli.resources }}
resources: {{- toYaml .Values.keycloakConfigCli.resources | nindent 12 }}
{{- else if ne .Values.keycloakConfigCli.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.keycloakConfigCli.resourcesPreset) | nindent 12 }}
{{- end }}
{{- if .Values.keycloakConfigCli.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.keycloakConfigCli.sidecars "context" $) | nindent 8 }}
{{- end }}
{{- if or .Values.keycloakConfigCli.configuration .Values.keycloakConfigCli.existingConfigmap .Values.keycloakConfigCli.extraVolumes }}
volumes:
- name: empty-dir
emptyDir: {}
{{- if or .Values.keycloakConfigCli.configuration .Values.keycloakConfigCli.existingConfigmap }}
- name: config-volume
configMap:
name: {{ include "keycloak.keycloakConfigCli.configmapName" . }}
{{- end }}
{{- if .Values.keycloakConfigCli.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.keycloakConfigCli.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,41 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-metrics" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: metrics
{{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.service.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
ports:
- name: metrics
port: {{ .Values.metrics.service.ports.metrics }}
protocol: TCP
targetPort: {{ .Values.containerPorts.metrics }}
- name: http
port: {{ .Values.metrics.service.ports.http }}
protocol: TCP
targetPort: {{ .Values.containerPorts.http }}
{{- if .Values.tls.enabled }}
- name: https
port: {{ .Values.metrics.service.ports.https }}
protocol: TCP
targetPort: {{ .Values.containerPorts.https }}
{{- end }}
{{- if .Values.metrics.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- end }}

View File

@@ -1,102 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: keycloak
policyTypes:
- Ingress
- Egress
{{- if .Values.networkPolicy.allowExternalEgress }}
egress:
- {}
{{- else }}
egress:
- ports:
# Allow dns resolution
- port: 53
protocol: UDP
- port: 53
protocol: TCP
{{- range $port := .Values.networkPolicy.kubeAPIServerPorts }}
- port: {{ $port }}
{{- end }}
# Allow connection to PostgreSQL
- ports:
- port: {{ include "keycloak.databasePort" . | trimAll "\"" | int }}
{{- if .Values.postgresql.enabled }}
to:
- podSelector:
matchLabels:
app.kubernetes.io/name: postgresql
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
# Allow connection to other keycloak nodes
- ports:
{{- /* Constant in code: https://github.com/keycloak/keycloak/blob/ce8e925c1ad9bf7a3180d1496e181aeea0ab5f8a/operator/src/main/java/org/keycloak/operator/Constants.java#L60 */}}
- port: 7800
- port: {{ .Values.containerPorts.http }}
{{- if .Values.tls.enabled }}
- port: {{ .Values.containerPorts.https }}
{{- end }}
to:
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
app.kubernetes.io/component: keycloak
{{- if .Values.networkPolicy.extraEgress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraEgress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
ingress:
- ports:
{{- /* Constant in code: https://github.com/keycloak/keycloak/blob/ce8e925c1ad9bf7a3180d1496e181aeea0ab5f8a/operator/src/main/java/org/keycloak/operator/Constants.java#L60 */}}
- port: 7800
{{- if and (.Values.metrics.enabled) (not (eq (.Values.containerPorts.http | int) (.Values.containerPorts.metrics | int) )) }}
- port: {{ .Values.containerPorts.metrics }} # metrics and health
{{- end }}
- port: {{ .Values.containerPorts.http }}
{{- if .Values.tls.enabled }}
- port: {{ .Values.containerPorts.https }}
{{- end }}
{{- if not .Values.networkPolicy.allowExternal }}
from:
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }}
- podSelector:
matchLabels:
{{ template "common.names.fullname" . }}-client: "true"
{{- if .Values.networkPolicy.ingressNSMatchLabels }}
- namespaceSelector:
matchLabels:
{{- range $key, $value := .Values.networkPolicy.ingressNSMatchLabels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
{{- if .Values.networkPolicy.ingressNSPodMatchLabels }}
podSelector:
matchLabels:
{{- range $key, $value := .Values.networkPolicy.ingressNSPodMatchLabels }}
{{ $key | quote }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- $extraIngress := coalesce .Values.networkPolicy.additionalRules .Values.networkPolicy.extraIngress }}
{{- if $extraIngress }}
{{- include "common.tplvalues.render" ( dict "value" $extraIngress "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -1,28 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- if or .Values.pdb.maxUnavailable ( not .Values.pdb.minAvailable ) }}
maxUnavailable: {{ .Values.pdb.maxUnavailable | default 1 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: keycloak
{{- end }}

View File

@@ -1,20 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled .Values.metrics.prometheusRule.groups}}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.prometheusRule.namespace }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.prometheusRule.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
groups: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.groups "context" .) | nindent 4 }}
{{- end }}

View File

@@ -1,28 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.serviceAccount.create .Values.rbac.create }}
kind: Role
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
{{- if .Values.rbac.rules }}
{{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }}
{{- end }}
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
{{- end }}

View File

@@ -1,25 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.serviceAccount.create .Values.rbac.create }}
kind: RoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "common.names.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "keycloak.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- end }}

View File

@@ -1,19 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.existingSecret) (not .Values.postgresql.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-externaldb" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if or .Values.externalDatabase.annotations .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.merge" (dict "values" (list .Values.externalDatabase.annotations .Values.commonAnnotations) "context" $) | nindent 4 }}
{{- end }}
type: Opaque
data:
db-password: {{ include "common.secrets.passwords.manage" (dict "secret" (printf "%s-externaldb" (include "common.names.fullname" .)) "key" "db-password" "length" 10 "providedValues" (list "externalDatabase.password") "context" $) }}
{{- end }}

View File

@@ -1,20 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if not .Values.auth.existingSecret }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if or .Values.auth.annotations .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.merge" (dict "values" (list .Values.auth.annotations .Values.commonAnnotations) "context" $) | nindent 4 }}
{{- end }}
type: Opaque
data:
admin-password: {{ include "common.secrets.passwords.manage" (dict "secret" (printf "%s" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-") "key" "admin-password" "length" 10 "providedValues" (list "auth.adminPassword") "context" $) }}
{{- end }}

View File

@@ -1,65 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
apiVersion: v1
kind: Service
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if or .Values.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
{{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerSourceRanges)) }}
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
{{- end }}
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
{{- if .Values.service.sessionAffinity }}
sessionAffinity: {{ .Values.service.sessionAffinity }}
{{- end }}
{{- if .Values.service.sessionAffinityConfig }}
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.service.sessionAffinityConfig "context" $) | nindent 4 }}
{{- end }}
ports:
{{- if .Values.service.http.enabled }}
- name: http
port: {{ coalesce .Values.service.ports.http .Values.service.port }}
protocol: TCP
targetPort: http
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.http))) }}
nodePort: {{ .Values.service.nodePorts.http }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- end }}
{{- if .Values.tls.enabled }}
- name: https
port: {{ coalesce .Values.service.ports.https .Values.service.httpsPort }}
protocol: TCP
targetPort: https
{{- if (and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.https))) }}
nodePort: {{ .Values.service.nodePorts.https }}
{{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- end }}
{{- if .Values.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak

View File

@@ -1,22 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "keycloak.serviceAccountName" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.serviceAccount.extraLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.extraLabels "context" $) | nindent 4 }}
{{- end }}
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
{{- end }}

View File

@@ -1,58 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.metrics.serviceMonitor.jobLabel }}
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }}
{{- end }}
endpoints:
{{- $defaultEndpoint := pick .Values.metrics.serviceMonitor "port" "scheme" "tlsConfig" "interval" "scrapeTimeout" "relabelings" "metricRelabelings" "honorLabels" }}
{{- $endpoints := ternary (.Values.metrics.serviceMonitor.endpoints) (list (dict "path" .Values.metrics.serviceMonitor.path)) (empty .Values.metrics.serviceMonitor.path) }}
{{- range $endpoints }}
{{- $endpoint := merge . $defaultEndpoint }}
- port: {{ $endpoint.port | quote }}
scheme: {{ $endpoint.scheme | quote }}
{{- if $endpoint.tlsConfig }}
tlsConfig: {{- include "common.tplvalues.render" ( dict "value" $endpoint.tlsConfig "context" $) | nindent 8 }}
{{- end }}
path: {{ include "common.tplvalues.render" ( dict "value" $endpoint.path "context" $) }}
{{- if $endpoint.interval }}
interval: {{ $endpoint.interval }}
{{- end }}
{{- if $endpoint.scrapeTimeout }}
scrapeTimeout: {{ $endpoint.scrapeTimeout }}
{{- end }}
{{- if $endpoint.relabelings }}
relabelings: {{- include "common.tplvalues.render" ( dict "value" $endpoint.relabelings "context" $) | nindent 6 }}
{{- end }}
{{- if $endpoint.metricRelabelings }}
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" $endpoint.metricRelabelings "context" $) | nindent 6 }}
{{- end }}
{{- if $endpoint.honorLabels }}
honorLabels: {{ $endpoint.honorLabels }}
{{- end }}
{{- end }}
namespaceSelector:
matchNames:
- {{ include "common.names.namespace" . | quote }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
{{- if .Values.metrics.serviceMonitor.selector }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
{{- end }}
app.kubernetes.io/component: metrics
{{- end }}

View File

@@ -1,449 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if or .Values.statefulsetAnnotations .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.merge" ( dict "values" ( list .Values.statefulsetAnnotations .Values.commonAnnotations ) "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimitCount }}
podManagementPolicy: {{ .Values.podManagementPolicy }}
serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
updateStrategy:
{{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" $ ) | nindent 4 }}
{{- if .Values.minReadySeconds }}
minReadySeconds: {{ .Values.minReadySeconds }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: keycloak
template:
metadata:
annotations:
checksum/configmap-env-vars: {{ include (print $.Template.BasePath "/configmap-env-vars.yaml") . | sha256sum }}
{{- if not .Values.auth.existingSecret }}
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- end }}
{{- if (include "keycloak.createConfigmap" .) }}
checksum/configuration: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/component: keycloak
app.kubernetes.io/app-version: {{ .Chart.AppVersion }}
spec:
serviceAccountName: {{ template "keycloak.serviceAccountName" . }}
{{- include "keycloak.imagePullSecrets" . | nindent 6 }}
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
{{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.topologySpreadConstraints }}
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- end }}
{{- if .Values.schedulerName }}
schedulerName: {{ .Values.schedulerName }}
{{- end }}
{{- if .Values.podSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.podSecurityContext "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.dnsPolicy }}
dnsPolicy: {{ .Values.dnsPolicy }}
{{- end }}
{{- if .Values.dnsConfig }}
dnsConfig: {{- include "common.tplvalues.render" (dict "value" .Values.dnsConfig "context" .) | nindent 8 }}
{{- end }}
enableServiceLinks: {{ .Values.enableServiceLinks }}
{{- if .Values.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- end }}
{{- if or .Values.enableDefaultInitContainers .Values.initContainers }}
initContainers:
{{- if .Values.enableDefaultInitContainers }}
- name: prepare-write-dirs
image: {{ template "keycloak.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- /bin/bash
args:
- -ec
- |
. /opt/bitnami/scripts/liblog.sh
info "Copying writable dirs to empty dir"
# In order to not break the application functionality we need to make some
# directories writable, so we need to copy it to an empty dir volume
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/lib/quarkus /emptydir/app-quarkus-dir
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/data /emptydir/app-data-dir
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/providers /emptydir/app-providers-dir
cp -r --preserve=mode,timestamps /opt/bitnami/keycloak/themes /emptydir/app-themes-dir
info "Copy operation completed"
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- else if ne .Values.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.resourcesPreset) | nindent 12 }}
{{- end }}
volumeMounts:
- name: empty-dir
mountPath: /emptydir
{{- end }}
{{- if .Values.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
{{- end }}
{{- end }}
containers:
- name: keycloak
image: {{ template "keycloak.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
{{- end }}
env:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.image.debug | quote }}
{{- if .Values.usePasswordFiles }}
- name: KC_BOOTSTRAP_ADMIN_PASSWORD_FILE
value: {{ printf "/opt/bitnami/keycloak/secrets/%s" (include "keycloak.secretKey" .) }}
- name: KEYCLOAK_DATABASE_PASSWORD_FILE
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretPasswordKey" .) }}
{{- if .Values.externalDatabase.existingSecretHostKey }}
- name: KEYCLOAK_DATABASE_HOST_FILE
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretHostKey" .) }}
{{- end }}
{{- if .Values.externalDatabase.existingSecretPortKey }}
- name: KEYCLOAK_DATABASE_PORT_FILE
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretPortKey" .) }}
{{- end }}
{{- if .Values.externalDatabase.existingSecretUserKey }}
- name: KEYCLOAK_DATABASE_USER_FILE
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretUserKey" .) }}
{{- end }}
{{- if .Values.externalDatabase.existingSecretDatabaseKey }}
- name: KEYCLOAK_DATABASE_NAME_FILE
value: {{ printf "/opt/bitnami/keycloak/secrets/db-%s" (include "keycloak.databaseSecretDatabaseKey" .) }}
{{- end }}
{{- if and .Values.tls.enabled (or .Values.tls.keystorePassword .Values.tls.passwordsSecret) }}
- name: KEYCLOAK_HTTPS_KEY_STORE_PASSWORD_FILE
value: "/opt/bitnami/keycloak/secrets/tls-keystore-password"
{{- end }}
{{- if and .Values.tls.enabled (or .Values.tls.truststorePassword .Values.tls.passwordsSecret) }}
- name: KEYCLOAK_HTTPS_TRUST_STORE_PASSWORD_FILE
value: "/opt/bitnami/keycloak/secrets/tls-truststore-password"
{{- end }}
{{- if and .Values.spi.existingSecret (or .Values.spi.truststorePassword .Values.spi.passwordsSecret) }}
- name: KEYCLOAK_SPI_TRUSTSTORE_PASSWORD_FILE
value: "/opt/bitnami/keycloak/secrets/spi-truststore-password"
{{- end }}
{{- else }}
- name: KC_BOOTSTRAP_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "keycloak.secretName" . }}
key: {{ include "keycloak.secretKey" . }}
- name: KEYCLOAK_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "keycloak.databaseSecretName" . }}
key: {{ include "keycloak.databaseSecretPasswordKey" . }}
{{- if .Values.externalDatabase.existingSecretHostKey }}
- name: KEYCLOAK_DATABASE_HOST
valueFrom:
secretKeyRef:
name: {{ include "keycloak.databaseSecretName" . }}
key: {{ include "keycloak.databaseSecretHostKey" . }}
{{- end }}
{{- if .Values.externalDatabase.existingSecretPortKey }}
- name: KEYCLOAK_DATABASE_PORT
valueFrom:
secretKeyRef:
name: {{ include "keycloak.databaseSecretName" . }}
key: {{ include "keycloak.databaseSecretPortKey" . }}
{{- end }}
{{- if .Values.externalDatabase.existingSecretUserKey }}
- name: KEYCLOAK_DATABASE_USER
valueFrom:
secretKeyRef:
name: {{ include "keycloak.databaseSecretName" . }}
key: {{ include "keycloak.databaseSecretUserKey" . }}
{{- end }}
{{- if .Values.externalDatabase.existingSecretDatabaseKey }}
- name: KEYCLOAK_DATABASE_NAME
valueFrom:
secretKeyRef:
name: {{ include "keycloak.databaseSecretName" . }}
key: {{ include "keycloak.databaseSecretDatabaseKey" . }}
{{- end }}
{{- if and .Values.tls.enabled (or .Values.tls.keystorePassword .Values.tls.passwordsSecret) }}
- name: KEYCLOAK_HTTPS_KEY_STORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "keycloak.tlsPasswordsSecretName" . }}
key: "tls-keystore-password"
{{- end }}
{{- if and .Values.tls.enabled (or .Values.tls.truststorePassword .Values.tls.passwordsSecret) }}
- name: KEYCLOAK_HTTPS_TRUST_STORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "keycloak.tlsPasswordsSecretName" . }}
key: "tls-truststore-password"
{{- end }}
{{- if and .Values.spi.existingSecret (or .Values.spi.truststorePassword .Values.spi.passwordsSecret) }}
- name: KEYCLOAK_SPI_TRUSTSTORE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "keycloak.spiPasswordsSecretName" . }}
key: "spi-truststore-password"
{{- end }}
{{- end }}
- name: KEYCLOAK_HTTP_RELATIVE_PATH
value: {{ .Values.httpRelativePath | quote }}
{{- if .Values.extraStartupArgs }}
- name: KEYCLOAK_EXTRA_ARGS
value: {{ .Values.extraStartupArgs | quote }}
{{- end }}
{{- if .Values.adminRealm }}
- name: KC_SPI_ADMIN_REALM
value: "{{ .Values.adminRealm }}"
{{- end }}
{{- if .Values.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ printf "%s-env-vars" (include "common.names.fullname" .) }}
{{- if .Values.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- else if ne .Values.resourcesPreset "none" }}
resources: {{- include "common.resources.preset" (dict "type" .Values.resourcesPreset) | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.containerPorts.http }}
protocol: TCP
{{- if .Values.tls.enabled }}
- name: https
containerPort: {{ .Values.containerPorts.https }}
protocol: TCP
{{- end }}
{{- if and (.Values.metrics.enabled) (not (eq (.Values.containerPorts.http | int) (.Values.containerPorts.metrics | int) )) }}
- name: metrics
containerPort: {{ .Values.containerPorts.metrics }}
protocol: TCP
{{- end}}
{{- /* Constant in code: https://github.com/keycloak/keycloak/blob/ce8e925c1ad9bf7a3180d1496e181aeea0ab5f8a/operator/src/main/java/org/keycloak/operator/Constants.java#L60 */}}
- name: discovery
containerPort: 7800
{{- if .Values.extraContainerPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraContainerPorts "context" $) | nindent 12 }}
{{- end }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
{{- else if .Values.startupProbe.enabled }}
startupProbe: {{- omit .Values.startupProbe "enabled" | toYaml | nindent 12 }}
httpGet:
path: {{ .Values.httpRelativePath }}
port: http
{{- end }}
{{- if .Values.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
{{- else if .Values.livenessProbe.enabled }}
livenessProbe: {{- omit .Values.livenessProbe "enabled" | toYaml | nindent 12 }}
tcpSocket:
port: http
{{- end }}
{{- if .Values.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
{{- else if .Values.readinessProbe.enabled }}
readinessProbe: {{- omit .Values.readinessProbe "enabled" | toYaml | nindent 12 }}
httpGet:
path: {{ .Values.httpRelativePath }}realms/{{ .Values.adminRealm | default "master" }}
port: http
{{- end }}
{{- end }}
volumeMounts:
- name: empty-dir
mountPath: /tmp
subPath: tmp-dir
- name: empty-dir
mountPath: /bitnami/keycloak
subPath: app-volume-dir
- name: empty-dir
mountPath: /opt/bitnami/keycloak/conf
subPath: app-conf-dir
- name: empty-dir
mountPath: /opt/bitnami/keycloak/lib/quarkus
subPath: app-quarkus-dir
- name: empty-dir
mountPath: /opt/bitnami/keycloak/data
subPath: app-data-dir
- name: empty-dir
mountPath: /opt/bitnami/keycloak/providers
subPath: app-providers-dir
- name: empty-dir
mountPath: /opt/bitnami/keycloak/themes
subPath: app-themes-dir
{{- if .Values.usePasswordFiles }}
- name: keycloak-secrets
mountPath: /opt/bitnami/keycloak/secrets
{{- end }}
{{- if or .Values.configuration .Values.existingConfigmap }}
- name: keycloak-config
mountPath: /bitnami/keycloak/conf/keycloak.conf
subPath: keycloak.conf
{{- end }}
{{- if .Values.tls.enabled }}
- name: certificates
mountPath: /opt/bitnami/keycloak/certs
readOnly: true
{{- end }}
{{- if .Values.customCaExistingSecret }}
- name: custom-ca
mountPath: /opt/bitnami/keycloak/custom-ca
readOnly: true
{{- end }}
{{- if .Values.spi.existingSecret }}
- name: spi-certificates
mountPath: /opt/bitnami/keycloak/spi-certs
readOnly: true
{{- end }}
{{- if or .Values.initdbScriptsConfigMap .Values.initdbScripts }}
- name: custom-init-scripts
mountPath: /docker-entrypoint-initdb.d
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: empty-dir
emptyDir: {}
{{- if .Values.usePasswordFiles }}
- name: keycloak-secrets
projected:
sources:
- secret:
name: {{ include "keycloak.secretName" . }}
- secret:
name: {{ include "keycloak.databaseSecretName" . }}
items:
- key: {{ include "keycloak.databaseSecretPasswordKey" . }}
path: {{ printf "db-%s" (include "keycloak.databaseSecretPasswordKey" .) }}
{{- if .Values.externalDatabase.existingSecretHostKey }}
- key: {{ include "keycloak.databaseSecretHostKey" . }}
path: {{ printf "db-%s" (include "keycloak.databaseSecretHostKey" .) }}
{{- end }}
{{- if .Values.externalDatabase.existingSecretPortKey }}
- key: {{ include "keycloak.databaseSecretPortKey" . }}
path: {{ printf "db-%s" (include "keycloak.databaseSecretPortKey" .) }}
{{- end }}
{{- if .Values.externalDatabase.existingSecretUserKey }}
- key: {{ include "keycloak.databaseSecretUserKey" . }}
path: {{ printf "db-%s" (include "keycloak.databaseSecretUserKey" .) }}
{{- end }}
{{- if .Values.externalDatabase.existingSecretDatabaseKey }}
- key: {{ include "keycloak.databaseSecretDatabaseKey" . }}
path: {{ printf "db-%s" (include "keycloak.databaseSecretDatabaseKey" .) }}
{{- end }}
{{- if and .Values.tls.enabled (or .Values.tls.keystorePassword .Values.tls.truststorePassword .Values.tls.passwordsSecret) }}
- secret:
name: {{ include "keycloak.tlsPasswordsSecretName" . }}
{{- end }}
{{- if and .Values.spi.existingSecret (or .Values.spi.truststorePassword .Values.spi.passwordsSecret) }}
- secret:
name: {{ include "keycloak.spiPasswordsSecretName" . }}
{{- end }}
{{- end }}
{{- if or .Values.configuration .Values.existingConfigmap }}
- name: keycloak-config
configMap:
name: {{ include "keycloak.configmapName" . }}
{{- end }}
{{- if .Values.tls.enabled }}
- name: certificates
secret:
secretName: {{ include "keycloak.tlsSecretName" . }}
defaultMode: 420
{{- end }}
{{- if .Values.customCaExistingSecret }}
- name: custom-ca
secret:
secretName: {{ .Values.customCaExistingSecret }}
defaultMode: 420
{{- end }}
{{- if .Values.spi.existingSecret }}
- name: spi-certificates
secret:
secretName: {{ .Values.spi.existingSecret }}
defaultMode: 420
{{- end }}
{{- if or .Values.initdbScriptsConfigMap .Values.initdbScripts }}
- name: custom-init-scripts
configMap:
name: {{ include "keycloak.initdbScriptsCM" . }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}

View File

@@ -1,43 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if and (or .Values.tls.keystorePassword .Values.tls.truststorePassword) (not .Values.tls.passwordsSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-tls-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if .Values.tls.keystorePassword }}
tls-keystore-password: {{ .Values.tls.keystorePassword | b64enc | quote }}
{{- end }}
{{- if .Values.tls.truststorePassword }}
tls-truststore-password: {{ .Values.tls.truststorePassword | b64enc | quote }}
{{- end }}
---
{{- end }}
{{- if and .Values.spi.truststorePassword (not .Values.spi.passwordsSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-spi-passwords" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- if .Values.spi.truststorePassword }}
spi-truststore-password: {{ .Values.spi.truststorePassword | b64enc | quote }}
{{- end }}
{{- end }}

View File

@@ -1,71 +0,0 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.ingress.enabled }}
{{- if .Values.ingress.secrets }}
{{- range .Values.ingress.secrets }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.tplvalues.render" ( dict "value" .name "context" $ ) }}
namespace: {{ include "common.names.namespace" $ | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ include "common.tplvalues.render" ( dict "value" .certificate "context" $ ) | b64enc }}
tls.key: {{ include "common.tplvalues.render" ( dict "value" .key "context" $ ) | b64enc }}
---
{{- end }}
{{- end }}
{{- if and .Values.ingress.tls .Values.ingress.selfSigned }}
{{- $secretName := printf "%s-tls" .Values.ingress.hostname }}
{{- $ca := genCA "keycloak-ca" 365 }}
{{- $cert := genSignedCert (tpl .Values.ingress.hostname .) nil (list (tpl .Values.ingress.hostname .)) 365 $ca }}
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
{{- end }}
{{- end }}
{{- if (include "keycloak.createTlsSecret" $) }}
{{- $secretName := printf "%s-crt" (include "common.names.fullname" .) }}
{{- $ca := genCA "keycloak-ca" 365 }}
{{- $releaseNamespace := include "common.names.namespace" . }}
{{- $clusterDomain := .Values.clusterDomain }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ $secretName }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- $replicaCount := int .Values.replicaCount }}
{{- $svcName := include "common.names.fullname" . }}
{{- $altNames := list (printf "%s.%s.svc.%s" $svcName $releaseNamespace $clusterDomain) (printf "%s.%s" $svcName $releaseNamespace) $svcName }}
{{- $cert := genSignedCert $svcName nil $altNames 365 $ca }}
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
{{- end }}

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
apiVersion: v2 apiVersion: v2
name: paperless-ai name: paperless-ai
description: Ein Helm Chart für Paperless AI, basierend auf der Docker Compose Konfiguration. description: Ein Helm Chart für Paperless AI, basierend auf der Docker Compose Konfiguration.
version: 0.1.2 version: 0.1.8
appVersion: 3.0.7 appVersion: 3.0.9
keywords: keywords:
- paperless-ai - paperless-ai
- document-management - document-management

View File

@@ -11,6 +11,8 @@ spec:
{{- if not .Values.autoscaling.enabled }} {{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }} # Anzahl der gewünschten Pod-Replikate, wenn Autoscaling deaktiviert ist. replicas: {{ .Values.replicaCount }} # Anzahl der gewünschten Pod-Replikate, wenn Autoscaling deaktiviert ist.
{{- end }} {{- end }}
strategy:
type: Recreate
selector: selector:
matchLabels: matchLabels:
{{- include "paperless-ai.selectorLabels" . | nindent 6 }} # Selector, um die Pods zu finden, die zu diesem Deployment gehören. {{- include "paperless-ai.selectorLabels" . | nindent 6 }} # Selector, um die Pods zu finden, die zu diesem Deployment gehören.
@@ -53,8 +55,12 @@ spec:
- name: {{ $key }} # Name der Umgebungsvariable. - name: {{ $key }} # Name der Umgebungsvariable.
value: {{ $value | quote }} # Wert der Umgebungsvariable. value: {{ $value | quote }} # Wert der Umgebungsvariable.
{{- end }} {{- end }}
{{- if .Values.persistence.enabled }}
volumeMounts: volumeMounts:
- name: logs-dir
mountPath: /app/logs
- name: public-images-dir
mountPath: /app/public/images
{{- if .Values.persistence.enabled }}
- name: paperless-ai-data # Name des Volumes, das gemountet werden soll. - name: paperless-ai-data # Name des Volumes, das gemountet werden soll.
mountPath: /app/data # Der Pfad im Container, an dem das Volume gemountet wird. mountPath: /app/data # Der Pfad im Container, an dem das Volume gemountet wird.
{{- end }} {{- end }}
@@ -72,8 +78,15 @@ spec:
tolerations: tolerations:
{{- toYaml . | nindent 8 }} # Toleranzen für die Pod-Platzierung auf Tainted Nodes. {{- toYaml . | nindent 8 }} # Toleranzen für die Pod-Platzierung auf Tainted Nodes.
{{- end }} {{- end }}
{{- if .Values.persistence.enabled }}
volumes: volumes:
- name: public-images-dir
emptyDir:
sizeLimit: 100Mi
- name: logs-dir
emptyDir:
sizeLimit: 100Mi
{{- if .Values.persistence.enabled }}
- name: paperless-ai-data # Definiert ein Volume mit dem Namen 'paperless-ai-data'. - name: paperless-ai-data # Definiert ein Volume mit dem Namen 'paperless-ai-data'.
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ include "paperless-ai.fullname" . }}-data # Verweist auf den Persistent Volume Claim. claimName: {{ include "paperless-ai.fullname" . }}-data # Verweist auf den Persistent Volume Claim.

View File

@@ -79,7 +79,7 @@ readinessProbe:
# Sicherheitskontext-Einstellungen für Pod und Container. # Sicherheitskontext-Einstellungen für Pod und Container.
securityContext: securityContext:
enabled: false enabled: true
pod: pod:
runAsUser: 1000 runAsUser: 1000
runAsGroup: 2000 runAsGroup: 2000
@@ -98,13 +98,13 @@ autoscaling:
targetCPUUtilizationPercentage: 80 targetCPUUtilizationPercentage: 80
# Ressourcenanforderungen und -limits für den Container. # Ressourcenanforderungen und -limits für den Container.
resources: resources: {}
limits: # limits:
cpu: 300m # cpu: 300m
memory: 704Mi # memory: 704Mi
requests: # requests:
cpu: 100m # cpu: 100m
memory: 256Mi # memory: 256Mi
# Node-Selector für die Pod-Platzierung. # Node-Selector für die Pod-Platzierung.
nodeSelector: {} nodeSelector: {}

View File

@@ -1,15 +0,0 @@
dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 1.5.1
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 14.0.5
- name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 20.1.1
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 20.7.0
digest: sha256:393ade0c071a39f76cc62844ef6d14d85eeb674f099de016e1adac207f04d643
generated: "2025-02-04T16:09:39.211839317Z"

View File

@@ -1,42 +1,31 @@
annotations:
artifacthub.io/alternativeName: paperless
artifacthub.io/changes: |-
- kind: fixed
description: Allow for custom db secrets name
artifacthub.io/links: |-
- name: App Source
url: https://github.com/paperless-ngx/paperless-ngx
- name: Chart Source
url: https://github.com/gabe565/charts/tree/main/charts/paperless-ngx
apiVersion: v2 apiVersion: v2
appVersion: 2.14.7 name: paperless-ngx
dependencies: description: "A community-supported supercharged version of paperless: scan, index and archive all your physical documents"
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 1.5.1
- condition: postgresql.enabled
name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 14.0.5
- condition: mariadb.enabled
name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 20.1.1
- condition: redis.enabled
name: redis
repository: https://charts.bitnami.com/bitnami
version: 20.7.0
description: 'A community-supported supercharged version of paperless: scan, index
and archive all your physical documents'
home: https://charts.gabe565.com/charts/paperless-ngx/ home: https://charts.gabe565.com/charts/paperless-ngx/
icon: https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/b948750/src-ui/src/assets/logo-notext.svg icon: https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/b948750/src-ui/src/assets/logo-notext.svg
keywords:
- documents
- ocr
- paper
kubeVersion: '>=1.22.0-0'
name: paperless-ngx
sources:
- https://github.com/paperless-ngx/paperless-ngx
type: application type: application
version: 0.25.0 version: 0.27.3
appVersion: 2.20.3
kubeVersion: ">=1.28.0-0"
keywords:
- documents
- ocr
- paper
dependencies:
- name: common
repository: https://bjw-s-labs.github.io/helm-charts/
version: 4.4.0
- name: postgresql
version: 18.1.11
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: mariadb
version: 23.2.4
repository: https://charts.bitnami.com/bitnami
condition: mariadb.enabled
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 24.0.0
condition: redis.enabled
sources:
- https://github.com/paperless-ngx/paperless-ngx

View File

@@ -1,15 +1,17 @@
# Paperless-ngx # Paperless-ngx
![Version: 0.24.1](https://img.shields.io/badge/Version-0.24.1-informational?style=flat) <img src="https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/b948750/src-ui/src/assets/logo-notext.svg" align="right" width="92" alt="paperless-ngx logo">
![Version: 0.25.10](https://img.shields.io/badge/Version-0.25.10-informational?style=flat)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat)
![AppVersion: 2.14.7](https://img.shields.io/badge/AppVersion-2.14.7-informational?style=flat) ![AppVersion: 2.20.0](https://img.shields.io/badge/AppVersion-2.20.0-informational?style=flat)
A community-supported supercharged version of paperless: scan, index and archive all your physical documents A community-supported supercharged version of paperless: scan, index and archive all your physical documents
**Homepage:** <https://charts.gabe565.com/charts/paperless-ngx/> **Homepage:** <https://git.cooltux.net/marko/HelmChartSammlung/src/branch/main/charts/paperless-ngx>
**This chart is not maintained by the upstream project and any issues with the chart should be raised **This chart is not maintained by the upstream project and any issues with the chart should be raised
[here](https://github.com/gabe565/charts/issues/new?assignees=gabe565&labels=bug&template=bug_report.yaml&name=paperless-ngx&version=0.24.1)** [here](https://git.cooltux.net/marko/HelmChartSammlung/issues/new?assignees=marko&labels=bug&template=bug_report.yaml&name=paperless-ngx&version=0.25.0)**
## Source Code ## Source Code
@@ -17,33 +19,27 @@ A community-supported supercharged version of paperless: scan, index and archive
## Requirements ## Requirements
Kubernetes: `>=1.22.0-0` Kubernetes: `>=1.28.0-0`
## Dependencies ## Dependencies
| Repository | Name | Version | | Repository | Name | Version |
|------------|------|---------| | ------------------------------------- | ---------- | ------- |
| <https://bjw-s.github.io/helm-charts> | common | 1.5.1 | | <https://bjw-s.github.io/helm-charts> | common | 4.4.0 |
| <https://charts.bitnami.com/bitnami> | mariadb | 20.1.1 | | <https://charts.bitnami.com/bitnami> | mariadb | 23.2.4 |
| <https://charts.bitnami.com/bitnami> | postgresql | 14.0.5 | | <https://charts.bitnami.com/bitnami> | postgresql | 18.1.11 |
| <https://charts.bitnami.com/bitnami> | redis | 20.7.0 | | <https://charts.bitnami.com/bitnami> | redis | 24.0.0 |
## Installing the Chart ## Installing the Chart
To install the chart with the release name `paperless-ngx` To install the chart with the release name `paperless-ngx`
### OCI (Recommended)
```console
helm install paperless-ngx oci://ghcr.io/gabe565/charts/paperless-ngx
```
### Traditional ### Traditional
```console ```console
helm repo add gabe565 https://charts.gabe565.com helm repo add cooltux https://git.cooltux.net/api/packages/marko/helm
helm repo update helm repo update
helm install paperless-ngx gabe565/paperless-ngx helm install cooltux/paperless-ngx
``` ```
## Uninstalling the Chart ## Uninstalling the Chart
@@ -66,13 +62,13 @@ Specify each parameter using the `--set key=value[,key=value]` argument to `helm
```console ```console
helm install paperless-ngx \ helm install paperless-ngx \
--set env.TZ="America/New York" \ --set env.TZ="America/New York" \
gabe565/paperless-ngx cooltux/paperless-ngx
``` ```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
```console ```console
helm install paperless-ngx gabe565/paperless-ngx -f values.yaml helm install paperless-ngx cooltux/paperless-ngx -f values.yaml
``` ```
## Custom configuration ## Custom configuration
@@ -87,22 +83,22 @@ See each database section in [`values.yaml`](./values.yaml) for configuration ex
**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/a081de5/charts/library/common) **Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/a081de5/charts/library/common)
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| | ------------------- | ------ | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| env | object | See [values.yaml](./values.yaml) | Environment variables [[ref]](https://docs.paperless-ngx.com/configuration/) | | env | object | See [values.yaml](./values.yaml) | Environment variables [[ref]](https://docs.paperless-ngx.com/configuration/) |
| env.TZ | string | `"UTC"` | Set the container timezone | | env.TZ | string | `"UTC"` | Set the container timezone |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| image.repository | string | `"ghcr.io/paperless-ngx/paperless-ngx"` | Image repository | | image.repository | string | `"ghcr.io/paperless-ngx/paperless-ngx"` | Image repository |
| image.tag | string | `"2.14.7"` | Image tag | | image.tag | string | `"2.20.0"` | Image tag |
| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. | | ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. |
| mariadb | object | See [values.yaml](./values.yaml) | Enable and configure mariadb database subchart under this key. If enabled, the app's db envs will be set for you. [[ref]](https://github.com/bitnami/charts/tree/main/bitnami/mariadb) | | mariadb | object | See [values.yaml](./values.yaml) | Enable and configure mariadb database subchart under this key. If enabled, the app's db envs will be set for you. [[ref]](https://github.com/bitnami/charts/tree/main/bitnami/mariadb) |
| persistence.consume | object | See [values.yaml](./values.yaml) | Configure consume volume settings for the chart under this key. | | persistence.consume | object | See [values.yaml](./values.yaml) | Configure consume volume settings for the chart under this key. |
| persistence.data | object | See [values.yaml](./values.yaml) | Configure data volume settings for the chart under this key. | | persistence.data | object | See [values.yaml](./values.yaml) | Configure data volume settings for the chart under this key. |
| persistence.export | object | See [values.yaml](./values.yaml) | Configure export volume settings for the chart under this key. | | persistence.export | object | See [values.yaml](./values.yaml) | Configure export volume settings for the chart under this key. |
| persistence.media | object | See [values.yaml](./values.yaml) | Configure media volume settings for the chart under this key. | | persistence.media | object | See [values.yaml](./values.yaml) | Configure media volume settings for the chart under this key. |
| postgresql | object | See [values.yaml](./values.yaml) | Enable and configure postgresql database subchart under this key. If enabled, the app's db envs will be set for you. [[ref]](https://github.com/bitnami/charts/tree/main/bitnami/postgresql) | | postgresql | object | See [values.yaml](./values.yaml) | Enable and configure postgresql database subchart under this key. If enabled, the app's db envs will be set for you. [[ref]](https://github.com/bitnami/charts/tree/main/bitnami/postgresql) |
| redis | object | See [values.yaml](./values.yaml) | Enable and configure redis subchart under this key. If enabled, the app's Redis env will be set for you. [[ref]](https://github.com/bitnami/charts/tree/main/bitnami/redis) | | redis | object | See [values.yaml](./values.yaml) | Enable and configure redis subchart under this key. If enabled, the app's Redis env will be set for you. [[ref]](https://github.com/bitnami/charts/tree/main/bitnami/redis) |
| service.main | object | See [values.yaml](./values.yaml) | Configures service settings for the chart. | | service.main | object | See [values.yaml](./values.yaml) | Configures service settings for the chart. |
--- ---
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)

View File

@@ -0,0 +1,17 @@
{{- define "custom.chart.name" -}}
Paperless-ngx
{{- end -}}
{{- define "custom.custom.configuration.header" -}}
## Custom configuration
{{- end -}}
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
### Database Installation
Paperless-ngx supports PostgreSQL and MariaDB.
This chart can install PostgreSQL or MariaDB and configure Paperless-ngx automatically.
See each database section in [`values.yaml`](./values.yaml) for configuration examples.
{{- end -}}

View File

@@ -1,28 +0,0 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl
# Test files
tests/

View File

@@ -1,23 +0,0 @@
annotations:
artifacthub.io/changes: |-
- kind: fixed
description: Ingress secret name template is evaluated before deciding whether to omit it
- kind: changed
description: Updated code-server image tag to v4.13.0
- kind: changed
description: Updated netshoot image tag to v0.11
- kind: changed
description: Updated gluetun image tag to v3.34.3
apiVersion: v2
description: Function library for Helm charts
home: https://github.com/bjw-s/helm-charts/tree/main/charts/library/common
keywords:
- common
- library
kubeVersion: '>=1.22.0-0'
maintainers:
- email: me@bjw-s.dev
name: bjw-s
name: common
type: library
version: 1.5.1

View File

@@ -1,255 +0,0 @@
# common
![Version: 1.5.0](https://img.shields.io/badge/Version-1.5.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square)
Function library for Helm charts
Since a lot of the bjw-s charts follow a similar pattern, this library was built to reduce maintenance cost between the charts that use it and try achieve a goal of being DRY.
## Requirements
Kubernetes: `>=1.22.0-0`
## Dependencies
| Repository | Name | Version |
|------------|------|---------|
## Installing the Chart
This is a [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm).
**WARNING: THIS CHART IS NOT MEANT TO BE INSTALLED DIRECTLY**
## Using this library
Include this chart as a dependency in your `Chart.yaml` e.g.
```yaml
# Chart.yaml
dependencies:
- name: common
version: 1.5.0
repository: https://bjw-s.github.io/helm-charts/
```
For more information, take a look at the [Docs](http://bjw-s.github.io/helm-charts/docs/common-library/introduction/).
## Configuration
Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values.
## Custom configuration
N/A
## Values
**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common)
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| addons | object | See below | The common chart supports several add-ons. These can be configured under this key. |
| addons.codeserver | object | See values.yaml | The common library supports adding a code-server add-on to access files. It can be configured under this key. |
| addons.codeserver.args | list | `["--auth","none"]` | Set codeserver command line arguments. Consider setting --user-data-dir to a persistent location to preserve code-server setting changes |
| addons.codeserver.enabled | bool | `false` | Enable running a code-server container in the pod |
| addons.codeserver.env | object | `{}` | Set any environment variables for code-server here |
| addons.codeserver.git | object | See below | Optionally allow access a Git repository by passing in a private SSH key |
| addons.codeserver.git.deployKey | string | `""` | Raw SSH private key |
| addons.codeserver.git.deployKeyBase64 | string | `""` | Base64-encoded SSH private key. When both variables are set, the raw SSH key takes precedence. |
| addons.codeserver.git.deployKeySecret | string | `""` | Existing secret containing SSH private key The chart expects it to be present under the `id_rsa` key. |
| addons.codeserver.image.pullPolicy | string | `"IfNotPresent"` | Specify the code-server image pull policy |
| addons.codeserver.image.repository | string | `"ghcr.io/coder/code-server"` | Specify the code-server image |
| addons.codeserver.image.tag | string | `"4.12.0"` | Specify the code-server image tag |
| addons.codeserver.ingress.enabled | bool | `false` | Enable an ingress for the code-server add-on. |
| addons.codeserver.ingress.ingressClassName | string | `nil` | Set the ingressClass that is used for this ingress. |
| addons.codeserver.service.enabled | bool | `true` | Enable a service for the code-server add-on. |
| addons.codeserver.volumeMounts | list | `[]` | Specify a list of volumes that get mounted in the code-server container. At least 1 volumeMount is required! |
| addons.codeserver.workingDir | string | `""` | Specify the working dir that will be opened when code-server starts If not given, the app will default to the mountpah of the first specified volumeMount |
| addons.netshoot | object | See values.yaml | The common library supports adding a netshoot add-on to troubleshoot network issues within a Pod. It can be configured under this key. |
| addons.netshoot.enabled | bool | `false` | Enable running a netshoot container in the pod |
| addons.netshoot.env | object | `{}` | Set any environment variables for netshoot here |
| addons.netshoot.image.pullPolicy | string | `"IfNotPresent"` | Specify the netshoot image pull policy |
| addons.netshoot.image.repository | string | `"ghcr.io/nicolaka/netshoot"` | Specify the netshoot image |
| addons.netshoot.image.tag | string | `"v0.10"` | Specify the netshoot image tag |
| addons.vpn | object | See values.yaml | The common chart supports adding a VPN add-on. It can be configured under this key. |
| addons.vpn.args | list | `[]` | Override the args for the vpn sidecar container |
| addons.vpn.configFile | string | `nil` | Provide a customized vpn configuration file to be used by the VPN. |
| addons.vpn.configFileSecret | string | `nil` | Reference an existing secret that contains the VPN configuration file The chart expects it to be present under the `vpnConfigfile` key. |
| addons.vpn.enabled | bool | `false` | Enable running a VPN in the pod to route traffic through a VPN |
| addons.vpn.env | object | `{}` | All variables specified here will be added to the vpn sidecar container See the documentation of the VPN image for all config values |
| addons.vpn.gluetun | object | See below | Make sure to read the [documentation](https://github.com/qdm12/gluetun/wiki) to see how to configure this addon! |
| addons.vpn.gluetun.image.pullPolicy | string | `"IfNotPresent"` | Specify the Gluetun image pull policy |
| addons.vpn.gluetun.image.repository | string | `"docker.io/qmcgaw/gluetun"` | Specify the Gluetun image |
| addons.vpn.gluetun.image.tag | string | `"v3.33.0"` | Specify the Gluetun image tag |
| addons.vpn.livenessProbe | object | `{}` | Optionally specify a livenessProbe, e.g. to check if the connection is still being protected by the VPN |
| addons.vpn.networkPolicy.annotations | object | `{}` | Provide additional annotations which may be required. |
| addons.vpn.networkPolicy.egress | string | `nil` | The egress configuration for your network policy, All outbound traffic from the pod will be blocked unless specified here. [[ref]](https://kubernetes.io/docs/concepts/services-networking/network-policies/) [[recipes]](https://github.com/ahmetb/kubernetes-network-policy-recipes) |
| addons.vpn.networkPolicy.enabled | bool | `false` | If set to true, will deploy a network policy that blocks all outbound traffic except traffic specified as allowed |
| addons.vpn.networkPolicy.labels | object | `{}` | Provide additional labels which may be required. |
| addons.vpn.networkPolicy.podSelectorLabels | object | `{}` | Provide additional podSelector labels which may be required. |
| addons.vpn.scripts | object | See values.yaml | Provide custom up/down scripts that can be used by the vpn configuration. |
| addons.vpn.securityContext | object | See values.yaml | Set the VPN container securityContext |
| addons.vpn.type | string | `"gluetun"` | Specify the VPN type. Valid options are `gluetun`. |
| affinity | object | `{}` | Defines affinity constraint rules. [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) |
| args | list | `[]` | Override the args for the default container |
| automountServiceAccountToken | bool | `true` | Specifies whether a service account token should be automatically mounted. |
| command | list | `[]` | Override the command(s) for the default container |
| configMaps | object | See below | Configure configMaps for the chart here. Additional configMaps can be added by adding a dictionary key similar to the 'config' object. |
| configMaps.config.annotations | object | `{}` | Annotations to add to the configMap |
| configMaps.config.data | object | `{}` | configMap data content. Helm template enabled. |
| configMaps.config.enabled | bool | `false` | Enables or disables the configMap |
| configMaps.config.labels | object | `{}` | Labels to add to the configMap |
| controller.annotations | object | `{}` | Set annotations on the deployment/statefulset/daemonset/cronjob |
| controller.cronjob | object | See below | CronJob configuration. Required only when using `controller.type: cronjob`. |
| controller.cronjob.backoffLimit | int | `6` | Limits the number of times a failed job will be retried |
| controller.cronjob.concurrencyPolicy | string | `"Forbid"` | Specifies how to treat concurrent executions of a job that is created by this cron job valid values are Allow, Forbid or Replace |
| controller.cronjob.failedJobsHistory | int | `1` | The number of failed Jobs to keep |
| controller.cronjob.schedule | string | `"*/20 * * * *"` | Sets the CronJob time when to execute your jobs |
| controller.cronjob.startingDeadlineSeconds | int | `30` | The deadline in seconds for starting the job if it misses its scheduled time for any reason |
| controller.cronjob.successfulJobsHistory | int | `1` | The number of succesful Jobs to keep |
| controller.cronjob.ttlSecondsAfterFinished | string | `nil` | If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. |
| controller.enabled | bool | `true` | enable the controller. |
| controller.labels | object | `{}` | Set labels on the deployment/statefulset/daemonset/cronjob |
| controller.podManagementPolicy | string | `nil` | Set statefulset podManagementPolicy, valid values are Parallel and OrderedReady (default). |
| controller.replicas | int | `1` | Number of desired pods. When using a HorizontalPodAutoscaler, set this to `null`. |
| controller.restartPolicy | string | `Always`. When `controller.type` is `cronjob` it defaults to `Never`. | Set Container restart policy. |
| controller.revisionHistoryLimit | int | `3` | ReplicaSet revision history limit |
| controller.rollingUpdate.partition | string | `nil` | Set statefulset RollingUpdate partition |
| controller.rollingUpdate.surge | string | `nil` | Set deployment RollingUpdate max surge |
| controller.rollingUpdate.unavailable | string | `nil` | Set deployment RollingUpdate max unavailable |
| controller.strategy | string | `nil` | Set the controller upgrade strategy For Deployments, valid values are Recreate (default) and RollingUpdate. For StatefulSets, valid values are OnDelete and RollingUpdate (default). DaemonSets/CronJobs ignore this. |
| controller.type | string | `"deployment"` | Set the controller type. Valid options are deployment, daemonset, statefulset or cronjob |
| dnsConfig | object | `{}` | Configuring the ndots option may resolve nslookup issues on some Kubernetes setups. |
| dnsPolicy | string | `nil` | Defaults to "ClusterFirst" if hostNetwork is false and "ClusterFirstWithHostNet" if hostNetwork is true. |
| enableServiceLinks | bool | `true` | Enable/disable the generation of environment variables for services. [[ref]](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service) |
| env | string | `nil` | Main environment variables. Template enabled. Syntax options: A) TZ: UTC B) PASSWD: '{{ .Release.Name }}' C) PASSWD: configMapKeyRef: name: config-map-name key: key-name D) PASSWD: valueFrom: secretKeyRef: name: secret-name key: key-name ... E) - name: TZ value: UTC F) - name: TZ value: '{{ .Release.Name }}' |
| envFrom | list | `[]` | Secrets and/or ConfigMaps that will be loaded as environment variables. [[ref]](https://unofficial-kubernetes.readthedocs.io/en/latest/tasks/configure-pod-container/configmap/#use-case-consume-configmap-in-environment-variables) |
| global.annotations | object | `{}` | Set additional global annotations. Helm templates can be used. |
| global.fullnameOverride | string | `nil` | Set the entire name definition |
| global.labels | object | `{}` | Set additional global labels. Helm templates can be used. |
| global.nameOverride | string | `nil` | Set an override for the prefix of the fullname |
| hostAliases | list | `[]` | Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames. [[ref]](https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/) |
| hostIPC | bool | `false` | Use the host's ipc namespace |
| hostNetwork | bool | `false` | When using hostNetwork make sure you set dnsPolicy to `ClusterFirstWithHostNet` |
| hostPID | bool | `false` | Use the host's pid namespace |
| hostname | string | `nil` | Allows specifying explicit hostname setting |
| image.pullPolicy | string | `nil` | image pull policy |
| image.repository | string | `nil` | image repository |
| image.tag | string | `nil` | image tag |
| imagePullSecrets | list | `[]` | Set image pull secrets |
| ingress | object | See below | Configure the ingresses for the chart here. Additional ingresses can be added by adding a dictionary key similar to the 'main' ingress. |
| ingress.main.annotations | object | `{}` | Provide additional annotations which may be required. |
| ingress.main.enabled | bool | `false` | Enables or disables the ingress |
| ingress.main.hosts[0].host | string | `"chart-example.local"` | Host address. Helm template can be passed. |
| ingress.main.hosts[0].paths[0].path | string | `"/"` | Path. Helm template can be passed. |
| ingress.main.hosts[0].paths[0].service.name | string | `nil` | Overrides the service name reference for this path |
| ingress.main.hosts[0].paths[0].service.port | string | `nil` | Overrides the service port reference for this path |
| ingress.main.ingressClassName | string | `nil` | Set the ingressClass that is used for this ingress. |
| ingress.main.labels | object | `{}` | Provide additional labels which may be required. |
| ingress.main.nameOverride | string | `nil` | Override the name suffix that is used for this ingress. |
| ingress.main.primary | bool | `true` | Make this the primary ingress (used in probes, notes, etc...). If there is more than 1 ingress, make sure that only 1 ingress is marked as primary. |
| ingress.main.tls | list | `[]` | Configure TLS for the ingress. Both secretName and hosts can process a Helm template. |
| initContainers | object | `{}` | Specify any initContainers here as dictionary items. Each initContainer should have its own key. The dictionary item key will determine the order. Helm templates can be used. |
| lifecycle | object | `{}` | Configure the lifecycle for the main container |
| nodeSelector | object | `{}` | Node selection constraint [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) |
| persistence | object | See below | Configure persistence for the chart here. Additional items can be added by adding a dictionary key similar to the 'config' key. [[ref]](https://bjw-s.github.io/helm-charts/docs/common-library/common-library-storage) |
| persistence.config | object | See below | Default persistence for configuration files. |
| persistence.config.accessMode | string | `"ReadWriteOnce"` | AccessMode for the persistent volume. Make sure to select an access mode that is supported by your storage provider! [[ref]](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) |
| persistence.config.enabled | bool | `false` | Enables or disables the persistence item |
| persistence.config.existingClaim | string | `nil` | If you want to reuse an existing claim, the name of the existing PVC can be passed here. |
| persistence.config.mountPath | string | `nil` | Where to mount the volume in the main container. Defaults to `/<name_of_the_volume>`, setting to '-' creates the volume but disables the volumeMount. |
| persistence.config.nameOverride | string | `nil` | Override the name suffix that is used for this volume. |
| persistence.config.readOnly | bool | `false` | Specify if the volume should be mounted read-only. |
| persistence.config.retain | bool | `false` | Set to true to retain the PVC upon `helm uninstall` |
| persistence.config.size | string | `"1Gi"` | The amount of storage that is requested for the persistent volume. |
| persistence.config.storageClass | string | `nil` | Storage Class for the config volume. If set to `-`, dynamic provisioning is disabled. If set to something else, the given storageClass is used. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. |
| persistence.config.subPath | string | `nil` | Used in conjunction with `existingClaim`. Specifies a sub-path inside the referenced volume instead of its root |
| persistence.config.type | string | `"pvc"` | Sets the persistence type Valid options are pvc, emptyDir, hostPath, secret, configMap or custom |
| persistence.shared | object | See below | Create an emptyDir volume to share between all containers [[ref]]https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) |
| persistence.shared.medium | string | `nil` | Set the medium to "Memory" to mount a tmpfs (RAM-backed filesystem) instead of the storage medium that backs the node. |
| persistence.shared.sizeLimit | string | `nil` | If the `SizeMemoryBackedVolumes` feature gate is enabled, you can specify a size for memory backed volumes. |
| podAnnotations | object | `{}` | Set annotations on the pod |
| podLabels | object | `{}` | Set labels on the pod |
| podSecurityContext | object | `{}` | Configure the Security Context for the Pod |
| priorityClassName | string | `nil` | Custom priority class for different treatment by the scheduler |
| probes | object | See below | [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) |
| probes.liveness | object | See below | Liveness probe configuration |
| probes.liveness.custom | bool | `false` | Set this to `true` if you wish to specify your own livenessProbe |
| probes.liveness.enabled | bool | `true` | Enable the liveness probe |
| probes.liveness.spec | object | See below | The spec field contains the values for the default livenessProbe. If you selected `custom: true`, this field holds the definition of the livenessProbe. |
| probes.liveness.type | string | "TCP" | sets the probe type when not using a custom probe |
| probes.readiness | object | See below | Redainess probe configuration |
| probes.readiness.custom | bool | `false` | Set this to `true` if you wish to specify your own readinessProbe |
| probes.readiness.enabled | bool | `true` | Enable the readiness probe |
| probes.readiness.spec | object | See below | The spec field contains the values for the default readinessProbe. If you selected `custom: true`, this field holds the definition of the readinessProbe. |
| probes.readiness.type | string | "TCP" | sets the probe type when not using a custom probe |
| probes.startup | object | See below | Startup probe configuration |
| probes.startup.custom | bool | `false` | Set this to `true` if you wish to specify your own startupProbe |
| probes.startup.enabled | bool | `true` | Enable the startup probe |
| probes.startup.spec | object | See below | The spec field contains the values for the default startupProbe. If you selected `custom: true`, this field holds the definition of the startupProbe. |
| probes.startup.type | string | "TCP" | sets the probe type when not using a custom probe |
| resources | object | `{}` | Set the resource requests / limits for the main container. |
| route | object | See below | Configure the gateway routes for the chart here. Additional routes can be added by adding a dictionary key similar to the 'main' route. [[ref]](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io%2fv1alpha2) |
| route.main.annotations | object | `{}` | Provide additional annotations which may be required. |
| route.main.enabled | bool | `false` | Enables or disables the route |
| route.main.hostnames | list | `[]` | Host addresses |
| route.main.kind | string | `"HTTPRoute"` | Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute |
| route.main.labels | object | `{}` | Provide additional labels which may be required. |
| route.main.nameOverride | string | `nil` | Override the name suffix that is used for this route. |
| route.main.parentRefs | list | `[{"group":"gateway.networking.k8s.io","kind":"Gateway","name":null,"namespace":null,"sectionName":null}]` | Configure the resource the route attaches to. |
| route.main.rules | list | `[{"backendRefs":[{"group":"","kind":"Service","name":null,"namespace":null,"port":null,"weight":1}],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]` | Configure rules for routing. Defaults to the primary service. |
| route.main.rules[0].backendRefs | list | `[{"group":"","kind":"Service","name":null,"namespace":null,"port":null,"weight":1}]` | Configure backends where matching requests should be sent. |
| runtimeClassName | string | `nil` | Allow specifying a runtimeClassName other than the default one (ie: nvidia) |
| schedulerName | string | `nil` | Allows specifying a custom scheduler name |
| secrets | object | See below | Use this to populate secrets with the values you specify. Be aware that these values are not encrypted by default, and could therefore visible to anybody with access to the values.yaml file. Additional Secrets can be added by adding a dictionary key similar to the 'secret' object. |
| secrets.secret.annotations | object | `{}` | Annotations to add to the Secret |
| secrets.secret.enabled | bool | `false` | Enables or disables the Secret |
| secrets.secret.labels | object | `{}` | Labels to add to the Secret |
| secrets.secret.stringData | object | `{}` | Secret stringData content. Helm template enabled. |
| securityContext | object | `{}` | Configure the Security Context for the main container |
| service | object | See below | Configure the services for the chart here. Additional services can be added by adding a dictionary key similar to the 'main' service. |
| service.main.annotations | object | `{}` | Provide additional annotations which may be required. |
| service.main.enabled | bool | `true` | Enables or disables the service |
| service.main.externalTrafficPolicy | string | `nil` | [[ref](https://kubernetes.io/docs/tutorials/services/source-ip/)] |
| service.main.ipFamilies | list | `[]` | The ip families that should be used. Options: IPv4, IPv6 |
| service.main.ipFamilyPolicy | string | `nil` | Specify the ip policy. Options: SingleStack, PreferDualStack, RequireDualStack |
| service.main.labels | object | `{}` | Provide additional labels which may be required. |
| service.main.nameOverride | string | `nil` | Override the name suffix that is used for this service |
| service.main.ports | object | See below | Configure the Service port information here. Additional ports can be added by adding a dictionary key similar to the 'http' service. |
| service.main.ports.http.enabled | bool | `true` | Enables or disables the port |
| service.main.ports.http.extraSelectorLabels | object | `{}` | Allow adding additional match labels |
| service.main.ports.http.nodePort | string | `nil` | Specify the nodePort value for the LoadBalancer and NodePort service types. [[ref]](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) |
| service.main.ports.http.port | string | `nil` | The port number |
| service.main.ports.http.primary | bool | `true` | Make this the primary port (used in probes, notes, etc...) If there is more than 1 service, make sure that only 1 port is marked as primary. |
| service.main.ports.http.protocol | string | `"HTTP"` | Port protocol. Support values are `HTTP`, `HTTPS`, `TCP` and `UDP`. HTTPS and HTTPS spawn a TCP service and get used for internal URL and name generation |
| service.main.ports.http.targetPort | string | `nil` | Specify a service targetPort if you wish to differ the service port from the application port. If `targetPort` is specified, this port number is used in the container definition instead of the `port` value. Therefore named ports are not supported for this field. |
| service.main.primary | bool | `true` | Make this the primary service (used in probes, notes, etc...). If there is more than 1 service, make sure that only 1 service is marked as primary. |
| service.main.type | string | `"ClusterIP"` | Set the service type |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `false` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| serviceMonitor | object | See below | Configure the ServiceMonitors for the chart here. Additional ServiceMonitors can be added by adding a dictionary key similar to the 'main' ServiceMonitors. |
| serviceMonitor.main.annotations | object | `{}` | Provide additional annotations which may be required. |
| serviceMonitor.main.enabled | bool | `false` | Enables or disables the serviceMonitor. |
| serviceMonitor.main.endpoints | list | See values.yaml | Configures the endpoints for the serviceMonitor. |
| serviceMonitor.main.labels | object | `{}` | Provide additional labels which may be required. |
| serviceMonitor.main.nameOverride | string | `nil` | Override the name suffix that is used for this serviceMonitor. |
| serviceMonitor.main.selector | object | `{}` | Configures a custom selector for the serviceMonitor, this takes precedence over specifying a service name. Helm templates can be used. |
| serviceMonitor.main.serviceName | string | `"{{ include \"bjw-s.common.lib.chart.names.fullname\" $ }}"` | Configures the target Service for the serviceMonitor. Helm templates can be used. |
| sidecars | object | `{}` | Specify any sidecar containers here as dictionary items. Each sidecar container should have its own key. The dictionary item key will determine the order. Helm templates can be used. |
| termination.gracePeriodSeconds | string | `nil` | [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle)] |
| termination.messagePath | string | `nil` | [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle-1)] |
| termination.messagePolicy | string | `nil` | [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle-1)] |
| tolerations | list | `[]` | Specify taint tolerations [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) |
| topologySpreadConstraints | list | `[]` | Defines topologySpreadConstraint rules. [[ref]](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) |
| volumeClaimTemplates | list | `[]` | Used in conjunction with `controller.type: statefulset` to create individual disks for each instance. |
## Support
- See the [Docs](http://bjw-s.github.io/helm-charts/docs/)
- Open an [issue](https://github.com/bjw-s/helm-charts/issues/new/choose)
- Join the k8s-at-home [Discord](https://discord.gg/sTMX7Vh) community
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)

View File

@@ -1,46 +0,0 @@
{{/*
Template to render code-server addon
It will include / inject the required templates based on the given values.
*/}}
{{- define "bjw-s.common.addon.codeserver" -}}
{{- if .Values.addons.codeserver.enabled -}}
{{/* Append the code-server container to the sidecars */}}
{{- $container := include "bjw-s.common.addon.codeserver.container" . | fromYaml -}}
{{- if $container -}}
{{- $_ := set .Values.sidecars "addon-codeserver" $container -}}
{{- end -}}
{{/* Include the deployKeySecret if not empty */}}
{{- if or .Values.addons.codeserver.git.deployKey .Values.addons.codeserver.git.deployKeyBase64 -}}
{{- $deployKeySecret := include "bjw-s.common.addon.codeserver.deployKeySecret" . -}}
{{- if $deployKeySecret -}}
{{- $_ := set .Values.secrets "addon-codeserver-deploykey" (dict "enabled" true "stringData" ($deployKeySecret | fromYaml)) -}}
{{- end -}}
{{- end -}}
{{/* Append the secret volume to the volumes */}}
{{- if or .Values.addons.codeserver.git.deployKey .Values.addons.codeserver.git.deployKeyBase64 .Values.addons.codeserver.git.deployKeySecret }}
{{- $volume := include "bjw-s.common.addon.codeserver.deployKeyVolumeSpec" . | fromYaml -}}
{{- if $volume -}}
{{- $_ := set .Values.persistence "deploykey" (dict "enabled" true "mountPath" "-" "type" "custom" "volumeSpec" $volume) -}}
{{- end -}}
{{- end -}}
{{/* Add the code-server service */}}
{{- if .Values.addons.codeserver.service.enabled -}}
{{- $serviceValues := .Values.addons.codeserver.service -}}
{{- $_ := set $serviceValues "nameOverride" "addon-codeserver" -}}
{{- $_ := set $ "ObjectValues" (dict "service" $serviceValues) -}}
{{- include "bjw-s.common.class.service" $ -}}
{{- $_ := unset $.ObjectValues "service" -}}
{{- end -}}
{{/* Add the code-server ingress */}}
{{- $svcName := printf "%v-addon-codeserver" (include "bjw-s.common.lib.chart.names.fullname" .) -}}
{{- $svcPort := .Values.addons.codeserver.service.ports.codeserver.port -}}
{{- range $_, $host := .Values.addons.codeserver.ingress.hosts -}}
{{- $_ := set (index $host.paths 0) "service" (dict "name" $svcName "port" $svcPort) -}}
{{- end -}}
{{- $_ := set .Values.ingress "addon-codeserver" .Values.addons.codeserver.ingress -}}
{{- end -}}
{{- end -}}

View File

@@ -1,46 +0,0 @@
{{/*
The code-server sidecar container to be inserted.
*/}}
{{- define "bjw-s.common.addon.codeserver.container" -}}
{{- if lt (len .Values.addons.codeserver.volumeMounts) 1 }}
{{- fail "At least 1 volumeMount is required for codeserver container" }}
{{- end -}}
name: codeserver
image: "{{ .Values.addons.codeserver.image.repository }}:{{ .Values.addons.codeserver.image.tag }}"
imagePullPolicy: {{ .Values.addons.codeserver.pullPolicy }}
{{- with .Values.addons.codeserver.securityContext }}
securityContext:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.addons.codeserver.env }}
env:
{{- range $k, $v := . }}
- name: {{ $k }}
value: {{ $v | quote }}
{{- end }}
{{- end }}
ports:
- name: codeserver
containerPort: {{ .Values.addons.codeserver.service.ports.codeserver.port }}
protocol: TCP
args:
{{- range .Values.addons.codeserver.args }}
- {{ . | quote }}
{{- end }}
- "--port"
- "{{ .Values.addons.codeserver.service.ports.codeserver.port }}"
- {{ .Values.addons.codeserver.workingDir | default (first .Values.addons.codeserver.volumeMounts).mountPath }}
volumeMounts:
{{- with .Values.addons.codeserver.volumeMounts }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- if or .Values.addons.codeserver.git.deployKey .Values.addons.codeserver.git.deployKeyBase64 .Values.addons.codeserver.git.deployKeySecret }}
- name: deploykey
mountPath: /root/.ssh/id_rsa
subPath: id_rsa
{{- end }}
{{- with .Values.addons.codeserver.resources }}
resources:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end -}}

View File

@@ -1,10 +0,0 @@
{{/*
The deployKey secret to be included.
*/}}
{{- define "bjw-s.common.addon.codeserver.deployKeySecret" -}}
{{- $deployKeyValue := .Values.addons.codeserver.git.deployKey -}}
{{- if .Values.addons.codeserver.git.deployKeyBase64 -}}
{{- $deployKeyValue = .Values.addons.codeserver.git.deployKeyBase64 | b64dec -}}
{{- end -}}
id_rsa: {{ $deployKeyValue | quote }}
{{- end -}}

View File

@@ -1,15 +0,0 @@
{{/*
The volume (referencing git deploykey) to be inserted into additionalVolumes.
*/}}
{{- define "bjw-s.common.addon.codeserver.deployKeyVolumeSpec" -}}
secret:
{{- if .Values.addons.codeserver.git.deployKeySecret }}
secretName: {{ .Values.addons.codeserver.git.deployKeySecret }}
{{- else }}
secretName: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-addon-codeserver-deploykey
{{- end }}
defaultMode: {{ "0400" | toDecimal }}
items:
- key: id_rsa
path: id_rsa
{{- end -}}

View File

@@ -1,13 +0,0 @@
{{/*
Template to render netshoot addon
It will include / inject the required templates based on the given values.
*/}}
{{- define "bjw-s.common.addon.netshoot" -}}
{{- if .Values.addons.netshoot.enabled -}}
{{/* Append the netshoot container to the sidecars */}}
{{- $container := include "bjw-s.common.addon.netshoot.container" . | fromYaml -}}
{{- if $container -}}
{{- $_ := set .Values.sidecars "addon-netshoot" $container -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -1,27 +0,0 @@
{{/*
The netshoot sidecar container to be inserted.
*/}}
{{- define "bjw-s.common.addon.netshoot.container" -}}
name: netshoot
image: "{{ .Values.addons.netshoot.image.repository }}:{{ .Values.addons.netshoot.image.tag }}"
imagePullPolicy: {{ .Values.addons.netshoot.pullPolicy }}
{{- with .Values.addons.netshoot.securityContext }}
securityContext:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.addons.netshoot.env }}
env:
{{- range $k, $v := . }}
- name: {{ $k }}
value: {{ $v | quote }}
{{- end }}
{{- end }}
command:
- /bin/sh
- -c
- sleep infinity
{{- with .Values.addons.netshoot.resources }}
resources:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end -}}

View File

@@ -1,45 +0,0 @@
{{/*
Template to render VPN addon
It will include / inject the required templates based on the given values.
*/}}
{{- define "bjw-s.common.addon.vpn" -}}
{{- if .Values.addons.vpn.enabled -}}
{{- if eq "gluetun" .Values.addons.vpn.type -}}
{{- include "bjw-s.common.addon.gluetun" . }}
{{- end -}}
{{/* Include the configmap if not empty */}}
{{- if or .Values.addons.vpn.scripts.up .Values.addons.vpn.scripts.down }}
{{- $configmap := include "bjw-s.common.addon.vpn.configmap" . -}}
{{- if $configmap -}}
{{- $_ := set .Values.configMaps "addon-vpn" (dict "enabled" true "data" ($configmap | fromYaml)) -}}
{{- end -}}
{{- end -}}
{{/* Include the secret if not empty */}}
{{- if and .Values.addons.vpn.configFile (not .Values.addons.vpn.configFileSecret) }}
{{- $secret := include "bjw-s.common.addon.vpn.secret" . -}}
{{- if $secret -}}
{{- $_ := set .Values.secrets "addon-vpn-config" (dict "enabled" true "stringData" ($secret | fromYaml)) -}}
{{- end -}}
{{- end -}}
{{/* Append the vpn scripts volume to the volumes */}}
{{- $scriptVolume := include "bjw-s.common.addon.vpn.scriptsVolumeSpec" . | fromYaml -}}
{{- if $scriptVolume -}}
{{- $_ := set .Values.persistence "vpnscript" (dict "enabled" true "mountPath" "-" "type" "custom" "volumeSpec" $scriptVolume) -}}
{{- end -}}
{{/* Append the vpn config volume to the volumes */}}
{{- $configVolume := include "bjw-s.common.addon.vpn.configVolumeSpec" . | fromYaml }}
{{ if $configVolume -}}
{{- $_ := set .Values.persistence "vpnconfig" (dict "enabled" true "mountPath" "-" "type" "custom" "volumeSpec" $configVolume) -}}
{{- end -}}
{{/* Include the networkpolicy if not empty */}}
{{- $networkpolicy := include "bjw-s.common.addon.vpn.networkpolicy" . -}}
{{- if $networkpolicy -}}
{{- $networkpolicy | nindent 0 -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -1,14 +0,0 @@
{{/*
The VPN config and scripts to be included.
*/}}
{{- define "bjw-s.common.addon.vpn.configmap" -}}
{{- with .Values.addons.vpn.scripts.up }}
up.sh: |-
{{- . | nindent 2}}
{{- end }}
{{- with .Values.addons.vpn.scripts.down }}
down.sh: |-
{{- . | nindent 2}}
{{- end -}}
{{- end -}}

View File

@@ -1,29 +0,0 @@
{{/*
Blueprint for the NetworkPolicy object that can be included in the addon.
*/}}
{{- define "bjw-s.common.addon.vpn.networkpolicy" -}}
{{- if .Values.addons.vpn.networkPolicy.enabled }}
---
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
{{- with (merge (.Values.addons.vpn.networkPolicy.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (merge (.Values.addons.vpn.networkPolicy.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
podSelector:
{{- with (merge .Values.addons.vpn.networkPolicy.podSelectorLabels (include "bjw-s.common.lib.metadata.selectorLabels" . | fromYaml)) }}
matchLabels: {{- toYaml . | nindent 6 }}
{{- end }}
policyTypes:
- Egress
egress:
{{- with .Values.addons.vpn.networkPolicy.egress }}
{{- . | toYaml | nindent 4 }}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -1,9 +0,0 @@
{{/*
The OpenVPN config secret to be included.
*/}}
{{- define "bjw-s.common.addon.vpn.secret" -}}
{{- if and .Values.addons.vpn.configFile (not .Values.addons.vpn.configFileSecret) -}}
vpnConfigfile: |-
{{- .Values.addons.vpn.configFile | nindent 2 }}
{{- end -}}
{{- end -}}

View File

@@ -1,37 +0,0 @@
{{/*
The volume (referencing VPN scripts) to be inserted into additionalVolumes.
*/}}
{{- define "bjw-s.common.addon.vpn.scriptsVolumeSpec" -}}
{{- if or .Values.addons.vpn.scripts.up .Values.addons.vpn.scripts.down -}}
configMap:
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-addon-vpn
items:
{{- if .Values.addons.vpn.scripts.up }}
- key: up.sh
path: up.sh
mode: 0777
{{- end }}
{{- if .Values.addons.vpn.scripts.down }}
- key: down.sh
path: down.sh
mode: 0777
{{- end }}
{{- end -}}
{{- end -}}
{{/*
The volume (referencing VPN config) to be inserted into additionalVolumes.
*/}}
{{- define "bjw-s.common.addon.vpn.configVolumeSpec" -}}
{{- if or .Values.addons.vpn.configFile .Values.addons.vpn.configFileSecret -}}
secret:
{{- if .Values.addons.vpn.configFileSecret }}
secretName: {{ .Values.addons.vpn.configFileSecret }}
{{- else }}
secretName: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-addon-vpn-config
{{- end }}
items:
- key: vpnConfigfile
path: vpnConfigfile
{{- end -}}
{{- end -}}

View File

@@ -1,11 +0,0 @@
{{/*
Template to render gluetun addon. It will add the container to the list of additionalContainers.
*/}}
*/}}
{{- define "bjw-s.common.addon.gluetun" -}}
{{/* Append the gluetun container to the sidecars */}}
{{- $container := fromYaml (include "bjw-s.common.addon.gluetun.container" .) -}}
{{- if $container -}}
{{- $_ := set .Values.sidecars "addon-gluetun" $container -}}
{{- end -}}
{{- end -}}

View File

@@ -1,57 +0,0 @@
{{/*
The gluetun sidecar container to be inserted.
*/}}
{{- define "bjw-s.common.addon.gluetun.container" -}}
name: gluetun
image: "{{ .Values.addons.vpn.gluetun.image.repository }}:{{ .Values.addons.vpn.gluetun.image.tag }}"
imagePullPolicy: {{ .Values.addons.vpn.gluetun.pullPolicy }}
{{- with .Values.addons.vpn.securityContext }}
securityContext:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.addons.vpn.env }}
env:
{{- . | toYaml | nindent 2 }}
{{- end }}
{{- with .Values.addons.vpn.envFrom }}
envFrom:
{{- . | toYaml | nindent 2 }}
{{- end }}
{{- with .Values.addons.vpn.args }}
args:
{{- . | toYaml | nindent 2 }}
{{- end }}
{{- if or .Values.addons.vpn.configFile .Values.addons.vpn.configFileSecret .Values.addons.vpn.scripts.up .Values.addons.vpn.scripts.down .Values.addons.vpn.additionalVolumeMounts .Values.persistence.shared.enabled }}
volumeMounts:
{{- if or .Values.addons.vpn.configFile .Values.addons.vpn.configFileSecret }}
- name: vpnconfig
mountPath: /gluetun/config.conf
subPath: vpnConfigfile
{{- end }}
{{- if .Values.addons.vpn.scripts.up }}
- name: vpnscript
mountPath: /gluetun/scripts/up.sh
subPath: up.sh
{{- end }}
{{- if .Values.addons.vpn.scripts.down }}
- name: vpnscript
mountPath: /gluetun/scripts/down.sh
subPath: down.sh
{{- end }}
{{- if .Values.persistence.shared.enabled }}
- mountPath: {{ .Values.persistence.shared.mountPath }}
name: shared
{{- end }}
{{- with .Values.addons.vpn.additionalVolumeMounts }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- with .Values.addons.vpn.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 2 }}
{{- end -}}
{{- with .Values.addons.vpn.resources }}
resources:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end -}}

View File

@@ -1,34 +0,0 @@
{{/*
This template serves as a blueprint for all configMap objects that are created
within the common library.
*/}}
{{- define "bjw-s.common.class.configmap" -}}
{{- $fullName := include "bjw-s.common.lib.chart.names.fullname" . -}}
{{- $configMapName := $fullName -}}
{{- $values := .Values.configmap -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.configmap -}}
{{- $values = . -}}
{{- end -}}
{{ end -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- $configMapName = printf "%v-%v" $configMapName $values.nameOverride -}}
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ $configMapName }}
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
data:
{{- with $values.data }}
{{- tpl (toYaml .) $ | nindent 2 }}
{{- end }}
{{- end -}}

View File

@@ -1,47 +0,0 @@
{{/*
This template serves as a blueprint for Cronjob objects that are created
using the common library.
*/}}
{{- define "bjw-s.common.class.cronjob" -}}
{{- $restartPolicy := default "Never" .Values.controller.restartPolicy -}}
{{- if and (ne $restartPolicy "Never") (ne $restartPolicy "OnFailure") -}}
{{- fail (printf "Not a valid restartPolicy for CronJob (%s)" $restartPolicy) -}}
{{- end -}}
{{- $_ := set .Values.controller "restartPolicy" $restartPolicy -}}
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
{{- with include "bjw-s.common.lib.controller.metadata.labels" . }}
labels: {{- . | nindent 4 }}
{{- end }}
{{- with include "bjw-s.common.lib.controller.metadata.annotations" . }}
annotations: {{- . | nindent 4 }}
{{- end }}
spec:
concurrencyPolicy: "{{ .Values.controller.cronjob.concurrencyPolicy }}"
startingDeadlineSeconds: {{ .Values.controller.cronjob.startingDeadlineSeconds }}
schedule: "{{ .Values.controller.cronjob.schedule }}"
successfulJobsHistoryLimit: {{ .Values.controller.cronjob.successfulJobsHistory }}
failedJobsHistoryLimit: {{ .Values.controller.cronjob.failedJobsHistory }}
jobTemplate:
spec:
{{- with .Values.controller.cronjob.ttlSecondsAfterFinished }}
ttlSecondsAfterFinished: {{ . }}
{{- end }}
backoffLimit: {{ .Values.controller.cronjob.backoffLimit }}
template:
metadata:
{{- with include ("bjw-s.common.lib.metadata.podAnnotations") . }}
annotations:
{{- . | nindent 12 }}
{{- end }}
labels:
{{- include "bjw-s.common.lib.metadata.selectorLabels" . | nindent 12 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 12 }}
{{- end }}
spec:
{{- include "bjw-s.common.lib.controller.pod" . | nindent 10 }}
{{- end -}}

View File

@@ -1,35 +0,0 @@
{{/*
This template serves as the blueprint for the DaemonSet objects that are created
within the common library.
*/}}
{{- define "bjw-s.common.class.daemonset" -}}
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
{{- with include "bjw-s.common.lib.controller.metadata.labels" . }}
labels: {{- . | nindent 4 }}
{{- end }}
{{- with include "bjw-s.common.lib.controller.metadata.annotations" . }}
annotations: {{- . | nindent 4 }}
{{- end }}
spec:
revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "bjw-s.common.lib.metadata.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with include ("bjw-s.common.lib.metadata.podAnnotations") . }}
annotations:
{{- . | nindent 8 }}
{{- end }}
labels:
{{- include "bjw-s.common.lib.metadata.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- include "bjw-s.common.lib.controller.pod" . | nindent 6 }}
{{- end }}

View File

@@ -1,55 +0,0 @@
{{/*
This template serves as a blueprint for Deployment objects that are created
using the common library.
*/}}
{{- define "bjw-s.common.class.deployment" -}}
{{- $strategy := default "Recreate" .Values.controller.strategy -}}
{{- if and (ne $strategy "Recreate") (ne $strategy "RollingUpdate") -}}
{{- fail (printf "Not a valid strategy type for Deployment (%s)" $strategy) -}}
{{- end -}}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
{{- with include "bjw-s.common.lib.controller.metadata.labels" . }}
labels: {{- . | nindent 4 }}
{{- end }}
{{- with include "bjw-s.common.lib.controller.metadata.annotations" . }}
annotations: {{- . | nindent 4 }}
{{- end }}
spec:
revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit }}
{{- if not (eq .Values.controller.replicas nil) }}
replicas: {{ .Values.controller.replicas }}
{{- end }}
strategy:
type: {{ $strategy }}
{{- with .Values.controller.rollingUpdate }}
{{- if and (eq $strategy "RollingUpdate") (or .surge .unavailable) }}
rollingUpdate:
{{- with .unavailable }}
maxUnavailable: {{ . }}
{{- end }}
{{- with .surge }}
maxSurge: {{ . }}
{{- end }}
{{- end }}
{{- end }}
selector:
matchLabels:
{{- include "bjw-s.common.lib.metadata.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with include ("bjw-s.common.lib.metadata.podAnnotations") . }}
annotations:
{{- . | nindent 8 }}
{{- end }}
labels:
{{- include "bjw-s.common.lib.metadata.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- include "bjw-s.common.lib.controller.pod" . | nindent 6 }}
{{- end -}}

View File

@@ -1,75 +0,0 @@
{{/*
This template serves as a blueprint for all Ingress objects that are created
within the common library.
*/}}
{{- define "bjw-s.common.class.ingress" -}}
{{- $fullName := include "bjw-s.common.lib.chart.names.fullname" . -}}
{{- $ingressName := $fullName -}}
{{- $values := .Values.ingress -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.ingress -}}
{{- $values = . -}}
{{- end -}}
{{ end -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- $ingressName = printf "%v-%v" $ingressName $values.nameOverride -}}
{{- end -}}
{{- $primaryService := get .Values.service (include "bjw-s.common.lib.service.primary" .) -}}
{{- $defaultServiceName := $fullName -}}
{{- if and (hasKey $primaryService "nameOverride") $primaryService.nameOverride -}}
{{- $defaultServiceName = printf "%v-%v" $defaultServiceName $primaryService.nameOverride -}}
{{- end -}}
{{- $defaultServicePort := get $primaryService.ports (include "bjw-s.common.lib.service.primaryPort" (dict "values" $primaryService)) -}}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $ingressName }}
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if $values.ingressClassName }}
ingressClassName: {{ $values.ingressClassName }}
{{- end }}
{{- if $values.tls }}
tls:
{{- range $values.tls }}
- hosts:
{{- range .hosts }}
- {{ tpl . $ | quote }}
{{- end }}
{{- $secretName := tpl (default "" .secretName) $ }}
{{- if $secretName }}
secretName: {{ $secretName | quote}}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range $values.hosts }}
- host: {{ tpl .host $ | quote }}
http:
paths:
{{- range .paths }}
{{- $service := $defaultServiceName -}}
{{- $port := $defaultServicePort.port -}}
{{- if .service -}}
{{- $service = default $service .service.name -}}
{{- $port = default $port .service.port -}}
{{- end }}
- path: {{ tpl .path $ | quote }}
pathType: {{ default "Prefix" .pathType }}
backend:
service:
name: {{ $service }}
port:
number: {{ $port }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,45 +0,0 @@
{{/*
This template serves as a blueprint for all PersistentVolumeClaim objects that are created
within the common library.
*/}}
{{- define "bjw-s.common.class.pvc" -}}
{{- $values := .Values.persistence -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.persistence -}}
{{- $values = . -}}
{{- end -}}
{{ end -}}
{{- $pvcName := include "bjw-s.common.lib.chart.names.fullname" . -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- if not (eq $values.nameOverride "-") -}}
{{- $pvcName = printf "%v-%v" $pvcName $values.nameOverride -}}
{{ end -}}
{{ end }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ $pvcName }}
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- if $values.retain }}
"helm.sh/resource-policy": keep
{{- end }}
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
- {{ required (printf "accessMode is required for PVC %v" $pvcName) $values.accessMode | quote }}
resources:
requests:
storage: {{ required (printf "size is required for PVC %v" $pvcName) $values.size | quote }}
{{- if $values.storageClass }}
storageClassName: {{ if (eq "-" $values.storageClass) }}""{{- else }}{{ $values.storageClass | quote }}{{- end }}
{{- end }}
{{- if $values.volumeName }}
volumeName: {{ $values.volumeName | quote }}
{{- end }}
{{- end -}}

View File

@@ -1,73 +0,0 @@
{{/*
This template serves as a blueprint for all Route objects that are created
within the common library.
*/}}
{{- define "bjw-s.common.class.route" -}}
{{- $values := .Values.route -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.route -}}
{{- $values = . -}}
{{- end -}}
{{ end -}}
{{- $fullName := include "bjw-s.common.lib.chart.names.fullname" . -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- $fullName = printf "%v-%v" $fullName $values.nameOverride -}}
{{ end -}}
{{- $routeKind := $values.kind | default "HTTPRoute" -}}
{{- $primaryService := get .Values.service (include "bjw-s.common.lib.service.primary" .) -}}
{{- $defaultServiceName := $fullName -}}
{{- if and (hasKey $primaryService "nameOverride") $primaryService.nameOverride -}}
{{- $defaultServiceName = printf "%v-%v" $defaultServiceName $primaryService.nameOverride -}}
{{- end -}}
{{- $defaultServicePort := get $primaryService.ports (include "bjw-s.common.lib.service.primaryPort" (dict "values" $primaryService)) -}}
---
apiVersion: gateway.networking.k8s.io/v1alpha2
{{- if and (ne $routeKind "GRPCRoute") (ne $routeKind "HTTPRoute") (ne $routeKind "TCPRoute") (ne $routeKind "TLSRoute") (ne $routeKind "UDPRoute") }}
{{- fail (printf "Not a valid route kind (%s)" $routeKind) }}
{{- end }}
kind: {{ $routeKind }}
metadata:
name: {{ $fullName }}
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- range $values.parentRefs }}
- group: {{ default "gateway.networking.k8s.io" .group }}
kind: {{ default "Gateway" .kind }}
name: {{ required (printf "parentRef name is required for %v %v" $routeKind $fullName) .name }}
namespace: {{ required (printf "parentRef namespace is required for %v %v" $routeKind $fullName) .namespace }}
{{- if .sectionName }}
sectionName: {{ .sectionName | quote }}
{{- end }}
{{- end }}
{{- if and (ne $routeKind "TCPRoute") (ne $routeKind "UDPRoute") $values.hostnames }}
hostnames:
{{- with $values.hostnames }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
rules:
{{- range $values.rules }}
- backendRefs:
{{- range .backendRefs }}
- group: {{ default "" .group | quote}}
kind: {{ default "Service" .kind }}
name: {{ default $defaultServiceName .name }}
namespace: {{ default $.Release.Namespace .namespace }}
port: {{ default $defaultServicePort.port .port }}
weight: {{ default 1 .weight }}
{{- end }}
{{- if (eq $routeKind "HTTPRoute") }}
{{- with .matches }}
matches:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,37 +0,0 @@
{{/*
This template serves as a blueprint for all Secret objects that are created
within the common library.
*/}}
{{- define "bjw-s.common.class.secret" -}}
{{- $fullName := include "bjw-s.common.lib.chart.names.fullname" . -}}
{{- $secretName := $fullName -}}
{{- $values := .Values.configmap -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.secret -}}
{{- $values = . -}}
{{- end -}}
{{ end -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- $secretName = printf "%v-%v" $secretName $values.nameOverride -}}
{{- end }}
---
apiVersion: v1
kind: Secret
{{- with $values.type }}
type: {{ . }}
{{- end }}
metadata:
name: {{ $secretName }}
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with $values.stringData }}
stringData:
{{- tpl (toYaml .) $ | nindent 2 }}
{{- end }}
{{- end -}}

View File

@@ -1,100 +0,0 @@
{{/*
This template serves as a blueprint for all Service objects that are created
within the common library.
*/}}
{{- define "bjw-s.common.class.service" -}}
{{- $values := .Values.service -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.service -}}
{{- $values = . -}}
{{- end -}}
{{ end -}}
{{- $serviceName := include "bjw-s.common.lib.chart.names.fullname" . -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- $serviceName = printf "%v-%v" $serviceName $values.nameOverride -}}
{{ end -}}
{{- $svcType := $values.type | default "" -}}
{{- $enabledPorts := include "bjw-s.common.lib.service.enabledPorts" (dict "serviceName" $serviceName "values" $values) | fromYaml }}
{{- $primaryPort := get $values.ports (include "bjw-s.common.lib.service.primaryPort" (dict "values" $values)) }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ $serviceName }}
labels:
app.kubernetes.io/service: {{ $serviceName }}
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- if eq ( $primaryPort.protocol | default "" ) "HTTPS" }}
traefik.ingress.kubernetes.io/service.serversscheme: https
{{- end }}
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
{{ toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if (or (eq $svcType "ClusterIP") (empty $svcType)) }}
type: ClusterIP
{{- if $values.clusterIP }}
clusterIP: {{ $values.clusterIP }}
{{end}}
{{- else if eq $svcType "LoadBalancer" }}
type: {{ $svcType }}
{{- if $values.loadBalancerIP }}
loadBalancerIP: {{ $values.loadBalancerIP }}
{{- end }}
{{- if $values.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml $values.loadBalancerSourceRanges | nindent 4 }}
{{- end -}}
{{- else }}
type: {{ $svcType }}
{{- end }}
{{- if $values.externalTrafficPolicy }}
externalTrafficPolicy: {{ $values.externalTrafficPolicy }}
{{- end }}
{{- if $values.sessionAffinity }}
sessionAffinity: {{ $values.sessionAffinity }}
{{- if $values.sessionAffinityConfig }}
sessionAffinityConfig:
{{ toYaml $values.sessionAffinityConfig | nindent 4 }}
{{- end -}}
{{- end }}
{{- with $values.externalIPs }}
externalIPs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if $values.publishNotReadyAddresses }}
publishNotReadyAddresses: {{ $values.publishNotReadyAddresses }}
{{- end }}
{{- if $values.ipFamilyPolicy }}
ipFamilyPolicy: {{ $values.ipFamilyPolicy }}
{{- end }}
{{- with $values.ipFamilies }}
ipFamilies:
{{ toYaml . | nindent 4 }}
{{- end }}
ports:
{{- range $name, $port := $enabledPorts }}
- port: {{ $port.port }}
targetPort: {{ $port.targetPort | default $name }}
{{- if $port.protocol }}
{{- if or ( eq $port.protocol "HTTP" ) ( eq $port.protocol "HTTPS" ) ( eq $port.protocol "TCP" ) }}
protocol: TCP
{{- else }}
protocol: {{ $port.protocol }}
{{- end }}
{{- else }}
protocol: TCP
{{- end }}
name: {{ $name }}
{{- if (and (eq $svcType "NodePort") (not (empty $port.nodePort))) }}
nodePort: {{ $port.nodePort }}
{{ end }}
{{- end -}}
{{- with (merge ($values.extraSelectorLabels | default dict) (include "bjw-s.common.lib.metadata.selectorLabels" . | fromYaml)) }}
selector: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@@ -1,19 +0,0 @@
{{/*
This template serves as a blueprint for ServiceAccount objects that are created
using the common library.
*/}}
{{- define "bjw-s.common.class.serviceAccount" -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "bjw-s.common.lib.chart.names.serviceAccountName" . }}
{{- with include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (merge (.Values.serviceAccount.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
secrets:
- name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-sa-token
{{- end -}}

View File

@@ -1,34 +0,0 @@
{{- define "bjw-s.common.class.serviceMonitor" -}}
{{- $values := dict -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.serviceMonitor -}}
{{- $values = . -}}
{{- end -}}
{{ end -}}
{{- $serviceMonitorName := include "bjw-s.common.lib.chart.names.fullname" . -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- $serviceMonitorName = printf "%v-%v" $serviceMonitorName $values.nameOverride -}}
{{ end -}}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ $serviceMonitorName }}
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
labels: {{- toYaml . | nindent 4 }}
{{- end }}
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
{{- if $values.selector -}}
{{- tpl ($values.selector | toYaml) $ | nindent 4}}
{{- else }}
matchLabels:
app.kubernetes.io/service: {{ tpl $values.serviceName $ }}
{{- include "bjw-s.common.lib.metadata.selectorLabels" . | nindent 6 }}
{{- end }}
endpoints: {{- toYaml (required (printf "endpoints are required for serviceMonitor %v" $serviceMonitorName) $values.endpoints) | nindent 4 }}
{{- end }}

View File

@@ -1,68 +0,0 @@
{{/*
This template serves as the blueprint for the StatefulSet objects that are created
within the common library.
*/}}
{{- define "bjw-s.common.class.statefulset" -}}
{{- $strategy := default "RollingUpdate" .Values.controller.strategy -}}
{{- if and (ne $strategy "OnDelete") (ne $strategy "RollingUpdate") -}}
{{- fail (printf "Not a valid strategy type for StatefulSet (%s)" $strategy) -}}
{{- end -}}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
{{- with include "bjw-s.common.lib.controller.metadata.labels" . }}
labels: {{- . | nindent 4 }}
{{- end }}
{{- with include "bjw-s.common.lib.controller.metadata.annotations" . }}
annotations: {{- . | nindent 4 }}
{{- end }}
spec:
revisionHistoryLimit: {{ .Values.controller.revisionHistoryLimit }}
replicas: {{ .Values.controller.replicas }}
podManagementPolicy: {{ default "OrderedReady" .Values.controller.podManagementPolicy }}
updateStrategy:
type: {{ $strategy }}
{{- if and (eq $strategy "RollingUpdate") .Values.controller.rollingUpdate.partition }}
rollingUpdate:
partition: {{ .Values.controller.rollingUpdate.partition }}
{{- end }}
selector:
matchLabels:
{{- include "bjw-s.common.lib.metadata.selectorLabels" . | nindent 6 }}
serviceName: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
template:
metadata:
{{- with include ("bjw-s.common.lib.metadata.podAnnotations") . }}
annotations:
{{- . | nindent 8 }}
{{- end }}
labels:
{{- include "bjw-s.common.lib.metadata.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- include "bjw-s.common.lib.controller.pod" . | nindent 6 }}
volumeClaimTemplates:
{{- range $index, $volumeClaimTemplate := .Values.volumeClaimTemplates }}
- metadata:
name: {{ $volumeClaimTemplate.name }}
{{- with ($volumeClaimTemplate.labels | default dict) }}
labels: {{- toYaml . | nindent 10 }}
{{- end }}
{{- with ($volumeClaimTemplate.annotations | default dict) }}
annotations: {{- toYaml . | nindent 10 }}
{{- end }}
spec:
accessModes:
- {{ required (printf "accessMode is required for volumeClaimTemplate %v" $volumeClaimTemplate.name) $volumeClaimTemplate.accessMode | quote }}
resources:
requests:
storage: {{ required (printf "size is required for PVC %v" $volumeClaimTemplate.name) $volumeClaimTemplate.size | quote }}
{{- if $volumeClaimTemplate.storageClass }}
storageClassName: {{ if (eq "-" $volumeClaimTemplate.storageClass) }}""{{- else }}{{ $volumeClaimTemplate.storageClass | quote }}{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,45 +0,0 @@
{{/* Expand the name of the chart */}}
{{- define "bjw-s.common.lib.chart.names.name" -}}
{{- $globalNameOverride := "" -}}
{{- if hasKey .Values "global" -}}
{{- $globalNameOverride = (default $globalNameOverride .Values.global.nameOverride) -}}
{{- end -}}
{{- default .Chart.Name (default .Values.nameOverride $globalNameOverride) | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "bjw-s.common.lib.chart.names.fullname" -}}
{{- $name := include "bjw-s.common.lib.chart.names.name" . -}}
{{- $globalFullNameOverride := "" -}}
{{- if hasKey .Values "global" -}}
{{- $globalFullNameOverride = (default $globalFullNameOverride .Values.global.fullnameOverride) -}}
{{- end -}}
{{- if or .Values.fullnameOverride $globalFullNameOverride -}}
{{- $name = default .Values.fullnameOverride $globalFullNameOverride -}}
{{- else -}}
{{- if contains $name .Release.Name -}}
{{- $name = .Release.Name -}}
{{- else -}}
{{- $name = printf "%s-%s" .Release.Name $name -}}
{{- end -}}
{{- end -}}
{{- trunc 63 $name | trimSuffix "-" -}}
{{- end -}}
{{/* Create chart name and version as used by the chart label */}}
{{- define "bjw-s.common.lib.chart.names.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* Create the name of the ServiceAccount to use */}}
{{- define "bjw-s.common.lib.chart.names.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{- default (include "bjw-s.common.lib.chart.names.fullname" .) .Values.serviceAccount.name -}}
{{- else -}}
{{- default "default" .Values.serviceAccount.name -}}
{{- end -}}
{{- end -}}

View File

@@ -1,56 +0,0 @@
{{/*
Default NOTES.txt content.
*/}}
{{- define "bjw-s.common.lib.chart.notes" -}}
{{- $primaryIngress := get .Values.ingress (include "bjw-s.common.lib.ingress.primary" .) -}}
{{- $primaryService := get .Values.service (include "bjw-s.common.lib.service.primary" .) -}}
{{- $primaryPort := "" -}}
{{- if $primaryService -}}
{{- $primaryPort = get $primaryService.ports (include "bjw-s.common.lib.service.primaryPort" (dict "serviceName" (include "bjw-s.common.lib.service.primary" .) "values" $primaryService)) -}}
{{- end -}}
{{- $prefix := "http" -}}
{{- if $primaryPort }}
{{- if hasKey $primaryPort "protocol" }}
{{- if eq $primaryPort.protocol "HTTPS" }}
{{- $prefix = "https" }}
{{- end }}
{{- end }}
{{- end }}
{{- if $primaryIngress }}
1. Access the application by visiting one of these URL's:
{{ range $primaryIngress.hosts }}
{{- $prefix = "http" -}}
{{ if $primaryIngress.tls -}}
{{- $prefix = "https" -}}
{{ end -}}
{{- $host := .host -}}
{{ if .hostTpl -}}
{{- $host = tpl .hostTpl $ -}}
{{ end }}
{{- $path := (first .paths).path | default "/" -}}
{{ if (first .paths).pathTpl -}}
{{- $path = tpl (first .paths).pathTpl $ -}}
{{ end }}
- {{ $prefix }}://{{- $host }}{{- $path }}
{{- end }}
{{- else if and $primaryService $primaryPort }}
1. Get the application URL by running these commands:
{{- if contains "NodePort" $primaryService.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "bjw-s.common.lib.chart.names.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo {{ $prefix }}://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" $primaryService.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ include "bjw-s.common.lib.chart.names.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "bjw-s.common.lib.chart.names.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo {{ $prefix }}://$SERVICE_IP:{{ $primaryPort.port | toString | atoi }}
{{- else if contains "ClusterIP" $primaryService.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "bjw-s.common.lib.chart.names.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit {{ $prefix }}://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ $primaryPort.port | toString | atoi }}
{{- end }}
{{- end }}
{{- end -}}

View File

@@ -1,15 +0,0 @@
{{/*
Image used by the main container.
*/}}
{{- define "bjw-s.common.lib.container.image" -}}
{{- $imageRepo := .Values.image.repository -}}
{{- $imageTag := default .Chart.AppVersion .Values.image.tag -}}
{{- if kindIs "float64" .Values.image.tag -}}
{{- $imageTag = .Values.image.tag | toString -}}
{{- end -}}
{{- if and $imageRepo $imageTag -}}
{{- printf "%s:%s" $imageRepo $imageTag -}}
{{- end -}}
{{- end -}}

View File

@@ -1,43 +0,0 @@
{{/*
Environment variables used by containers.
*/}}
{{- define "bjw-s.common.lib.container.envVars" -}}
{{- $values := .Values.env -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.envVars -}}
{{- $values = . -}}
{{- end -}}
{{- end -}}
{{- with $values -}}
{{- $result := list -}}
{{- range $k, $v := . -}}
{{- $name := $k -}}
{{- $value := $v -}}
{{- if kindIs "int" $name -}}
{{- $name = required "environment variables as a list of maps require a name field" $value.name -}}
{{- end -}}
{{- if kindIs "map" $value -}}
{{- if hasKey $value "value" -}}
{{- $envValue := $value.value | toString -}}
{{- $result = append $result (dict "name" $name "value" (tpl $envValue $)) -}}
{{- else if hasKey $value "valueFrom" -}}
{{- $result = append $result (dict "name" $name "valueFrom" $value.valueFrom) -}}
{{- else -}}
{{- $result = append $result (dict "name" $name "valueFrom" $value) -}}
{{- end -}}
{{- end -}}
{{- if not (kindIs "map" $value) -}}
{{- if kindIs "string" $value -}}
{{- $result = append $result (dict "name" $name "value" (tpl $value $)) -}}
{{- else if or (kindIs "float64" $value) (kindIs "bool" $value) -}}
{{- $result = append $result (dict "name" $name "value" ($value | toString)) -}}
{{- else -}}
{{- $result = append $result (dict "name" $name "value" $value) -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- toYaml (dict "env" $result) | nindent 0 -}}
{{- end -}}
{{- end -}}

View File

@@ -1,41 +0,0 @@
{{/*
Ports included by the controller.
*/}}
{{- define "bjw-s.common.lib.container.ports" -}}
{{- $ports := list -}}
{{- range $servicename, $service := .Values.service -}}
{{- $serviceEnabled := true -}}
{{- if hasKey $service "enabled" -}}
{{- $serviceEnabled = $service.enabled -}}
{{- end -}}
{{- if $serviceEnabled -}}
{{- $enabledPorts := include "bjw-s.common.lib.service.enabledPorts" (dict "serviceName" $servicename "values" $service) | fromYaml }}
{{- range $portname, $port := ($enabledPorts | default dict) -}}
{{- $_ := set $port "name" $portname -}}
{{- $ports = mustAppend $ports $port -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/* export/render the list of ports */}}
{{- if $ports -}}
{{- range $_ := $ports }}
{{- if default true .enabled | }}
- name: {{ .name }}
{{- if and .targetPort (kindIs "string" .targetPort) }}
{{- fail (printf "Our charts do not support named ports for targetPort. (port name %s, targetPort %s)" .name .targetPort) }}
{{- end }}
containerPort: {{ .targetPort | default .port }}
{{- if .protocol }}
{{- if or ( eq .protocol "HTTP" ) ( eq .protocol "HTTPS" ) ( eq .protocol "TCP" ) }}
protocol: TCP
{{- else }}
protocol: {{ .protocol }}
{{- end }}
{{- else }}
protocol: TCP
{{- end }}
{{- end}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -1,67 +0,0 @@
{{/*
Probes selection logic.
*/}}
{{- define "bjw-s.common.lib.container.probes" -}}
{{- $primaryService := get .Values.service (include "bjw-s.common.lib.service.primary" .) -}}
{{- $primaryPort := "" -}}
{{- if $primaryService -}}
{{- $primaryPort = get $primaryService.ports (include "bjw-s.common.lib.service.primaryPort" (dict "serviceName" (include "bjw-s.common.lib.service.primary" .) "values" $primaryService)) -}}
{{- end -}}
{{- range $probeName, $probe := .Values.probes -}}
{{- if $probe.enabled -}}
{{- $probeOutput := "" -}}
{{- if $probe.custom -}}
{{- if $probe.spec -}}
{{- $probeOutput = $probe.spec | toYaml -}}
{{- end -}}
{{- else -}}
{{- if $primaryPort -}}
{{- $probeType := "" -}}
{{- if eq $probe.type "AUTO" -}}
{{- $probeType = $primaryPort.protocol -}}
{{- else -}}
{{- $probeType = $probe.type | default "TCP" -}}
{{- end -}}
{{- $probeDefinition := dict
"initialDelaySeconds" $probe.spec.initialDelaySeconds
"failureThreshold" $probe.spec.failureThreshold
"timeoutSeconds" $probe.spec.timeoutSeconds
"periodSeconds" $probe.spec.periodSeconds
-}}
{{- $probeHeader := "" -}}
{{- if or ( eq $probeType "HTTPS" ) ( eq $probeType "HTTP" ) -}}
{{- $probeHeader = "httpGet" -}}
{{- $_ := set $probeDefinition $probeHeader (
dict
"path" $probe.path
"scheme" $probeType
)
-}}
{{- else }}
{{- $probeHeader = "tcpSocket" -}}
{{- $_ := set $probeDefinition $probeHeader dict -}}
{{- end -}}
{{- if $probe.port }}
{{- $_ := set (index $probeDefinition $probeHeader) "port" (tpl ( $probe.port | toString ) $) -}}
{{- else if $primaryPort.targetPort }}
{{- $_ := set (index $probeDefinition $probeHeader) "port" $primaryPort.targetPort -}}
{{- else }}
{{- $_ := set (index $probeDefinition $probeHeader) "port" ($primaryPort.port | toString | atoi ) -}}
{{- end }}
{{- $probeOutput = $probeDefinition | toYaml | trim -}}
{{- end -}}
{{- end -}}
{{- if $probeOutput -}}
{{- printf "%sProbe:" $probeName | nindent 0 -}}
{{- $probeOutput | nindent 2 -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -1,56 +0,0 @@
{{/* Volumes included by the controller */}}
{{- define "bjw-s.common.lib.container.volumeMounts" -}}
{{- range $persistenceIndex, $persistenceItem := .Values.persistence }}
{{- if $persistenceItem.enabled -}}
{{- if kindIs "slice" $persistenceItem.subPath -}}
{{- if $persistenceItem.mountPath -}}
{{- fail (printf "Cannot use persistence.mountPath with a subPath list (%s)" $persistenceIndex) }}
{{- end -}}
{{- range $subPathIndex, $subPathItem := $persistenceItem.subPath }}
- name: {{ $persistenceIndex }}
subPath: {{ required "subPaths as a list of maps require a path field" $subPathItem.path }}
mountPath: {{ required "subPaths as a list of maps require an explicit mountPath field" $subPathItem.mountPath }}
{{- with $subPathItem.readOnly }}
readOnly: {{ . }}
{{- end }}
{{- with $subPathItem.mountPropagation }}
mountPropagation: {{ . }}
{{- end }}
{{- end -}}
{{- else -}}
{{/* Set the default mountPath to /<name_of_the_peristence_item> */}}
{{- $mountPath := (printf "/%v" $persistenceIndex) -}}
{{- if eq "hostPath" (default "pvc" $persistenceItem.type) -}}
{{- $mountPath = $persistenceItem.hostPath -}}
{{- end -}}
{{/* Use the specified mountPath if provided */}}
{{- with $persistenceItem.mountPath -}}
{{- $mountPath = . -}}
{{- end }}
{{- if ne $mountPath "-" }}
- name: {{ $persistenceIndex }}
mountPath: {{ $mountPath }}
{{- with $persistenceItem.subPath }}
subPath: {{ . }}
{{- end }}
{{- with $persistenceItem.readOnly }}
readOnly: {{ . }}
{{- end }}
{{- with $persistenceItem.mountPropagation }}
mountPropagation: {{ . }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}
{{- end }}
{{- if eq .Values.controller.type "statefulset" }}
{{- range $index, $vct := .Values.volumeClaimTemplates }}
- mountPath: {{ $vct.mountPath }}
name: {{ $vct.name }}
{{- if $vct.subPath }}
subPath: {{ $vct.subPath }}
{{- end }}
{{- end }}
{{- end }}
{{- end -}}

View File

@@ -1,58 +0,0 @@
{{- /* The main container included in the controller */ -}}
{{- define "bjw-s.common.lib.controller.mainContainer" -}}
- name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}
image: {{ include "bjw-s.common.lib.container.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.command }}
command:
{{- if kindIs "string" . }}
- {{ . | quote }}
{{- else }}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- with .Values.args }}
args:
{{- if kindIs "string" . }}
- {{ . | quote }}
{{- else }}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.lifecycle }}
lifecycle:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.termination.messagePath }}
terminationMessagePath: {{ . }}
{{- end }}
{{- with .Values.termination.messagePolicy }}
terminationMessagePolicy: {{ . }}
{{- end }}
{{- with .Values.env }}
env:
{{- get (fromYaml (include "bjw-s.common.lib.container.envVars" $)) "env" | toYaml | nindent 4 -}}
{{- end }}
{{- with .Values.envFrom }}
envFrom:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with (include "bjw-s.common.lib.container.ports" . | trim) }}
ports:
{{- nindent 4 . }}
{{- end }}
{{- with (include "bjw-s.common.lib.container.volumeMounts" . | trim) }}
volumeMounts:
{{- nindent 4 . }}
{{- end }}
{{- include "bjw-s.common.lib.container.probes" . | trim | nindent 2 }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end -}}

View File

@@ -1,25 +0,0 @@
{{- define "bjw-s.common.lib.controller.metadata.labels" -}}
{{-
$labels := (
merge
(.Values.controller.labels | default dict)
(include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)
)
-}}
{{- with $labels -}}
{{- toYaml . -}}
{{- end -}}
{{- end -}}
{{- define "bjw-s.common.lib.controller.metadata.annotations" -}}
{{-
$annotations := (
merge
(.Values.controller.annotations | default dict)
(include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)
)
-}}
{{- with $annotations -}}
{{- toYaml . -}}
{{- end -}}
{{- end -}}

View File

@@ -1,114 +0,0 @@
{{- /*
The pod definition included in the controller.
*/ -}}
{{- define "bjw-s.common.lib.controller.pod" -}}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 2 }}
{{- end }}
serviceAccountName: {{ include "bjw-s.common.lib.chart.names.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.runtimeClassName }}
runtimeClassName: {{ . }}
{{- end }}
{{- with .Values.schedulerName }}
schedulerName: {{ . }}
{{- end }}
{{- with .Values.hostIPC }}
hostIPC: {{ . }}
{{- end }}
{{- with .Values.hostNetwork }}
hostNetwork: {{ . }}
{{- end }}
{{- with .Values.hostPID }}
hostPID: {{ . }}
{{- end }}
{{- with .Values.hostname }}
hostname: {{ . }}
{{- end }}
{{- if .Values.dnsPolicy }}
dnsPolicy: {{ .Values.dnsPolicy }}
{{- else if .Values.hostNetwork }}
dnsPolicy: ClusterFirstWithHostNet
{{- else }}
dnsPolicy: ClusterFirst
{{- end }}
{{- with .Values.dnsConfig }}
dnsConfig:
{{- toYaml . | nindent 2 }}
{{- end }}
enableServiceLinks: {{ .Values.enableServiceLinks }}
{{- with .Values.termination.gracePeriodSeconds }}
terminationGracePeriodSeconds: {{ . }}
{{- end }}
{{- if .Values.initContainers }}
initContainers:
{{- $initContainers := list }}
{{- range $index, $key := (keys .Values.initContainers | uniq | sortAlpha) }}
{{- $container := get $.Values.initContainers $key }}
{{- if not $container.name -}}
{{- $_ := set $container "name" $key }}
{{- end }}
{{- if $container.env -}}
{{- $_ := set $ "ObjectValues" (dict "envVars" $container.env) -}}
{{- $newEnv := fromYaml (include "bjw-s.common.lib.container.envVars" $) -}}
{{- $_ := unset $.ObjectValues "envVars" -}}
{{- $_ := set $container "env" $newEnv.env }}
{{- end }}
{{- $initContainers = append $initContainers $container }}
{{- end }}
{{- tpl (toYaml $initContainers) $ | nindent 2 }}
{{- end }}
containers:
{{- include "bjw-s.common.lib.controller.mainContainer" . | nindent 2 }}
{{- with (merge .Values.sidecars .Values.additionalContainers) }}
{{- $sidecarContainers := list }}
{{- range $name, $container := . }}
{{- if not $container.name -}}
{{- $_ := set $container "name" $name }}
{{- end }}
{{- if $container.env -}}
{{- $_ := set $ "ObjectValues" (dict "envVars" $container.env) -}}
{{- $newEnv := fromYaml (include "bjw-s.common.lib.container.envVars" $) -}}
{{- $_ := set $container "env" $newEnv.env }}
{{- $_ := unset $.ObjectValues "envVars" -}}
{{- end }}
{{- $sidecarContainers = append $sidecarContainers $container }}
{{- end }}
{{- tpl (toYaml $sidecarContainers) $ | nindent 2 }}
{{- end }}
{{- with (include "bjw-s.common.lib.controller.volumes" . | trim) }}
volumes:
{{- nindent 2 . }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .Values.controller.restartPolicy }}
restartPolicy: {{ . }}
{{- end }}
{{- end -}}

View File

@@ -1,68 +0,0 @@
{{/*
Volumes included by the controller.
*/}}
{{- define "bjw-s.common.lib.controller.volumes" -}}
{{- range $index, $persistence := .Values.persistence }}
{{- if $persistence.enabled }}
- name: {{ $index }}
{{- if eq (default "pvc" $persistence.type) "pvc" }}
{{- $pvcName := (include "bjw-s.common.lib.chart.names.fullname" $) -}}
{{- if $persistence.existingClaim }}
{{- /* Always prefer an existingClaim if that is set */}}
{{- $pvcName = $persistence.existingClaim -}}
{{- else -}}
{{- /* Otherwise refer to the PVC name */}}
{{- if $persistence.nameOverride -}}
{{- if not (eq $persistence.nameOverride "-") -}}
{{- $pvcName = (printf "%s-%s" (include "bjw-s.common.lib.chart.names.fullname" $) $persistence.nameOverride) -}}
{{- end -}}
{{- else -}}
{{- $pvcName = (printf "%s-%s" (include "bjw-s.common.lib.chart.names.fullname" $) $index) -}}
{{- end -}}
{{- end }}
persistentVolumeClaim:
claimName: {{ $pvcName }}
{{- else if or (eq $persistence.type "configMap") (eq $persistence.type "secret") }}
{{- $objectName := (required (printf "name not set for persistence item %s" $index) $persistence.name) }}
{{- $objectName = tpl $objectName $ }}
{{- if eq $persistence.type "configMap" }}
configMap:
name: {{ $objectName }}
{{- else }}
secret:
secretName: {{ $objectName }}
{{- end }}
{{- with $persistence.defaultMode }}
defaultMode: {{ . }}
{{- end }}
{{- with $persistence.items }}
items:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- else if eq $persistence.type "emptyDir" }}
{{- $emptyDir := dict -}}
{{- with $persistence.medium -}}
{{- $_ := set $emptyDir "medium" . -}}
{{- end -}}
{{- with $persistence.sizeLimit -}}
{{- $_ := set $emptyDir "sizeLimit" . -}}
{{- end }}
emptyDir: {{- $emptyDir | toYaml | nindent 4 }}
{{- else if eq $persistence.type "hostPath" }}
hostPath:
path: {{ required "hostPath not set" $persistence.hostPath }}
{{- with $persistence.hostPathType }}
type: {{ . }}
{{- end }}
{{- else if eq $persistence.type "nfs" }}
nfs:
server: {{ required "server not set" $persistence.server }}
path: {{ required "path not set" $persistence.path }}
{{- else if eq $persistence.type "custom" }}
{{- toYaml $persistence.volumeSpec | nindent 2 }}
{{- else }}
{{- fail (printf "Not a valid persistence.type (%s)" $persistence.type) }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,21 +0,0 @@
{{/* Return the name of the primary ingress object */}}
{{- define "bjw-s.common.lib.ingress.primary" -}}
{{- $enabledIngresses := dict -}}
{{- range $name, $ingress := .Values.ingress -}}
{{- if $ingress.enabled -}}
{{- $_ := set $enabledIngresses $name . -}}
{{- end -}}
{{- end -}}
{{- $result := "" -}}
{{- range $name, $ingress := $enabledIngresses -}}
{{- if and (hasKey $ingress "primary") $ingress.primary -}}
{{- $result = $name -}}
{{- end -}}
{{- end -}}
{{- if not $result -}}
{{- $result = keys $enabledIngresses | first -}}
{{- end -}}
{{- $result -}}
{{- end -}}

View File

@@ -1,10 +0,0 @@
{{/* Common labels shared across objects */}}
{{- define "bjw-s.common.lib.metadata.allLabels" -}}
helm.sh/chart: {{ include "bjw-s.common.lib.chart.names.chart" . }}
{{ include "bjw-s.common.lib.metadata.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{ include "bjw-s.common.lib.metadata.globalLabels" . }}
{{- end -}}

View File

@@ -1,10 +0,0 @@
{{/* Common annotations shared across objects */}}
{{- define "bjw-s.common.lib.metadata.globalAnnotations" -}}
{{- with .Values.global.annotations }}
{{- range $k, $v := . }}
{{- $name := $k }}
{{- $value := tpl $v $ }}
{{ $name }}: {{ quote $value }}
{{- end }}
{{- end }}
{{- end -}}

Some files were not shown because too many files have changed in this diff Show More