-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from tegridy-io/initial-release
Initial release
- Loading branch information
Showing
11 changed files
with
256 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
parameters: | ||
local_path_provisioner: | ||
=_metadata: {} | ||
|
||
namespace: syn-local-path-provisioner | ||
|
||
charts: | ||
local_path_provisioner: | ||
source: https://github.com/rancher/local-path-provisioner.git | ||
version: v0.0.24 | ||
|
||
helmValues: | ||
storageClass: | ||
name: local-path | ||
nodePathMap: | ||
- node: DEFAULT_PATH_FOR_NON_LISTED_NODES | ||
paths: | ||
- /var/lib/local-storage | ||
resources: | ||
requests: | ||
cpu: 50m | ||
memory: 128Mi | ||
limits: | ||
memory: 128Mi | ||
image: | ||
tag: v0.0.24 |
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 |
---|---|---|
@@ -1,10 +1,21 @@ | ||
// main template for local-path-provisioner | ||
// main template for rook-mini | ||
local kap = import 'lib/kapitan.libjsonnet'; | ||
local kube = import 'lib/kube.libjsonnet'; | ||
local prom = import 'lib/prometheus.libsonnet'; | ||
local inv = kap.inventory(); | ||
// The hiera parameters for the component | ||
local params = inv.parameters.local_path_provisioner; | ||
local hasPrometheus = std.member(inv.applications, 'prometheus'); | ||
|
||
local namespace = kube.Namespace(params.namespace) + { | ||
metadata+: { | ||
labels+: { | ||
'pod-security.kubernetes.io/enforce': 'privileged', | ||
}, | ||
}, | ||
}; | ||
|
||
// Define outputs below | ||
{ | ||
'00_namespace': if hasPrometheus then prom.RegisterNamespace(namespace) else namespace, | ||
} |
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 |
---|---|---|
@@ -1,3 +1,12 @@ | ||
# Overwrite parameters here | ||
applications: | ||
- prometheus | ||
|
||
# parameters: {...} | ||
parameters: | ||
kapitan: | ||
dependencies: | ||
- type: https | ||
source: https://raw.githubusercontent.com/projectsyn/component-prometheus/master/lib/prometheus.libsonnet | ||
output_path: vendor/lib/prometheus.libsonnet | ||
|
||
prometheus: | ||
defaultInstance: system |
9 changes: 9 additions & 0 deletions
9
tests/golden/defaults/local-path-provisioner/local-path-provisioner/00_namespace.yaml
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,9 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
annotations: {} | ||
labels: | ||
monitoring.syn.tools/system: 'true' | ||
name: syn-local-path-provisioner | ||
pod-security.kubernetes.io/enforce: privileged | ||
name: syn-local-path-provisioner |
44 changes: 44 additions & 0 deletions
44
...ner/local-path-provisioner/10_helmchart/local-path-provisioner/templates/clusterrole.yaml
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,44 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: local-path-provisioner | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: local-path-provisioner | ||
app.kubernetes.io/version: v0.0.24 | ||
helm.sh/chart: local-path-provisioner-0.0.24 | ||
name: local-path-provisioner | ||
rules: | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- nodes | ||
- persistentvolumeclaims | ||
- configmaps | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- endpoints | ||
- persistentvolumes | ||
- pods | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- events | ||
verbs: | ||
- create | ||
- patch | ||
- apiGroups: | ||
- storage.k8s.io | ||
resources: | ||
- storageclasses | ||
verbs: | ||
- get | ||
- list | ||
- watch |
18 changes: 18 additions & 0 deletions
18
...al-path-provisioner/10_helmchart/local-path-provisioner/templates/clusterrolebinding.yaml
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,18 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: local-path-provisioner | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: local-path-provisioner | ||
app.kubernetes.io/version: v0.0.24 | ||
helm.sh/chart: local-path-provisioner-0.0.24 | ||
name: local-path-provisioner | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: local-path-provisioner | ||
subjects: | ||
- kind: ServiceAccount | ||
name: local-path-provisioner | ||
namespace: syn-local-path-provisioner |
42 changes: 42 additions & 0 deletions
42
...ioner/local-path-provisioner/10_helmchart/local-path-provisioner/templates/configmap.yaml
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,42 @@ | ||
apiVersion: v1 | ||
data: | ||
config.json: |- | ||
{ | ||
"nodePathMap": [ | ||
{ | ||
"node": "DEFAULT_PATH_FOR_NON_LISTED_NODES", | ||
"paths": [ | ||
"/var/lib/local-storage" | ||
] | ||
} | ||
] | ||
} | ||
helperPod.yaml: |- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: helper-pod | ||
spec: | ||
containers: | ||
- name: helper-pod | ||
image: busybox:latest | ||
imagePullPolicy: IfNotPresent | ||
setup: |2- | ||
#!/bin/sh | ||
set -eu | ||
mkdir -m 0777 -p "$VOL_DIR" | ||
teardown: |2- | ||
#!/bin/sh | ||
set -eu | ||
rm -rf "$VOL_DIR" | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: local-path-provisioner | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: local-path-provisioner | ||
app.kubernetes.io/version: v0.0.24 | ||
helm.sh/chart: local-path-provisioner-0.0.24 | ||
name: local-path-config |
57 changes: 57 additions & 0 deletions
57
...oner/local-path-provisioner/10_helmchart/local-path-provisioner/templates/deployment.yaml
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,57 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: local-path-provisioner | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: local-path-provisioner | ||
app.kubernetes.io/version: v0.0.24 | ||
helm.sh/chart: local-path-provisioner-0.0.24 | ||
name: local-path-provisioner | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/instance: local-path-provisioner | ||
app.kubernetes.io/name: local-path-provisioner | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: local-path-provisioner | ||
app.kubernetes.io/name: local-path-provisioner | ||
spec: | ||
containers: | ||
- command: | ||
- local-path-provisioner | ||
- --debug | ||
- start | ||
- --config | ||
- /etc/config/config.json | ||
- --service-account-name | ||
- local-path-provisioner | ||
- --provisioner-name | ||
- cluster.local/local-path-provisioner | ||
- --helper-image | ||
- busybox:latest | ||
- --configmap-name | ||
- local-path-config | ||
env: | ||
- name: POD_NAMESPACE | ||
value: syn-local-path-provisioner | ||
image: rancher/local-path-provisioner:v0.0.24 | ||
imagePullPolicy: IfNotPresent | ||
name: local-path-provisioner | ||
resources: | ||
limits: | ||
memory: 128Mi | ||
requests: | ||
cpu: 50m | ||
memory: 128Mi | ||
volumeMounts: | ||
- mountPath: /etc/config/ | ||
name: config-volume | ||
serviceAccountName: local-path-provisioner | ||
volumes: | ||
- configMap: | ||
name: local-path-config | ||
name: config-volume |
11 changes: 11 additions & 0 deletions
11
.../local-path-provisioner/10_helmchart/local-path-provisioner/templates/serviceaccount.yaml
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,11 @@ | ||
apiVersion: v1 | ||
imagePullSecrets: null | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: local-path-provisioner | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: local-path-provisioner | ||
app.kubernetes.io/version: v0.0.24 | ||
helm.sh/chart: local-path-provisioner-0.0.24 | ||
name: local-path-provisioner |
14 changes: 14 additions & 0 deletions
14
...er/local-path-provisioner/10_helmchart/local-path-provisioner/templates/storageclass.yaml
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,14 @@ | ||
allowVolumeExpansion: true | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
labels: | ||
app.kubernetes.io/instance: local-path-provisioner | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/name: local-path-provisioner | ||
app.kubernetes.io/version: v0.0.24 | ||
helm.sh/chart: local-path-provisioner-0.0.24 | ||
name: local-path | ||
provisioner: cluster.local/local-path-provisioner | ||
reclaimPolicy: Delete | ||
volumeBindingMode: WaitForFirstConsumer |