Skip to content

Commit b5fba39

Browse files
moves helm chart and application to self
1 parent 2946e54 commit b5fba39

22 files changed

+710
-0
lines changed

deploy/application-regproxy.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: app-projects
5+
namespace: akuity
6+
spec:
7+
destination:
8+
namespace: regproxy
9+
server: "http://cluster-rt-test-cluster:8001"
10+
project: core
11+
source:
12+
repoURL: https://github.com/coreweave/docker-registry-proxy.git
13+
path: helm/regproxy
14+
targetRevision: rt/deploy-testing
15+
helm:
16+
valueFiles:
17+
- values.yaml
18+
- values-dev.yaml
19+
syncPolicy:
20+
automated: {}

helm/regproxy/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

helm/regproxy/Chart.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: v2
2+
name: regproxy
3+
description: A Helm chart for Kubernetes
4+
# A chart can be either an 'application' or a 'library' chart.
5+
#
6+
# Application charts are a collection of templates that can be packaged into versioned archives
7+
# to be deployed.
8+
#
9+
# Library charts provide useful utilities or functions for the chart developer. They're included as
10+
# a dependency of application charts to inject those utilities and functions into the rendering
11+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
12+
type: application
13+
14+
# This is the chart version. This version number should be incremented each time you make changes
15+
# to the chart and its templates, including the app version.
16+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
17+
version: 0.1.0
18+
19+
# This is the version number of the application being deployed. This version number should be
20+
# incremented each time you make changes to the application. Versions are not expected to
21+
# follow Semantic Versioning. They should reflect the version the application is using.
22+
# It is recommended to use it with quotes.
23+
appVersion: "1.16.0"

helm/regproxy/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# regproxy

helm/regproxy/catalog.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: backstage.io/v1alpha1
2+
kind: Component
3+
metadata:
4+
name: regproxy
5+
links:
6+
- title: Deployment Definition URL
7+
url: https://github.com/coreweave/k8s-services/tree/master/apps/common/regproxy
8+
icon: code
9+
description: TODO
10+
11+
spec:
12+
type: service
13+
lifecycle: unknown
14+
owner: group:cw/team_TODO
15+
system: TODO

helm/regproxy/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "regproxy"
3+
}

