From 9606c72933c3d7a90830fe2f566714040e0d23bd Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Tue, 13 Feb 2024 08:11:33 +0100 Subject: [PATCH] =?UTF-8?q?Arreglo=20en=20crear=20repostajes=20para=20deci?= =?UTF-8?q?males=20y=20a=C3=B1ado=20onlyoffice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Docker-DocumentServer | 1 + HelmCharts/onlyoffice-chart/.helmignore | 23 ++++++ HelmCharts/onlyoffice-chart/Chart.yaml | 24 ++++++ ...ntserver-claim0-persistentvolumeclaim.yaml | 14 ++++ ...ntserver-claim1-persistentvolumeclaim.yaml | 14 ++++ ...ntserver-claim2-persistentvolumeclaim.yaml | 14 ++++ ...ntserver-claim3-persistentvolumeclaim.yaml | 14 ++++ ...ntserver-claim4-persistentvolumeclaim.yaml | 14 ++++ .../onlyoffice-documentserver-deployment.yaml | 77 +++++++++++++++++ .../onlyoffice-documentserver-service.yaml | 26 ++++++ .../onlyoffice-postgresql-deployment.yaml | 48 +++++++++++ .../onlyoffice-postgresql-service.yaml | 21 +++++ .../onlyoffice-rabbitmq-deployment.yaml | 33 ++++++++ .../onlyoffice-rabbitmq-service.yaml | 21 +++++ ...postgresql-data-persistentvolumeclaim.yaml | 14 ++++ .../templates/pv-local-onlyoffice-cache.yaml | 14 ++++ .../templates/pv-local-onlyoffice-data.yaml | 14 ++++ .../templates/pv-local-onlyoffice-fonts.yaml | 14 ++++ .../templates/pv-local-onlyoffice-log.yaml | 14 ++++ .../templates/pv-local-onlyoffice-pgdata.yaml | 14 ++++ .../templates/pv-local-onlyoffice-public.yaml | 14 ++++ HelmCharts/onlyoffice-chart/values.yaml | 82 +++++++++++++++++++ .../gestionrepostajes/crearrepostaje.php | 8 +- 23 files changed, 529 insertions(+), 3 deletions(-) create mode 160000 Docker-DocumentServer create mode 100644 HelmCharts/onlyoffice-chart/.helmignore create mode 100644 HelmCharts/onlyoffice-chart/Chart.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim0-persistentvolumeclaim.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim1-persistentvolumeclaim.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim2-persistentvolumeclaim.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim3-persistentvolumeclaim.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim4-persistentvolumeclaim.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-deployment.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-service.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-deployment.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-service.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-deployment.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-service.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/postgresql-data-persistentvolumeclaim.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-cache.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-data.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-fonts.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-log.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-pgdata.yaml create mode 100644 HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-public.yaml create mode 100644 HelmCharts/onlyoffice-chart/values.yaml diff --git a/Docker-DocumentServer b/Docker-DocumentServer new file mode 160000 index 00000000..40efc5be --- /dev/null +++ b/Docker-DocumentServer @@ -0,0 +1 @@ +Subproject commit 40efc5bea9d7c652f6e00a2a95e7027c1130f64b diff --git a/HelmCharts/onlyoffice-chart/.helmignore b/HelmCharts/onlyoffice-chart/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/HelmCharts/onlyoffice-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/onlyoffice-chart/Chart.yaml b/HelmCharts/onlyoffice-chart/Chart.yaml new file mode 100644 index 00000000..e8678d7a --- /dev/null +++ b/HelmCharts/onlyoffice-chart/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: onlyoffice-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/onlyoffice-chart/templates/onlyoffice-documentserver-claim0-persistentvolumeclaim.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim0-persistentvolumeclaim.yaml new file mode 100644 index 00000000..2f7ad791 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-documentserver-claim0 + name: onlyoffice-documentserver-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 15Gi +status: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim1-persistentvolumeclaim.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim1-persistentvolumeclaim.yaml new file mode 100644 index 00000000..78256ef0 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim1-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-documentserver-claim1 + name: onlyoffice-documentserver-claim1 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi +status: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim2-persistentvolumeclaim.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim2-persistentvolumeclaim.yaml new file mode 100644 index 00000000..217a04c0 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim2-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-documentserver-claim2 + name: onlyoffice-documentserver-claim2 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 4Gi +status: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim3-persistentvolumeclaim.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim3-persistentvolumeclaim.yaml new file mode 100644 index 00000000..0f27a48a --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim3-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-documentserver-claim3 + name: onlyoffice-documentserver-claim3 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 3Gi +status: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim4-persistentvolumeclaim.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim4-persistentvolumeclaim.yaml new file mode 100644 index 00000000..9c281273 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-claim4-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-documentserver-claim4 + name: onlyoffice-documentserver-claim4 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi +status: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-deployment.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-deployment.yaml new file mode 100644 index 00000000..b26ba947 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-deployment.yaml @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-documentserver + name: onlyoffice-documentserver +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: onlyoffice-documentserver + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-documentserver + spec: + containers: + - env: + - name: AMQP_URI + value: amqp://guest:guest@onlyoffice-rabbitmq + - name: DB_HOST + value: onlyoffice-postgresql + - name: DB_NAME + value: onlyoffice + - name: DB_PORT + value: "5432" + - name: DB_TYPE + value: postgres + - name: DB_USER + value: onlyoffice + image: onlyoffice/documentserver + name: onlyoffice-documentserver + ports: + - containerPort: 80 + - containerPort: 443 + resources: {} + stdin: true + volumeMounts: + - mountPath: /var/www/onlyoffice/Data + name: onlyoffice-documentserver-claim0 + - mountPath: /var/log/onlyoffice + name: onlyoffice-documentserver-claim1 + - mountPath: /var/lib/onlyoffice/documentserver/App_Data/cache/files + name: onlyoffice-documentserver-claim2 + - mountPath: /var/www/onlyoffice/documentserver-example/public/files + name: onlyoffice-documentserver-claim3 + - mountPath: /usr/share/fonts + name: onlyoffice-documentserver-claim4 + restartPolicy: Always + terminationGracePeriodSeconds: 60 + volumes: + - name: onlyoffice-documentserver-claim0 + persistentVolumeClaim: + claimName: onlyoffice-documentserver-claim0 + - name: onlyoffice-documentserver-claim1 + persistentVolumeClaim: + claimName: onlyoffice-documentserver-claim1 + - name: onlyoffice-documentserver-claim2 + persistentVolumeClaim: + claimName: onlyoffice-documentserver-claim2 + - name: onlyoffice-documentserver-claim3 + persistentVolumeClaim: + claimName: onlyoffice-documentserver-claim3 + - name: onlyoffice-documentserver-claim4 + persistentVolumeClaim: + claimName: onlyoffice-documentserver-claim4 +status: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-service.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-service.yaml new file mode 100644 index 00000000..fb262c0c --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-documentserver-service.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-documentserver + name: onlyoffice-documentserver + namespace: onlyoffice +spec: + type: NodePort + ports: + - name: "80" + port: 80 + nodePort: 30590 + targetPort: 80 + - name: "443" + port: 443 + nodePort: 30591 + targetPort: 443 + selector: + io.kompose.service: onlyoffice-documentserver +status: + loadBalancer: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-deployment.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-deployment.yaml new file mode 100644 index 00000000..11b8a3d5 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-deployment.yaml @@ -0,0 +1,48 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-postgresql + name: onlyoffice-postgresql +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: onlyoffice-postgresql + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-postgresql + spec: + containers: + - env: + - name: POSTGRES_DB + value: onlyoffice + - name: POSTGRES_HOST_AUTH_METHOD + value: trust + - name: POSTGRES_USER + value: onlyoffice + image: postgres:12 + name: onlyoffice-postgresql + ports: + - containerPort: 5432 + resources: {} + volumeMounts: + - mountPath: /var/lib/postgresql + name: postgresql-data + restartPolicy: Always + volumes: + - name: postgresql-data + persistentVolumeClaim: + claimName: postgresql-data +status: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-service.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-service.yaml new file mode 100644 index 00000000..fbf68c45 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-postgresql-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: onlyoffice-postgresql + name: onlyoffice-postgresql +spec: + type: NodePort + ports: + - name: "5432" + port: 5432 + nodePort: 30592 + targetPort: 5432 + selector: + io.kompose.service: onlyoffice-postgresql +status: + loadBalancer: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-deployment.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-deployment.yaml new file mode 100644 index 00000000..de203282 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-deployment.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-rabbitmq + name: onlyoffice-rabbitmq +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: onlyoffice-rabbitmq + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: onlyoffice-rabbitmq + spec: + containers: + - image: rabbitmq + name: onlyoffice-rabbitmq + ports: + - containerPort: 5672 + resources: {} + restartPolicy: Always +status: {} diff --git a/HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-service.yaml b/HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-service.yaml new file mode 100644 index 00000000..aa1201bc --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/onlyoffice-rabbitmq-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: onlyoffice-rabbitmq + name: onlyoffice-rabbitmq +spec: + type: NodePort + ports: + - name: "5672" + port: 5672 + nodePort: 30593 + targetPort: 5672 + selector: + io.kompose.service: onlyoffice-rabbitmq +status: + loadBalancer: {} diff --git a/HelmCharts/onlyoffice-chart/templates/postgresql-data-persistentvolumeclaim.yaml b/HelmCharts/onlyoffice-chart/templates/postgresql-data-persistentvolumeclaim.yaml new file mode 100644 index 00000000..4f0e6dc5 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/postgresql-data-persistentvolumeclaim.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: postgresql-data + name: postgresql-data +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 25Gi +status: {} diff --git a/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-cache.yaml b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-cache.yaml new file mode 100644 index 00000000..98ba782f --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-cache.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: onlyoffice-cache-folder + labels: + app: onlyoffice +spec: + capacity: + storage: 4Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/onlyoffice/Cache" + diff --git a/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-data.yaml b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-data.yaml new file mode 100644 index 00000000..42d2cf88 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-data.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: onlyoffice-data-folder + labels: + app: onlyoffice +spec: + capacity: + storage: 15Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/onlyoffice/Data" + diff --git a/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-fonts.yaml b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-fonts.yaml new file mode 100644 index 00000000..c2b25bae --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-fonts.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: onlyoffice-fonts-folder + labels: + app: onlyoffice +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/onlyoffice/Fonts" + diff --git a/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-log.yaml b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-log.yaml new file mode 100644 index 00000000..5e7f5d0b --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-log.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: onlyoffice-log-folder + labels: + app: onlyoffice +spec: + capacity: + storage: 5Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/onlyoffice/Log" + diff --git a/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-pgdata.yaml b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-pgdata.yaml new file mode 100644 index 00000000..e29a5c3c --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-pgdata.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: onlyoffice-pgdata-folder + labels: + app: onlyoffice +spec: + capacity: + storage: 25Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/onlyoffice/PG_Data" + diff --git a/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-public.yaml b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-public.yaml new file mode 100644 index 00000000..b54236e9 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/templates/pv-local-onlyoffice-public.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: onlyoffice-public-folder + labels: + app: onlyoffice +spec: + capacity: + storage: 3Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/onlyoffice/public" + diff --git a/HelmCharts/onlyoffice-chart/values.yaml b/HelmCharts/onlyoffice-chart/values.yaml new file mode 100644 index 00000000..6e79b583 --- /dev/null +++ b/HelmCharts/onlyoffice-chart/values.yaml @@ -0,0 +1,82 @@ +# Default values for onlyoffice-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: [] +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: ClusterIP + 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/Repostajes/gestionrepostajes/crearrepostaje.php b/Repostajes/gestionrepostajes/crearrepostaje.php index c7853077..22020f27 100755 --- a/Repostajes/gestionrepostajes/crearrepostaje.php +++ b/Repostajes/gestionrepostajes/crearrepostaje.php @@ -45,9 +45,11 @@ if (isset($_POST['submit'])) { // Calcula el precio por litro //$total = floatval($_POST['importe']); - $total=floatval(str_replace(',', '.', str_replace('.', '', $_POST['importe']))); + //$total=floatval(str_replace(',', '.', str_replace('.', '', $_POST['importe']))); + $total = floatval($_POST['importe']); - $cantidad = floatval(str_replace(',', '.', str_replace('.', '', $_POST['litros']))); + //$cantidad = floatval(str_replace(',', '.', str_replace('.', '', $_POST['litros']))); + $cantidad = floatval($_POST['litros']); if(empty($_POST['dtoing'])) { $dto = 0; @@ -95,7 +97,7 @@ if (isset($_POST['submit'])) { * Logs */ - $log_msg='CREA REPOSTAJE-> Descuento: '.$dto.'. Total con descuento: '.$totalcondto.'. Total introducido: '.$_POST['importe'].'. Kilometros anteriores: '.$kmsanteriores.'. Kilometros recorridos: '.$kmsrecorridos; + $log_msg='CREA REPOSTAJE-> Litros: '.$cantidad.' Descuento: '.$dto.'. Total con descuento: '.$totalcondto.'. Total introducido: '.$_POST['importe'].'. Kilometros anteriores: '.$kmsanteriores.'. Kilometros recorridos: '.$kmsrecorridos; escribe_log($log_msg);