generated from onedr0p/cluster-template
-
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.
feat(storage): make one samba ss for kantai3 node
Since a samba server uses a host port, there can only be one per node. This patch reworks storage to have a single samba server on kantai3 (nee kaidame), and adds the homeassistant-backup share to it, in addition to the existing and initial media1 share.
- Loading branch information
Showing
14 changed files
with
120 additions
and
162 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
37 changes: 37 additions & 0 deletions
37
kubernetes/apps/storage/kantai3-samba/app/externalsecret.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,37 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: kantai3-samba | ||
spec: | ||
secretStoreRef: | ||
kind: ClusterSecretStore | ||
name: onepassword | ||
target: | ||
name: kantai3-samba | ||
template: | ||
data: | ||
users.json: |- | ||
{ | ||
"samba-container-config": "v0", | ||
"users": { | ||
{{- $users := list }} | ||
{{- $users = append $users (dict "name" .a_username "password" .a_password "uid" (.a_uid | atoi) "gid" (.a_gid | atoi)) }} | ||
{{- $users = append $users (dict "name" .b_username "password" .b_password "uid" (.b_uid | atoi) "gid" (.b_gid | atoi)) }} | ||
"all_entries": {{ $users | toJson }} | ||
} | ||
} | ||
dataFrom: | ||
- extract: | ||
key: smb:media-owner | ||
rewrite: | ||
- regexp: | ||
source: "(.*)" | ||
target: "a_$1" | ||
- extract: | ||
key: smb:homeassistant | ||
rewrite: | ||
- regexp: | ||
source: "(.*)" | ||
target: "b_$1" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: zfs-media1 | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: 50Ti | ||
storageClassName: "" | ||
volumeMode: Filesystem | ||
volumeName: storage-zfs-media1 | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: homeassistant-backup | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: 108Gi | ||
storageClassName: "" | ||
volumeMode: Filesystem | ||
volumeName: homeassistant-backup |
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,23 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: &app kantai3-samba | ||
namespace: flux-system | ||
spec: | ||
targetNamespace: storage | ||
commonMetadata: | ||
labels: | ||
app.kubernetes.io/name: *app | ||
dependsOn: | ||
- name: external-secrets-stores | ||
- name: openebs-zfs-volumes | ||
path: ./kubernetes/apps/storage/kantai3-samba/app | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: home-kubernetes | ||
wait: false | ||
interval: 30m | ||
retryInterval: 1m |
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 was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
kubernetes/apps/storage/zfs-media1/smb/externalsecret.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
kubernetes/apps/storage/zfs-media1/snapshot/kustomization.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.