helm/regproxy/templates/_helpers.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{/*
2+
Define a named template to get the CACHE_MAX_SIZE value and convert it to Gi
3+
*/}}
4+
{{- define "sizeLimit" -}}
5+
{{- $cacheMaxSize := dict "name" "CACHE_MAX_SIZE" "value" "0" }}
6+
{{- range .Values.regproxy.env }}
7+
{{- if eq .name $cacheMaxSize.name }}
8+
{{- $cacheMaxSize = . }}
9+
{{- end }}
10+
{{- end }}
11+
{{- $numericValue := printf "%s" $cacheMaxSize.value | regexFind "\\d+" }}
12+
{{- printf "%sGi" $numericValue | quote }}
13+
{{- end }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{{- range $name, $spec := .Values.coreweave.clusterSecretStores }}
2+
---
3+
apiVersion: external-secrets.io/v1beta1
4+
kind: ClusterSecretStore
5+
metadata:
6+
name: {{ $name }}
7+
spec:
8+
provider:
9+
doppler:
10+
project: {{ required (printf "ClusterSecretStore %v must specify which project it has access to within doppler." $spec.project) $spec.project }}
11+
config: {{ required (printf "ClusterSecretStore %v must specify which config it has access to within a project." $spec.config) $spec.config }}
12+
auth:
13+
secretRef:
14+
dopplerToken:
15+
name: {{ if hasKey $spec "overrideDopplerTokenName" }}{{ $spec.overrideDopplerTokenName }}{{ else }}doppler-token-auth-api{{ end }}
16+
key: {{ if hasKey $spec "overrideDopplerTokenKey" }}{{ $spec.overrideDopplerTokenKey }}{{ else }}dopplerToken{{ end }}
17+
namespace: {{ if hasKey $spec "overrideDopplerTokenNamespace" }}{{ $spec.overrideDopplerTokenNamespace }}{{ else }}external-secrets{{ end }}
18+
conditions:
19+
- namespaces:
20+
{{- if hasKey $spec "namespaces" }}
21+
{{- range $namespace := $spec.namespaces }}
22+
- {{ $namespace }}
23+
{{- end }}
24+
{{- if not (has $.Release.Namespace $spec.namespaces) }}
25+
- {{ $.Release.Namespace }}
26+
{{- end }}
27+
{{- else }}
28+
- {{ $.Release.Namespace }}
29+
{{- end }}
30+
{{- end }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{{- range $name, $spec := .Values.coreweave.externalSecrets }}
2+
---
3+
apiVersion: external-secrets.io/v1beta1
4+
kind: ExternalSecret
5+
metadata:
6+
name: {{ $name }}
7+
namespace: {{ $.Release.Namespace }}
8+
spec:
9+
refreshInterval: {{ if $spec.refreshInterval }}{{ $spec.refreshInterval }}{{ else }}60s{{ end }}
10+
secretStoreRef:
11+
name: {{ $spec.secretStoreName }}
12+
kind: ClusterSecretStore
13+
target:
14+
name: {{ $name }}
15+
{{- if $spec.data }}
16+
data:
17+
{{- $spec.data | toYaml | nindent 4 }}
18+
{{- else if $spec.dataFrom }}
19+
dataFrom:
20+
{{- $spec.dataFrom | toYaml | nindent 4 }}
21+
{{- else }}
22+
{{ fail "Secrets must have either a 'data' or 'dataFrom' definition." }}
23+
{{- end }}
24+
{{- end }}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{{- range .Values.calicoNetworkPolicy }}
2+
---
3+
apiVersion: crd.projectcalico.org/v1
4+
kind: NetworkPolicy
5+
metadata:
6+
name: {{ .name }}
7+
namespace: {{ $.Release.Namespace }}
8+
annotations: {{ .annotations | toYaml | nindent 4 }}
9+
labels: {{ .labels | toYaml | nindent 4 }}
10+
spec:
11+
{{- if .selector }}
12+
selector: {{ .selector }}
13+
{{- end }}
14+
{{- if .egress }}
15+
egress: {{ .egress | toYaml | nindent 4 }}
16+
{{- end }}
17+
{{- if .ingress }}
18+
ingress: {{ .ingress | toYaml | nindent 4 }}
19+
{{- end }}
20+
order: {{ default 200 .order }}
21+
types:
22+
{{- if .egress }}
23+
- Egress
24+
{{- end }}
25+
{{- if .ingress }}
26+
- Ingress
27+
{{- end }}
28+
{{- end }}
29+
30+
{{- range .Values.kubernetesNetworkPolicy }}
31+
---
32+
apiVersion: networking.k8s.io/v1
33+
kind: NetworkPolicy
34+
metadata:
35+
name: {{ .name }}
36+
namespace: {{ $.Release.Namespace }}
37+
annotations: {{ .annotations | toYaml | nindent 4 }}
38+
labels: {{ .labels | toYaml | nindent 4 }}
39+
spec:
40+
{{- if .podSelector }}
41+
podSelector: {{ .podSelector }}
42+
{{- end }}
43+
{{- if .egress }}
44+
egress: {{ .egress | toYaml | nindent 4 }}
45+
{{- end }}
46+
{{- if .ingress }}
47+
ingress: {{ .ingress | toYaml | nindent 4 }}
48+
{{- end }}
49+
{{- if .policyTypes }}
50+
policyTypes: {{ .policyTypes | toYaml | nindent 4 }}
51+
{{- end }}
52+
{{- end }}

0 commit comments

Comments
 (0)