From 57f60c3347d3405a177df811822a6ed606a25f3b Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Tue, 28 Nov 2023 10:41:41 +0100 Subject: [PATCH] =?UTF-8?q?A=C3=B1ado=20calibre-server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Calibre-server/docker-calibre-server | 1 + HelmCharts/calibre-chart/.helmignore | 23 ++++++ HelmCharts/calibre-chart/Chart.yaml | 24 ++++++ .../calibre-claim0-persistentvolumeclaim.yaml | 15 ++++ .../templates/calibre-deployment.yaml | 38 +++++++++ .../templates/calibre-service.yaml | 18 ++++ .../templates/pv-local-calibre.yaml | 23 ++++++ .../templates/registry-secrets.yaml | 11 +++ HelmCharts/calibre-chart/values.yaml | 82 +++++++++++++++++++ 9 files changed, 235 insertions(+) create mode 160000 Calibre-server/docker-calibre-server create mode 100644 HelmCharts/calibre-chart/.helmignore create mode 100644 HelmCharts/calibre-chart/Chart.yaml create mode 100644 HelmCharts/calibre-chart/templates/calibre-claim0-persistentvolumeclaim.yaml create mode 100644 HelmCharts/calibre-chart/templates/calibre-deployment.yaml create mode 100644 HelmCharts/calibre-chart/templates/calibre-service.yaml create mode 100644 HelmCharts/calibre-chart/templates/pv-local-calibre.yaml create mode 100644 HelmCharts/calibre-chart/templates/registry-secrets.yaml create mode 100644 HelmCharts/calibre-chart/values.yaml diff --git a/Calibre-server/docker-calibre-server b/Calibre-server/docker-calibre-server new file mode 160000 index 00000000..f1482b45 --- /dev/null +++ b/Calibre-server/docker-calibre-server @@ -0,0 +1 @@ +Subproject commit f1482b4579a16540fd63cdccda7d9887f7061e7e diff --git a/HelmCharts/calibre-chart/.helmignore b/HelmCharts/calibre-chart/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/HelmCharts/calibre-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/calibre-chart/Chart.yaml b/HelmCharts/calibre-chart/Chart.yaml new file mode 100644 index 00000000..db01ad98 --- /dev/null +++ b/HelmCharts/calibre-chart/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: calibre-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/calibre-chart/templates/calibre-claim0-persistentvolumeclaim.yaml b/HelmCharts/calibre-chart/templates/calibre-claim0-persistentvolumeclaim.yaml new file mode 100644 index 00000000..1c094c16 --- /dev/null +++ b/HelmCharts/calibre-chart/templates/calibre-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: calibre-claim0 + name: calibre-claim0 + namespace: calibre +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi +status: {} diff --git a/HelmCharts/calibre-chart/templates/calibre-deployment.yaml b/HelmCharts/calibre-chart/templates/calibre-deployment.yaml new file mode 100644 index 00000000..45c63f24 --- /dev/null +++ b/HelmCharts/calibre-chart/templates/calibre-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + io.kompose.service: calibre + name: calibre + namespace: calibre +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: calibre + strategy: + type: Recreate + template: + metadata: + creationTimestamp: null + labels: + io.kompose.service: calibre + spec: + containers: + - image: docker-registry:32000/calibre:7 + name: calibre + ports: + - containerPort: 8080 + resources: {} + volumeMounts: + - mountPath: /opt/calibre/calibre-library + name: calibre-claim0 + restartPolicy: Always + imagePullSecrets: + - name: reg-cred-secret + volumes: + - name: calibre-claim0 + persistentVolumeClaim: + claimName: calibre-claim0 +status: {} diff --git a/HelmCharts/calibre-chart/templates/calibre-service.yaml b/HelmCharts/calibre-chart/templates/calibre-service.yaml new file mode 100644 index 00000000..13caf1c6 --- /dev/null +++ b/HelmCharts/calibre-chart/templates/calibre-service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: calibre + name: calibre + namespace: calibre +spec: + type: NodePort + ports: + - name: "8080" + port: 8080 + nodePort: 30830 + targetPort: 8080 + selector: + io.kompose.service: calibre +status: + loadBalancer: {} diff --git a/HelmCharts/calibre-chart/templates/pv-local-calibre.yaml b/HelmCharts/calibre-chart/templates/pv-local-calibre.yaml new file mode 100644 index 00000000..dc1e5680 --- /dev/null +++ b/HelmCharts/calibre-chart/templates/pv-local-calibre.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: calibre-library +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/calibre/calibre-library" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: calibre-data +spec: + capacity: + storage: 5Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/calibre/calibre-data" diff --git a/HelmCharts/calibre-chart/templates/registry-secrets.yaml b/HelmCharts/calibre-chart/templates/registry-secrets.yaml new file mode 100644 index 00000000..0ff04a6e --- /dev/null +++ b/HelmCharts/calibre-chart/templates/registry-secrets.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +data: + .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXItcmVnaXN0cnk6MzIwMDAiOnsidXNlcm5hbWUiOiJjcmV5bG9wZXoiLCJwYXNzd29yZCI6IlJleS0xMTc2IiwiYXV0aCI6IlkzSmxlV3h2Y0dWNk9sSmxlUzB4TVRjMiJ9fX0= +kind: Secret +metadata: + creationTimestamp: "2023-01-29T10:54:14Z" + name: reg-cred-secret + namespace: calibre + resourceVersion: "19890385" + uid: 66b3b7c5-26c1-4e5a-af4e-dc973aaafe4b +type: kubernetes.io/dockerconfigjson diff --git a/HelmCharts/calibre-chart/values.yaml b/HelmCharts/calibre-chart/values.yaml new file mode 100644 index 00000000..d57a0c41 --- /dev/null +++ b/HelmCharts/calibre-chart/values.yaml @@ -0,0 +1,82 @@ +# Default values for calibre-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: {}