-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc15beb
commit 31bdff8
Showing
14 changed files
with
173 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: common | ||
repository: oci://tccr.io/truecharts | ||
version: 25.1.5 | ||
digest: sha256:5f5fa138644171c40fa54ed35f2a9d068215ed673116eea07e9a42fc35f2795b | ||
generated: "2024-11-04T14:17:42.593063108+01:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
kubeVersion: ">=1.24.0-0" | ||
apiVersion: v2 | ||
name: gradle-build-cache | ||
version: 0.0.1 | ||
appVersion: 20.0 | ||
description: Hosts the official gradle build cache node | ||
home: https://github.com/EugenMayer/helm-charts/tree/main/charts/gradle-build-cache | ||
deprecated: false | ||
keywords: | ||
- network | ||
- tools | ||
- development | ||
sources: | ||
- https://github.com/EugenMayer/helm-charts/tree/main/charts/gradle-build-cache | ||
dependencies: | ||
- name: common | ||
# https://github.com/truecharts/public/blob/master/charts/library/common/Chart.yaml | ||
version: 25.1.5 | ||
repository: oci://tccr.io/truecharts | ||
condition: "" | ||
alias: "" | ||
tags: [] | ||
import-values: [] | ||
type: application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
update: | ||
helm dependency update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# WAT | ||
|
||
Lets you host the gradle build cache on your k8s cluster - uses the official [docker container](https://hub.docker.com/r/gradle/build-cache-node/). | ||
|
||
### Config | ||
|
||
If you want to provide a config, you need to deploy a secret with the key `config.yaml`, holding the configuration as | ||
a base64 encoded string. See the (official docs)(https://docs.gradle.com/build-cache-node/#editing_the_file). | ||
You will then need to enable it in the `persistence.config-secret`, and if you used a custom name, | ||
override `objectName` | ||
|
||
```yaml | ||
persistence: | ||
config-secret: | ||
enabled: true | ||
objectName: 'gradle-cache-config' | ||
``` | ||
### Volumes / PVC | ||
By default the cached mirror data is persistence, see persistence in [values.yml](./values.yaml) | ||
### Values | ||
Check the [values.yml](./values.yaml) file | ||
# Credits | ||
All the credits to [gradles build cache](https://docs.gradle.com/build-cache-node/) doing the actual work. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{- include "tc.v1.common.lib.chart.notes" $ -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ include "tc.v1.common.loader.all" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
image: | ||
repository: gradle/build-cache-node | ||
tag: "20.0" | ||
pullPolicy: Always | ||
|
||
service: | ||
main: | ||
ports: | ||
main: | ||
port: 5071 | ||
targetPort: 5071 | ||
|
||
workload: | ||
main: | ||
replicas: 1 | ||
strategy: Recreate | ||
type: Deployment | ||
podSpec: | ||
initContainers: | ||
init-config: | ||
enabled: true | ||
type: init | ||
imageSelector: image | ||
# we need to copy the config since mounting the secret would make the file read only | ||
# which crashes the build cache server (required rw). So we jump through hoops | ||
command: | ||
- /bin/sh | ||
- -ce | ||
args: | ||
- | | ||
echo "Copying config.yaml file..." | ||
if [ -f /tmp/conf/config.yaml ]; then | ||
cp /tmp/conf/config.yaml /data/conf/config.yaml | ||
echo "...done" | ||
else | ||
echo 'config.yaml does not exist' | ||
fi | ||
containers: | ||
main: | ||
args: | ||
- start | ||
probes: | ||
startup: | ||
enabled: true | ||
port: 5071 | ||
type: tcp | ||
spec: | ||
initialDelaySeconds: 5 | ||
periodSeconds: 3 | ||
failureThreshold: 6 | ||
readiness: | ||
enabled: true | ||
port: 5071 | ||
type: tcp | ||
spec: | ||
initialDelaySeconds: 5 | ||
periodSeconds: 3 | ||
failureThreshold: 6 | ||
liveness: | ||
enabled: true | ||
type: tcp | ||
port: 5071 | ||
spec: | ||
initialDelaySeconds: 1 | ||
periodSeconds: 5 | ||
failureThreshold: 3 | ||
|
||
securityContext: | ||
container: | ||
readOnlyRootFilesystem: false | ||
runAsNonRoot: false | ||
runAsUser: 0 | ||
runAsGroup: 0 | ||
|
||
persistence: | ||
cache: | ||
enabled: true | ||
size: 1Gi | ||
mountPath: "/data/system" | ||
config: | ||
enabled: true | ||
size: 1Mi | ||
mountPath: "/data/conf" | ||
targetSelectAll: all | ||
type: emptyDir | ||
config-secret: | ||
# Enable if you want to preseed a config | ||
enabled: false | ||
type: secret | ||
objectName: 'gradle-cache-config' | ||
expandObjectName: false | ||
targetSelector: | ||
main: | ||
init-config: | ||
# this secret needs to have a property called 'config.yaml' that is the base64 encoded gradle-cache config | ||
# see https://docs.gradle.com/build-cache-node/#editing_the_file | ||
mountPath: "/tmp/conf/config.yaml" | ||
subPath: 'config.yaml' | ||
|
||
portal: | ||
open: | ||
enabled: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters