diff --git a/Firefly/k8s-cluster/copyDBK8S b/Firefly/k8s-cluster/copyDBK8S index dfdc92d2..62a47c39 100755 --- a/Firefly/k8s-cluster/copyDBK8S +++ b/Firefly/k8s-cluster/copyDBK8S @@ -8,7 +8,8 @@ echo "Current date: $today" # destination folder (change to your own needs) -BACKUP_FOLDER=/tmp +#BACKUP_FOLDER=/tmp +BACKUP_FOLDER=/mnt/Externo/copiasFF file_name=$BACKUP_FOLDER/bkup_fireflyiii new_name=$file_name-$today.sql @@ -20,4 +21,4 @@ message="Backup stored "$today sudo -u creylopez cat $new_name | mail -s "FireflyIII backup finished" "creylopez@yahoo.es" -sudo rm $new_name +#sudo rm $new_name diff --git a/HelmCharts/mealie-chart/.helmignore b/HelmCharts/mealie-chart/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/HelmCharts/mealie-chart/.helmignore @@ -0,0 +1,23 @@ +# 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 +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/HelmCharts/mealie-chart/Chart.yaml b/HelmCharts/mealie-chart/Chart.yaml new file mode 100644 index 00000000..c6cd8b72 --- /dev/null +++ b/HelmCharts/mealie-chart/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: mealie-chart +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/HelmCharts/mealie-chart/templates/mealie-claim0-persistentvolumeclaim.yaml b/HelmCharts/mealie-chart/templates/mealie-claim0-persistentvolumeclaim.yaml new file mode 100644 index 00000000..fb378846 --- /dev/null +++ b/HelmCharts/mealie-chart/templates/mealie-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: mealie-claim0 + name: mealie-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi +status: {} diff --git a/HelmCharts/mealie-chart/templates/mealie-deployment.yaml b/HelmCharts/mealie-chart/templates/mealie-deployment.yaml new file mode 100644 index 00000000..86e6beaf --- /dev/null +++ b/HelmCharts/mealie-chart/templates/mealie-deployment.yaml @@ -0,0 +1,60 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: mealie + name: mealie +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: mealie + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: mealie + spec: + containers: + - env: + - name: PGID + value: "1000" + - name: PUID + value: "1000" + - name: RECIPE_DISABLE_AMOUNT + value: "false" + - name: RECIPE_DISABLE_COMMENTS + value: "false" + - name: RECIPE_LANDSCAPE_VIEW + value: "true" + - name: RECIPE_PUBLIC + value: "true" + - name: RECIPE_SHOW_ASSETS + value: "true" + - name: RECIPE_SHOW_NUTRITION + value: "true" + - name: TZ + value: Europe/Madrid + image: hkotel/mealie:latest + name: mealie + ports: + - containerPort: 80 + resources: {} + volumeMounts: + - mountPath: /app/data + name: mealie-claim0 + restartPolicy: Always + volumes: + - name: mealie-claim0 + persistentVolumeClaim: + claimName: mealie-claim0 +status: {} diff --git a/HelmCharts/mealie-chart/templates/mealie-service.yaml b/HelmCharts/mealie-chart/templates/mealie-service.yaml new file mode 100644 index 00000000..f1cb33ca --- /dev/null +++ b/HelmCharts/mealie-chart/templates/mealie-service.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: mealie + name: mealie +spec: + type: NodePort + ports: + - name: "9925" + port: 9925 + nodePort: 30825 + targetPort: 80 + selector: + io.kompose.service: mealie +status: + loadBalancer: {} diff --git a/HelmCharts/mealie-chart/templates/pv-local-mealie.yaml b/HelmCharts/mealie-chart/templates/pv-local-mealie.yaml new file mode 100644 index 00000000..efaf1b64 --- /dev/null +++ b/HelmCharts/mealie-chart/templates/pv-local-mealie.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: mealie-folder +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/mealie/data" + diff --git a/HelmCharts/mealie-chart/values.yaml b/HelmCharts/mealie-chart/values.yaml new file mode 100644 index 00000000..1de36967 --- /dev/null +++ b/HelmCharts/mealie-chart/values.yaml @@ -0,0 +1,82 @@ +# Default values for mediawiki-chart. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: nginx + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [reg-cred-secret] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: NodePort + 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 + +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 + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/termina.sh b/termina.sh new file mode 100644 index 00000000..cd8b1b07 --- /dev/null +++ b/termina.sh @@ -0,0 +1 @@ +kubectl patch pv pgadmin-data -p '{"metadata":{"finalizers":null}}'