diff --git a/assets/harbor/harbor-1.12.3.tgz b/assets/harbor/harbor-1.12.3.tgz deleted file mode 100644 index 955510daf8..0000000000 Binary files a/assets/harbor/harbor-1.12.3.tgz and /dev/null differ diff --git a/assets/harbor/harbor-1.12.4.tgz b/assets/harbor/harbor-1.12.4.tgz deleted file mode 100644 index 86b6031669..0000000000 Binary files a/assets/harbor/harbor-1.12.4.tgz and /dev/null differ diff --git a/assets/harbor/harbor-1.13.0.tgz b/assets/harbor/harbor-1.13.0.tgz deleted file mode 100644 index 64a23bfe30..0000000000 Binary files a/assets/harbor/harbor-1.13.0.tgz and /dev/null differ diff --git a/assets/harbor/harbor-1.13.1.tgz b/assets/harbor/harbor-1.13.1.tgz deleted file mode 100644 index 37a1caf175..0000000000 Binary files a/assets/harbor/harbor-1.13.1.tgz and /dev/null differ diff --git a/assets/harbor/harbor-1.14.0.tgz b/assets/harbor/harbor-1.14.0.tgz deleted file mode 100644 index 7091f51d13..0000000000 Binary files a/assets/harbor/harbor-1.14.0.tgz and /dev/null differ diff --git a/assets/harbor/harbor-1.14.1.tgz b/assets/harbor/harbor-1.14.1.tgz deleted file mode 100644 index 1309c27159..0000000000 Binary files a/assets/harbor/harbor-1.14.1.tgz and /dev/null differ diff --git a/assets/harbor/harbor-1.14.2.tgz b/assets/harbor/harbor-1.14.2.tgz deleted file mode 100644 index c5a1edf74a..0000000000 Binary files a/assets/harbor/harbor-1.14.2.tgz and /dev/null differ diff --git a/assets/harbor/harbor-1.15.0.tgz b/assets/harbor/harbor-1.15.0.tgz deleted file mode 100644 index 8ce946ebee..0000000000 Binary files a/assets/harbor/harbor-1.15.0.tgz and /dev/null differ diff --git a/assets/harbor/harbor-1.15.1.tgz b/assets/harbor/harbor-1.15.1.tgz deleted file mode 100644 index e90a9bf3b9..0000000000 Binary files a/assets/harbor/harbor-1.15.1.tgz and /dev/null differ diff --git a/charts/harbor/harbor/1.12.3/.helmignore b/charts/harbor/harbor/1.12.3/.helmignore deleted file mode 100644 index b4424fd59b..0000000000 --- a/charts/harbor/harbor/1.12.3/.helmignore +++ /dev/null @@ -1,6 +0,0 @@ -.github/* -docs/* -.git/* -.gitignore -CONTRIBUTING.md -test/* \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/Chart.yaml b/charts/harbor/harbor/1.12.3/Chart.yaml deleted file mode 100644 index 6e427f2c9e..0000000000 --- a/charts/harbor/harbor/1.12.3/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor -apiVersion: v1 -appVersion: 2.8.3 -description: An open source trusted cloud native registry that stores, signs, and - scans content -home: https://goharbor.io -icon: https://raw.githubusercontent.com/goharbor/website/master/static/img/logos/harbor-icon-color.png -keywords: -- docker -- registry -- harbor -maintainers: -- email: yinw@vmware.com - name: Wenkai Yin -- email: hweiwei@vmware.com - name: Weiwei He -- email: yshengwen@vmware.com - name: Shengwen Yu -name: harbor -sources: -- https://github.com/goharbor/harbor -- https://github.com/goharbor/harbor-helm -version: 1.12.3 diff --git a/charts/harbor/harbor/1.12.3/LICENSE b/charts/harbor/harbor/1.12.3/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/charts/harbor/harbor/1.12.3/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/charts/harbor/harbor/1.12.3/README.md b/charts/harbor/harbor/1.12.3/README.md deleted file mode 100644 index ff353d564d..0000000000 --- a/charts/harbor/harbor/1.12.3/README.md +++ /dev/null @@ -1,420 +0,0 @@ -# Helm Chart for Harbor - -**Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be find [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. - -This repository, including the issues, focuses on deploying Harbor chart via helm. For functionality issues or Harbor questions, please open issues on [goharbor/harbor](https://github.com/goharbor/harbor) - -## Introduction - -This [Helm](https://github.com/kubernetes/helm) chart installs [Harbor](https://github.com/goharbor/harbor) in a Kubernetes cluster. Welcome to [contribute](CONTRIBUTING.md) to Helm Chart for Harbor. - -## Prerequisites - -- Kubernetes cluster 1.20+ -- Helm v3.2.0+ - -## Installation - -### Add Helm repository - -```bash -helm repo add harbor https://helm.goharbor.io -``` - -### Configure the chart - -The following items can be set via `--set` flag during installation or configured by editing the `values.yaml` directly (need to download the chart first). - -#### Configure how to expose Harbor service - -- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. - **Notes:** if TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to issue [#5291](https://github.com/goharbor/harbor/issues/5291) for details. -- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. -- **NodePort**: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. -- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. - -#### Configure the external URL - -The external URL for Harbor core service is used to: - -1. populate the docker/helm commands showed on portal -2. populate the token service URL returned to docker/notary client - -Format: `protocol://domain[:port]`. Usually: - -- if service exposed via `Ingress`, the `domain` should be the value of `expose.ingress.hosts.core` -- if service exposed via `ClusterIP`, the `domain` should be the value of `expose.clusterIP.name` -- if service exposed via `NodePort`, the `domain` should be the IP address of one Kubernetes node -- if service exposed via `LoadBalancer`, set the `domain` as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider - -If Harbor is deployed behind the proxy, set it as the URL of proxy. - -#### Configure how to persist data - -- **Disable**: The data does not survive the termination of a pod. -- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you already have existing persistent volumes to use. -- **External Storage(only for images and charts)**: For images and charts, the external storages are supported: `azure`, `gcs`, `s3` `swift` and `oss`. - -#### Configure the other items listed in [configuration](#configuration) section - -### Install the chart - -Install the Harbor helm chart with a release name `my-release`: -```bash -helm install my-release harbor/harbor -``` - -## Uninstallation - -To uninstall/delete the `my-release` deployment: -```bash -helm uninstall my-release -``` - -## Configuration - -The following table lists the configurable parameters of the Harbor chart and the default values. - -| Parameter | Description | Default | -| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| **Expose** | | | -| `expose.type` | How to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` | -| `expose.tls.enabled` | Enable TLS or not. Delete the `ssl-redirect` annotations in `expose.ingress.annotations` when TLS is disabled and `expose.type` is `ingress`. Note: if the `expose.type` is `ingress` and TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to https://github.com/goharbor/harbor/issues/5291 for details. | `true` | -| `expose.tls.certSource` | The source of the TLS certificate. Set as `auto`, `secret` or `none` and fill the information in the corresponding section: 1) auto: generate the TLS certificate automatically 2) secret: read the TLS certificate from the specified secret. The TLS certificate can be generated manually or by cert manager 3) none: configure no TLS certificate for the ingress. If the default TLS certificate is configured in the ingress controller, choose this option | `auto` | -| `expose.tls.auto.commonName` | The common name used to generate the certificate, it's necessary when the type isn't `ingress` | | -| `expose.tls.secret.secretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key | | -| `expose.tls.secret.notarySecretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key. Only needed when the `expose.type` is `ingress` | | -| `expose.ingress.hosts.core` | The host of Harbor core service in ingress rule | `core.harbor.domain` | -| `expose.ingress.hosts.notary` | The host of Harbor Notary service in ingress rule | `notary.harbor.domain` | -| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce`, `alb`, `f5-bigip` and `ncp` | `default` | -| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | | -| `expose.ingress.annotations` | The annotations used commonly for ingresses | | -| `expose.ingress.harbor.annotations` | The annotations specific to harbor ingress | {} | -| `expose.ingress.harbor.labels` | The labels specific to harbor ingress | {} | -| `expose.ingress.notary.annotations` | The annotations specific to notary ingress | {} | -| `expose.ingress.notary.labels` | The labels specific to notary ingress | {} | -| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` | -| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} | -| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.clusterIP.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.clusterIP.ports.notaryPort` | The service port Notary listens on. Only needed when `notary.enabled` is set to `true` | `4443` | -| `expose.nodePort.name` | The name of NodePort service | `harbor` | -| `expose.nodePort.ports.http.port` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.nodePort.ports.http.nodePort` | The node port Harbor listens on when serving HTTP | `30002` | -| `expose.nodePort.ports.https.port` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.ports.https.nodePort` | The node port Harbor listens on when serving HTTPS | `30003` | -| `expose.nodePort.ports.notary.port` | The service port Notary listens on. Only needed when `notary.enabled` is set to `true` | `4443` | -| `expose.nodePort.ports.notary.nodePort` | The node port Notary listens on. Only needed when `notary.enabled` is set to `true` | `30004` | -| `expose.loadBalancer.name` | The name of service | `harbor` | -| `expose.loadBalancer.IP` | The IP of the loadBalancer. It only works when loadBalancer supports assigning IP | `""` | -| `expose.loadBalancer.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.loadBalancer.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `30002` | -| `expose.loadBalancer.ports.notaryPort` | The service port Notary listens on. Only needed when `notary.enabled` is set to `true` | | -| `expose.loadBalancer.annotations` | The annotations attached to the loadBalancer service | {} | -| `expose.loadBalancer.sourceRanges` | List of IP address ranges to assign to loadBalancerSourceRanges | [] | -| **Internal TLS** | | | -| `internalTLS.enabled` | Enable TLS for the components (core, jobservice, portal, registry, trivy) | `false` | -| `internalTLS.certSource` | Method to provide TLS for the components, options are `auto`, `manual`, `secret`. | `auto` | -| `internalTLS.trustCa` | The content of trust CA, only available when `certSource` is `manual`. **Note**: all the internal certificates of the components must be issued by this CA | | -| `internalTLS.core.secretName` | The secret name for core component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.core.crt` | Content of core's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.core.key` | Content of core's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.secretName` | The secret name for jobservice component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.jobservice.crt` | Content of jobservice's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.key` | Content of jobservice's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.registry.secretName` | The secret name for registry component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.registry.crt` | Content of registry's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.registry.key` | Content of registry's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.portal.secretName` | The secret name for portal component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.portal.crt` | Content of portal's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.portal.key` | Content of portal's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.secretName` | The secret name for trivy component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.trivy.crt` | Content of trivy's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.key` | Content of trivy's TLS key file, only available when `certSource` is `manual` | | -| **IPFamily** | | | -| `ipFamily.ipv4.enabled` | if cluster is ipv4 enabled, all ipv4 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| `ipFamily.ipv6.enabled` | if cluster is ipv6 enabled, all ipv6 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| **Persistence** | | | -| `persistence.enabled` | Enable the data persistence or not | `true` | -| `persistence.resourcePolicy` | Setting it to `keep` to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted. Does not affect PVCs created for internal database and redis components. | `keep` | -| `persistence.persistentVolumeClaim.registry.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.registry.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.registry.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.registry.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.registry.size` | The size of the volume | `5Gi` | -| `persistence.persistentVolumeClaim.registry.annotations` | The annotations of the volume | | -|`persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.database.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.subPath` | The sub path used in the volume. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.accessMode` | The access mode of the volume. If external database is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.database.size` | The size of the volume. If external database is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.database.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.redis.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.subPath` | The sub path used in the volume. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.accessMode` | The access mode of the volume. If external Redis is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.redis.size` | The size of the volume. If external Redis is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.redis.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.trivy.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.trivy.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.trivy.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.trivy.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.trivy.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.trivy.annotations` | The annotations of the volume | | -| `persistence.imageChartStorage.disableredirect` | The configuration for managing redirects from content backends. For backends which not supported it (such as using minio for `s3` storage type), please set it to `true` to disable redirects. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect) for more details | `false` | -| `persistence.imageChartStorage.caBundleSecretName` | Specify the `caBundleSecretName` if the storage service uses a self-signed certificate. The secret must contain keys named `ca.crt` which will be injected into the trust store of registry's and containers. | | -| `persistence.imageChartStorage.type` | The type of storage for images and charts: `filesystem`, `azure`, `gcs`, `s3`, `swift` or `oss`. The type must be `filesystem` if you want to use persistent volumes for registry. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#storage) for more details | `filesystem` | -| `persistence.imageChartStorage.gcs.existingSecret` | An existing secret containing the gcs service account json key. The key must be gcs-key.json. | `""` | -| `persistence.imageChartStorage.gcs.useWorkloadIdentity` | A boolean to allow the use of workloadidentity in a GKE cluster. To use it, create a kubernetes service account and set the name in the key `serviceAccountName` of each component, then allow automounting the service account. | `false` | -| **General** | | | -| `externalURL` | The external URL for Harbor core service | `https://core.harbor.domain` | -| `caBundleSecretName` | The custom CA bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for core, jobservice, registry, trivy components. | | -| `uaaSecretName` | If using external UAA auth which has a self signed cert, you can provide a pre-created secret containing it under the key `ca.crt`. | | -| `imagePullPolicy` | The image pull policy | | -| `imagePullSecrets` | The imagePullSecrets names for all deployments | | -| `updateStrategy.type` | The update strategy for deployments with persistent volumes(jobservice, registry): `RollingUpdate` or `Recreate`. Set it as `Recreate` when `RWM` for volumes isn't supported | `RollingUpdate` | -| `logLevel` | The log level: `debug`, `info`, `warning`, `error` or `fatal` | `info` | -| `harborAdminPassword` | The initial password of Harbor admin. Change it from portal after launching Harbor | `Harbor12345` | -| `existingSecretAdminPassword` | The name of secret where admin password can be found. | | -| `existingSecretAdminPasswordKey` | The name of the key in the secret where to find harbor admin password Harbor | `HARBOR_ADMIN_PASSWORD` | -| `caSecretName` | The name of the secret which contains key named `ca.crt`. Setting this enables the download link on portal to download the CA certificate when the certificate isn't generated automatically | | -| `secretKey` | The key used for encryption. Must be a string of 16 chars | `not-a-secure-key` | -| `existingSecretSecretKey` | An existing secret containing the encoding secretKey | `""` | -| `proxy.httpProxy` | The URL of the HTTP proxy server | | -| `proxy.httpsProxy` | The URL of the HTTPS proxy server | | -| `proxy.noProxy` | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal | -| `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | -| `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | -| **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | -| `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | -| `nginx.image.tag` | Image tag | `dev` | -| `nginx.replicas` | The replica count | `1` | -| `nginx.revisionHistoryLimit` | The revision history limit | `10` | -| `nginx.resources` | The [resources] to allocate for container | undefined | -| `nginx.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `nginx.nodeSelector` | Node labels for pod assignment | `{}` | -| `nginx.tolerations` | Tolerations for pod assignment | `[]` | -| `nginx.affinity` | Node/Pod affinities | `{}` | -| `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | -| `nginx.priorityClassName` | The priority class to run the pod as | | -| **Portal** | | | -| `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | -| `portal.image.tag` | Tag for portal image | `dev` | -| `portal.replicas` | The replica count | `1` | -| `portal.revisionHistoryLimit` | The revision history limit | `10` | -| `portal.resources` | The [resources] to allocate for container | undefined | -| `portal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `portal.nodeSelector` | Node labels for pod assignment | `{}` | -| `portal.tolerations` | Tolerations for pod assignment | `[]` | -| `portal.affinity` | Node/Pod affinities | `{}` | -| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` | -| `portal.priorityClassName` | The priority class to run the pod as | | -| **Core** | | | -| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | -| `core.image.tag` | Tag for Harbor core image | `dev` | -| `core.replicas` | The replica count | `1` | -| `core.revisionHistoryLimit` | The revision history limit | `10` | -| `core.startupProbe.initialDelaySeconds` | The initial delay in seconds for the startup probe | `10` | -| `core.resources` | The [resources] to allocate for container | undefined | -| `core.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `core.nodeSelector` | Node labels for pod assignment | `{}` | -| `core.tolerations` | Tolerations for pod assignment | `[]` | -| `core.affinity` | Node/Pod affinities | `{}` | -| `core.podAnnotations` | Annotations to add to the core pod | `{}` | -| `core.serviceAnnotations` | Annotations to add to the core service | `{}` | -| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `core.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate and private key for token encryption/decryption. The secret must contain keys named: `tls.crt` - the certificate and `tls.key` - the private key. The default key pair will be used if it isn't set | | -| `core.tokenKey` | PEM-formatted RSA private key used to sign service tokens. Only used if `core.secretName` is unset. If set, `core.tokenCert` MUST also be set. | | -| `core.tokenCert` | PEM-formatted certificate signed by `core.tokenKey` used to validate service tokens. Only used if `core.secretName` is unset. If set, `core.tokenKey` MUST also be set. | | -| `core.xsrfKey` | The XSRF key. Will be generated automatically if it isn't specified | | -| `core.priorityClassName` | The priority class to run the pod as | | -| `core.artifactPullAsyncFlushDuration` | The time duration for async update artifact pull_time and repository pull_count | | -| `core.gdpr.deleteUser` | Enable GDPR compliant user delete | `false` | -| **Jobservice** | | | -| `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | -| `jobservice.image.tag` | Tag for jobservice image | `dev` | -| `jobservice.replicas` | The replica count | `1` | -| `jobservice.revisionHistoryLimit` | The revision history limit | `10` | -| `jobservice.maxJobWorkers` | The max job workers | `10` | -| `jobservice.jobLoggers` | The loggers for jobs: `file`, `database` or `stdout` | `[file]` | -| `jobservice.loggerSweeperDuration` | The jobLogger sweeper duration in days (ignored if `jobLoggers` is set to `stdout`) | `14` | -| `jobservice.notification.webhook_job_max_retry` | The maximum retry of webhook sending notifications | `3` | -| `jobservice.notification.webhook_job_http_client_timeout` | The http client timeout value of webhook sending notifications | `3` | -| `jobservice.reaper.max_update_hours` | the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 | `24` | -| `jobservice.reaper.max_dangling_hours` | the max time for execution in running state without new task created | `168` | -| `jobservice.resources` | The [resources] to allocate for container | undefined | -| `jobservice.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `jobservice.nodeSelector` | Node labels for pod assignment | `{}` | -| `jobservice.tolerations` | Tolerations for pod assignment | `[]` | -| `jobservice.affinity` | Node/Pod affinities | `{}` | -| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` | -| `jobservice.priorityClassName` | The priority class to run the pod as | | -| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| **Registry** | | | -| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | -| `registry.registry.image.tag` | Tag for registry image | `dev` | -| `registry.registry.resources` | The [resources] to allocate for container | undefined | -| `registry.controller.image.repository` | Repository for registry controller image | `goharbor/harbor-registryctl` | -| `registry.controller.image.tag` | Tag for registry controller image | `dev` | -| `registry.controller.resources` | The [resources] to allocate for container | undefined | -| `registry.replicas` | The replica count | `1` | -| `registry.revisionHistoryLimit` | The revision history limit | `10` | -| `registry.nodeSelector` | Node labels for pod assignment | `{}` | -| `registry.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `registry.tolerations` | Tolerations for pod assignment | `[]` | -| `registry.affinity` | Node/Pod affinities | `{}` | -| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | | -| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` | -| `registry.priorityClassName` | The priority class to run the pod as | | -| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `registry.credentials.username` | The username for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` | -| `registry.credentials.password` | The password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). It is suggested you update this value before installation. | `harbor_registry_password` | -| `registry.credentials.existingSecret` | An existing secret containing the password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). The key must be `REGISTRY_PASSWD` | `""` | -| `registry.credentials.htpasswdString` | Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. | undefined | -| `registry.relativeurls` | If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. Needed if harbor is behind a reverse proxy | `false` | -| `registry.upload_purging.enabled` | If true, enable purge _upload directories | `true` | -| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` | -| `registry.upload_purging.interval` | The interval of the purge operations | `24h` | -| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` | -| **[Trivy][trivy]** | | | -| `trivy.enabled` | The flag to enable Trivy scanner | `true` | -| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` | -| `trivy.image.tag` | Tag for Trivy adapter image | `dev` | -| `trivy.resources` | The [resources] to allocate for Trivy adapter container | | -| `trivy.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `trivy.replicas` | The number of Pod replicas | `1` | -| `trivy.debugMode` | The flag to enable Trivy debug mode | `false` | -| `trivy.vulnType` | Comma-separated list of vulnerability types. Possible values `os` and `library`. | `os,library` | -| `trivy.severity` | Comma-separated list of severities to be checked | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | -| `trivy.ignoreUnfixed` | The flag to display only fixed vulnerabilities | `false` | -| `trivy.insecure` | The flag to skip verifying registry certificate | `false` | -| `trivy.skipUpdate` | The flag to disable [Trivy DB][trivy-db] downloads from GitHub | `false` | -| `trivy.offlineScan` | The flag prevents Trivy from sending API requests to identify dependencies. | `false` | -| `trivy.securityCheck` | Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. | `vuln` | -| `trivy.timeout` | The duration to wait for scan completion | `5m0s` | -| `trivy.gitHubToken` | The GitHub access token to download [Trivy DB][trivy-db] (see [GitHub rate limiting][trivy-rate-limiting]) | | -| `trivy.priorityClassName` | The priority class to run the pod as | | -| **Notary** | | | -| `notary.enabled` | Enable Notary? | `true` | -| `notary.server.image.repository` | Repository for notary server image | `goharbor/notary-server-photon` | -| `notary.server.image.tag` | Tag for notary server image | `dev` | -| `notary.server.replicas` | The replica count | `1` | -| `notary.server.resources` | The [resources] to allocate for container | undefined | -| `notary.server.priorityClassName` | The priority class to run the pod as | | -| `notary.server.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `notary.signer.image.repository` | Repository for notary signer image | `goharbor/notary-signer-photon` | -| `notary.signer.image.tag` | Tag for notary signer image | `dev` | -| `notary.signer.replicas` | The replica count | `1` | -| `notary.signer.resources` | The [resources] to allocate for container | undefined | -| `notary.signer.priorityClassName` | The priority class to run the pod as | | -| `notary.signer.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `notary.nodeSelector` | Node labels for pod assignment | `{}` | -| `notary.tolerations` | Tolerations for pod assignment | `[]` | -| `notary.affinity` | Node/Pod affinities | `{}` | -| `notary.podAnnotations` | Annotations to add to the notary pod | `{}` | -| `notary.serviceAnnotations` | Annotations to add to the notary service | `{}` | -| `notary.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate authority, certificate and private key for notary communications. The secret must contain keys named `ca.crt`, `tls.crt` and `tls.key` that contain the CA, certificate and private key. They will be generated if not set. | | -| **Database** | | | -| `database.type` | If external database is used, set it to `external` | `internal` | -| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` | -| `database.internal.image.tag` | Tag for database image | `dev` | -| `database.internal.password` | The password for database | `changeit` | -| `database.internal.shmSizeLimit` | The limit for the size of shared memory for internal PostgreSQL, conventionally it's around 50% of the memory limit of the container | `512Mi` | -| `database.internal.resources` | The [resources] to allocate for container | undefined | -| `database.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `database.internal.initContainer.migrator.resources` | The [resources] to allocate for the database migrator initContainer | undefined | -| `database.internal.initContainer.permissions.resources` | The [resources] to allocate for the database permissions initContainer | undefined | -| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `database.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `database.internal.affinity` | Node/Pod affinities | `{}` | -| `database.internal.priorityClassName` | The priority class to run the pod as | | -| `database.internal.livenessProbe.timeoutSeconds` | The timeout used in liveness probe; 1 to 5 seconds | 1 | -| `database.internal.readinessProbe.timeoutSeconds` | The timeout used in readiness probe; 1 to 5 seconds | 1 | -| `database.external.host` | The hostname of external database | `192.168.0.1` | -| `database.external.port` | The port of external database | `5432` | -| `database.external.username` | The username of external database | `user` | -| `database.external.password` | The password of external database | `password` | -| `database.external.coreDatabase` | The database used by core service | `registry` | -| `database.external.notaryServerDatabase` | The database used by Notary server | `notary_server` | -| `database.external.notarySignerDatabase` | The database used by Notary signer | `notary_signer` | -| `database.external.existingSecret` | An existing password containing the database password. the key must be `password`. | `""` | -| `database.external.sslmode` | Connection method of external database (require, verify-full, verify-ca, disable) | `disable` | -| `database.maxIdleConns` | The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained. | `50` | -| `database.maxOpenConns` | The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections. | `100` | -| `database.podAnnotations` | Annotations to add to the database pod | `{}` | -| **Redis** | | | -| `redis.type` | If external redis is used, set it to `external` | `internal` | -| `redis.internal.image.repository` | Repository for redis image | `goharbor/redis-photon` | -| `redis.internal.image.tag` | Tag for redis image | `dev` | -| `redis.internal.resources` | The [resources] to allocate for container | undefined | -| `redis.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `redis.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `redis.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `redis.internal.affinity` | Node/Pod affinities | `{}` | -| `redis.internal.priorityClassName` | The priority class to run the pod as | | -| `redis.external.addr` | The addr of external Redis: :. When using sentinel, it should be :,:,: | `192.168.0.2:6379` | -| `redis.external.sentinelMasterSet` | The name of the set of Redis instances to monitor | | -| `redis.external.coreDatabaseIndex` | The database index for core | `0` | -| `redis.external.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.external.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.external.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.external.username` | The username of external Redis | | -| `redis.external.password` | The password of external Redis | | -| `redis.external.existingSecret` | Use an existing secret to connect to redis. The key must be `REDIS_PASSWORD`. | `""` | -| `redis.podAnnotations` | Annotations to add to the redis pod | `{}` | -| **Exporter** | | | -| `exporter.replicas` | The replica count | `1` | -| `exporter.revisionHistoryLimit` | The revision history limit | `10` | -| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` | -| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` | -| `exporter.image.tag` | Tag for exporter image | `dev` | -| `exporter.nodeSelector` | Node labels for pod assignment | `{}` | -| `exporter.tolerations` | Tolerations for pod assignment | `[]` | -| `exporter.affinity` | Node/Pod affinities | `{}` | -| `exporter.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `exporter.cacheDuration` | the cache duration for information that exporter collected from Harbor | `30` | -| `exporter.cacheCleanInterval` | cache clean interval for information that exporter collected from Harbor | `14400` | -| `exporter.priorityClassName` | The priority class to run the pod as | | -| **Metrics** | | | -| `metrics.enabled` | if enable harbor metrics | `false` | -| `metrics.core.path` | the url path for core metrics | `/metrics` | -| `metrics.core.port` | the port for core metrics | `8001` | -| `metrics.registry.path` | the url path for registry metrics | `/metrics` | -| `metrics.registry.port` | the port for registry metrics | `8001` | -| `metrics.exporter.path` | the url path for exporter metrics | `/metrics` | -| `metrics.exporter.port` | the port for exporter metrics | `8001` | -| `metrics.serviceMonitor.enabled` | create prometheus serviceMonitor. Requires prometheus CRD's | `false` | -| `metrics.serviceMonitor.additionalLabels` | additional labels to upsert to the manifest | `""` | -| `metrics.serviceMonitor.interval` | scrape period for harbor metrics | `""` | -| `metrics.serviceMonitor.metricRelabelings` | metrics relabel to add/mod/del before ingestion | `[]` | -| `metrics.serviceMonitor.relabelings` | relabels to add/mod/del to sample before scrape | `[]` | -| **Trace** | | | -| `trace.enabled` | Enable tracing or not | `false` | -| `trace.provider` | The tracing provider: `jaeger` or `otel`. `jaeger` should be 1.26+ | `jaeger` | -| `trace.sample_rate` | Set `sample_rate` to 1 if you want sampling 100% of trace data; set 0.5 if you want sampling 50% of trace data, and so forth | `1` | -| `trace.namespace` | Namespace used to differentiate different harbor services | | -| `trace.attributes` | `attributes` is a key value dict contains user defined attributes used to initialize trace provider | | -| `trace.jaeger.endpoint` | The endpoint of jaeger | `http://hostname:14268/api/traces` | -| `trace.jaeger.username` | The username of jaeger | | -| `trace.jaeger.password` | The password of jaeger | | -| `trace.jaeger.agent_host` | The agent host of jaeger | | -| `trace.jaeger.agent_port` | The agent port of jaeger | `6831` | -| `trace.otel.endpoint` | The endpoint of otel | `hostname:4318` | -| `trace.otel.url_path` | The URL path of otel | `/v1/traces` | -| `trace.otel.compression` | Whether enable compression or not for otel | `false` | -| `trace.otel.insecure` | Whether establish insecure connection or not for otel | `true` | -| `trace.otel.timeout` | The timeout in seconds of otel | `10` | -| **Cache** | | | -| `cache.enabled` | Enable cache layer or not | `false` | -| `cache.expireHours` | The expire hours of cache layer | `24` | - -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[trivy]: https://github.com/aquasecurity/trivy -[trivy-db]: https://github.com/aquasecurity/trivy-db -[trivy-rate-limiting]: https://github.com/aquasecurity/trivy#github-rate-limiting diff --git a/charts/harbor/harbor/1.12.3/conf/notary-server.json b/charts/harbor/harbor/1.12.3/conf/notary-server.json deleted file mode 100644 index b3c2624134..0000000000 --- a/charts/harbor/harbor/1.12.3/conf/notary-server.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "server": { - "http_addr": ":4443" - }, - "trust_service": { - "type": "remote", - "hostname": "{{ template "harbor.notary-signer" . }}", - "port": "7899", - "tls_ca_file": "/etc/ssl/notary/ca.crt", - "key_algorithm": "ecdsa" - }, - "logging": { - "level": "{{ .Values.logLevel }}" - }, - "storage": { - "backend": "postgres", - "db_url": "{{ template "harbor.database.notaryServer" . }}" - }, - "auth": { - "type": "token", - "options": { - "realm": "{{ .Values.externalURL }}/service/token", - "service": "harbor-notary", - "issuer": "harbor-token-issuer", - "rootcertbundle": "/root.crt" - } - } -} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/conf/notary-signer.json b/charts/harbor/harbor/1.12.3/conf/notary-signer.json deleted file mode 100644 index 75a4d68bdb..0000000000 --- a/charts/harbor/harbor/1.12.3/conf/notary-signer.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "server": { - "grpc_addr": ":7899", - "tls_cert_file": "/etc/ssl/notary/tls.crt", - "tls_key_file": "/etc/ssl/notary/tls.key" - }, - "logging": { - "level": "{{ .Values.logLevel }}" - }, - "storage": { - "backend": "postgres", - "db_url": "{{ template "harbor.database.notarySigner" . }}", - "default_alias": "defaultalias" - } -} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/NOTES.txt b/charts/harbor/harbor/1.12.3/templates/NOTES.txt deleted file mode 100644 index 0980c08a35..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }} -For more details, please visit https://github.com/goharbor/harbor diff --git a/charts/harbor/harbor/1.12.3/templates/_helpers.tpl b/charts/harbor/harbor/1.12.3/templates/_helpers.tpl deleted file mode 100644 index eb467e773e..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/_helpers.tpl +++ /dev/null @@ -1,570 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "harbor.name" -}} -{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "harbor.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "harbor" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Helm required labels */}} -{{- define "harbor.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* matchLabels */}} -{{- define "harbor.matchLabels" -}} -release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{- define "harbor.autoGenCert" -}} - {{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForIngress" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (eq .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForNginx" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (ne .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.host" -}} - {{- if eq .Values.database.type "internal" -}} - {{- template "harbor.database" . }} - {{- else -}} - {{- .Values.database.external.host -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.port" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "5432" -}} - {{- else -}} - {{- .Values.database.external.port -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.username" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "postgres" -}} - {{- else -}} - {{- .Values.database.external.username -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.rawPassword" -}} - {{- if eq .Values.database.type "internal" -}} - {{- .Values.database.internal.password -}} - {{- else -}} - {{- .Values.database.external.password -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.escapedRawPassword" -}} - {{- include "harbor.database.rawPassword" . | urlquery | replace "+" "%20" -}} -{{- end -}} - -{{- define "harbor.database.encryptedPassword" -}} - {{- include "harbor.database.rawPassword" . | b64enc | quote -}} -{{- end -}} - -{{- define "harbor.database.coreDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "registry" -}} - {{- else -}} - {{- .Values.database.external.coreDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.notaryServerDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "notaryserver" -}} - {{- else -}} - {{- .Values.database.external.notaryServerDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.notarySignerDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "notarysigner" -}} - {{- else -}} - {{- .Values.database.external.notarySignerDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.sslmode" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "disable" -}} - {{- else -}} - {{- .Values.database.external.sslmode -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.notaryServer" -}} -postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.database.escapedRawPassword" . }}@{{ template "harbor.database.host" . }}:{{ template "harbor.database.port" . }}/{{ template "harbor.database.notaryServerDatabase" . }}?sslmode={{ template "harbor.database.sslmode" . }} -{{- end -}} - -{{- define "harbor.database.notarySigner" -}} -postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.database.escapedRawPassword" . }}@{{ template "harbor.database.host" . }}:{{ template "harbor.database.port" . }}/{{ template "harbor.database.notarySignerDatabase" . }}?sslmode={{ template "harbor.database.sslmode" . }} -{{- end -}} - -{{- define "harbor.redis.scheme" -}} - {{- with .Values.redis }} - {{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }} - {{- end }} -{{- end -}} - -/*host:port*/ -{{- define "harbor.redis.addr" -}} - {{- with .Values.redis }} - {{- ternary (printf "%s:6379" (include "harbor.redis" $ )) .external.addr (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.masterSet" -}} - {{- with .Values.redis }} - {{- ternary .external.sentinelMasterSet "" (eq "redis+sentinel" (include "harbor.redis.scheme" $)) }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.password" -}} - {{- with .Values.redis }} - {{- ternary "" .external.password (eq .type "internal") }} - {{- end }} -{{- end -}} - -/*scheme://[:password@]host:port[/master_set]*/ -{{- define "harbor.redis.url" -}} - {{- with .Values.redis }} - {{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }} - {{- $cred := ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }} - {{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) $cred (include "harbor.redis.addr" $) $path -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCore" -}} - {{- with .Values.redis }} - {{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index*/ -{{- define "harbor.redis.urlForJobservice" -}} - {{- with .Values.redis }} - {{- $index := ternary "1" .external.jobserviceDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForRegistry" -}} - {{- with .Values.redis }} - {{- $index := ternary "2" .external.registryDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForTrivy" -}} - {{- with .Values.redis }} - {{- $index := ternary "5" .external.trivyAdapterIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.dbForRegistry" -}} - {{- with .Values.redis }} - {{- ternary "2" .external.registryDatabaseIndex (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.notary-server" -}} - {{- printf "%s-notary-server" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.notary-signer" -}} - {{- printf "%s-notary-signer" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress-notary" -}} - {{- printf "%s-ingress-notary" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.noProxy" -}} - {{- printf "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.notary-server" .) (include "harbor.notary-signer" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}} -{{- end -}} - -{{- define "harbor.caBundleVolume" -}} -- name: ca-bundle-certs - secret: - secretName: {{ .Values.caBundleSecretName }} -{{- end -}} - -{{- define "harbor.caBundleVolumeMount" -}} -- name: ca-bundle-certs - mountPath: /harbor_cust_cert/custom-ca.crt - subPath: ca.crt -{{- end -}} - -{{/* scheme for all components except notary because it only support http mode */}} -{{- define "harbor.component.scheme" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "https" -}} - {{- else -}} - {{- printf "http" -}} - {{- end -}} -{{- end -}} - -{{/* core component container port */}} -{{- define "harbor.core.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* core component service port */}} -{{- define "harbor.core.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component container port */}} -{{- define "harbor.jobservice.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component service port */}} -{{- define "harbor.jobservice.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* portal component container port */}} -{{- define "harbor.portal.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* portal component service port */}} -{{- define "harbor.portal.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* registry component container port */}} -{{- define "harbor.registry.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registry component service port */}} -{{- define "harbor.registry.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component container port */}} -{{- define "harbor.registryctl.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component service port */}} -{{- define "harbor.registryctl.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component container port */}} -{{- define "harbor.trivy.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component service port */}} -{{- define "harbor.trivy.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* CORE_URL */}} -{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}} -{{- define "harbor.coreURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}} -{{- end -}} - -{{/* JOBSERVICE_URL */}} -{{- define "harbor.jobserviceURL" -}} - {{- printf "%s://%s-jobservice" (include "harbor.component.scheme" .) (include "harbor.fullname" .) -}} -{{- end -}} - -{{/* PORTAL_URL */}} -{{- define "harbor.portalURL" -}} - {{- printf "%s://%s" (include "harbor.component.scheme" .) (include "harbor.portal" .) -}} -{{- end -}} - -{{/* REGISTRY_URL */}} -{{- define "harbor.registryURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registry.servicePort" .) -}} -{{- end -}} - -{{/* REGISTRY_CONTROLLER_URL */}} -{{- define "harbor.registryControllerURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registryctl.servicePort" .) -}} -{{- end -}} - -{{/* TOKEN_SERVICE_URL */}} -{{- define "harbor.tokenServiceURL" -}} - {{- printf "%s/service/token" (include "harbor.coreURL" .) -}} -{{- end -}} - -{{/* TRIVY_ADAPTER_URL */}} -{{- define "harbor.trivyAdapterURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}} -{{- end -}} - -{{- define "harbor.internalTLS.core.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.core.secretName -}} - {{- else -}} - {{- printf "%s-core-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.jobservice.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.jobservice.secretName -}} - {{- else -}} - {{- printf "%s-jobservice-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.portal.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.portal.secretName -}} - {{- else -}} - {{- printf "%s-portal-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.registry.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.registry.secretName -}} - {{- else -}} - {{- printf "%s-registry-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.trivy.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.trivy.secretName -}} - {{- else -}} - {{- printf "%s-trivy-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsCoreSecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsNotarySecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.notarySecretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsSecretForNginx" -}} - {{- if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.nginx" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.metricsPortName" -}} - {{- if .Values.internalTLS.enabled }} - {{- printf "https-metrics" -}} - {{- else -}} - {{- printf "http-metrics" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.traceEnvs" -}} - TRACE_ENABLED: "{{ .Values.trace.enabled }}" - TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}" - TRACE_NAMESPACE: "{{ .Values.trace.namespace }}" - {{- if .Values.trace.attributes }} - TRACE_ATTRIBUTES: "{{ .Values.trace.attributes | toJson }}" - {{- end }} - {{- if eq .Values.trace.provider "jaeger" }} - TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}" - TRACE_JAEGER_USERNAME: "{{ .Values.trace.jaeger.username }}" - TRACE_JAEGER_AGENT_HOSTNAME: "{{ .Values.trace.jaeger.agent_host }}" - TRACE_JAEGER_AGENT_PORT: "{{ .Values.trace.jaeger.agent_port }}" - {{- else }} - TRACE_OTEL_ENDPOINT: "{{ .Values.trace.otel.endpoint }}" - TRACE_OTEL_URL_PATH: "{{ .Values.trace.otel.url_path }}" - TRACE_OTEL_COMPRESSION: "{{ .Values.trace.otel.compression }}" - TRACE_OTEL_INSECURE: "{{ .Values.trace.otel.insecure }}" - TRACE_OTEL_TIMEOUT: "{{ .Values.trace.otel.timeout }}" - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForCore" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-core" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForJobservice" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-jobservice" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForRegistryCtl" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-registryctl" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceJaegerPassword" -}} - {{- if and .Values.trace.enabled (eq .Values.trace.provider "jaeger") }} - TRACE_JAEGER_PASSWORD: "{{ .Values.trace.jaeger.password | default "" | b64enc }}" - {{- end }} -{{- end -}} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "harbor.ingress.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/core/core-cm.yaml b/charts/harbor/harbor/1.12.3/templates/core/core-cm.yaml deleted file mode 100644 index adecb1ceb4..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/core/core-cm.yaml +++ /dev/null @@ -1,79 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - app.conf: |+ - appname = Harbor - runmode = prod - enablegzip = true - - [prod] - httpport = {{ ternary "8443" "8080" .Values.internalTLS.enabled }} - PORT: "{{ ternary "8443" "8080" .Values.internalTLS.enabled }}" - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "{{ template "harbor.database.host" . }}" - POSTGRESQL_PORT: "{{ template "harbor.database.port" . }}" - POSTGRESQL_USERNAME: "{{ template "harbor.database.username" . }}" - POSTGRESQL_DATABASE: "{{ template "harbor.database.coreDatabase" . }}" - POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" - EXT_ENDPOINT: "{{ .Values.externalURL }}" - CORE_URL: "{{ template "harbor.coreURL" . }}" - JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - WITH_NOTARY: "{{ .Values.notary.enabled }}" - NOTARY_URL: "http://{{ template "harbor.notary-server" . }}:4443" - CORE_LOCAL_URL: "{{ ternary "https://127.0.0.1:8443" "http://127.0.0.1:8080" .Values.internalTLS.enabled }}" - WITH_TRIVY: {{ .Values.trivy.enabled | quote }} - TRIVY_ADAPTER_URL: "{{ template "harbor.trivyAdapterURL" . }}" - REGISTRY_STORAGE_PROVIDER_NAME: "{{ .Values.persistence.imageChartStorage.type }}" - LOG_LEVEL: "{{ .Values.logLevel }}" - CONFIG_PATH: "/etc/core/app.conf" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}" - PORTAL_URL: "{{ template "harbor.portalURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - {{- if .Values.uaaSecretName }} - UAA_CA_ROOT: "/etc/core/auth-ca/auth-ca.crt" - {{- end }} - {{- if has "core" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE: "docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory" - {{- if .Values.metrics.enabled}} - METRIC_ENABLE: "true" - METRIC_PATH: "{{ .Values.metrics.core.path }}" - METRIC_PORT: "{{ .Values.metrics.core.port }}" - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: core - {{- end }} - - {{- if hasKey .Values.core "gcTimeWindowHours" }} - #make the GC time window configurable for testing - GC_TIME_WINDOW_HOURS: "{{ .Values.core.gcTimeWindowHours }}" - {{- end }} - {{- template "harbor.traceEnvsForCore" . }} - - {{- if .Values.core.artifactPullAsyncFlushDuration | quote }} - ARTIFACT_PULL_ASYNC_FLUSH_DURATION: {{ .Values.core.artifactPullAsyncFlushDuration }} - {{- end }} - - {{- if .Values.core.gdpr}} - {{- if .Values.core.gdpr.deleteUser}} - GDPR_DELETE_USER: "true" - {{- end }} - {{- end }} - - {{- if .Values.cache.enabled }} - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/core/core-dpl.yaml b/charts/harbor/harbor/1.12.3/templates/core/core-dpl.yaml deleted file mode 100644 index 2ca8b0c5e5..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/core/core-dpl.yaml +++ /dev/null @@ -1,221 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: core -spec: - replicas: {{ .Values.core.replicas }} - revisionHistoryLimit: {{ .Values.core.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: core - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: core - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.core.podAnnotations }} -{{ toYaml .Values.core.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: core - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if .Values.core.startupProbe.enabled }} - startupProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 360 - initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} - periodSeconds: 10 - {{- end }} - livenessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: "{{ template "harbor.jobservice" . }}" - key: JOBSERVICE_SECRET - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/core/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/core/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/core/ca.crt - {{- end }} - {{- if .Values.database.external.existingSecret }} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - {{- if .Values.expose.tls.enabled }} - - name: ca-download - mountPath: /etc/core/ca - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - mountPath: /etc/core/auth-ca/auth-ca.crt - subPath: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - {{- end }} - - name: psc - mountPath: /etc/core/token - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} -{{- if .Values.core.resources }} - resources: -{{ toYaml .Values.core.resources | indent 10 }} -{{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - - name: secret-key - secret: - {{- if .Values.existingSecretSecretKey }} - secretName: {{ .Values.existingSecretSecretKey }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - items: - - key: secretKey - path: key - - name: token-service-private-key - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: ca-download - secret: - {{- if .Values.caSecretName }} - secretName: {{ .Values.caSecretName }} - {{- else if eq (include "harbor.autoGenCertForIngress" .) "true" }} - secretName: "{{ template "harbor.ingress" . }}" - {{- else if eq (include "harbor.autoGenCertForNginx" .) "true" }} - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - secret: - secretName: {{ .Values.uaaSecretName }} - items: - - key: ca.crt - path: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - - name: psc - emptyDir: {} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.core.priorityClassName }} - priorityClassName: {{ .Values.core.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/core/core-pre-upgrade-job.yaml b/charts/harbor/harbor/1.12.3/templates/core/core-pre-upgrade-job.yaml deleted file mode 100644 index 43c9d3596d..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/core/core-pre-upgrade-job.yaml +++ /dev/null @@ -1,74 +0,0 @@ -{{- if .Values.enableMigrateHelmHook }} -apiVersion: batch/v1 -kind: Job -metadata: - name: migration-job - labels: -{{ include "harbor.labels" . | indent 4 }} - component: migrator - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-5" -spec: - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: migrator - spec: - restartPolicy: Never - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 120 - containers: - - name: core-job - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/harbor/harbor_core", "-mode=migrate"] - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - {{- if .Values.database.external.existingSecret }} - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/core/core-secret.yaml b/charts/harbor/harbor/1.12.3/templates/core/core-secret.yaml deleted file mode 100644 index 20f835b1d8..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/core/core-secret.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.existingSecretSecretKey }} - secretKey: {{ .Values.secretKey | b64enc | quote }} - {{- end }} - secret: {{ .Values.core.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.core.secretName }} - {{- $ca := genCA "harbor-token-ca" 365 }} - tls.key: {{ .Values.core.tokenKey | default $ca.Key | b64enc | quote }} - tls.crt: {{ .Values.core.tokenCert | default $ca.Cert | b64enc | quote }} - {{- end }} - {{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} - {{- end }} - {{- if not .Values.database.external.existingSecret }} - POSTGRESQL_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - CSRF_KEY: {{ .Values.core.xsrfKey | default (randAlphaNum 32) | b64enc | quote }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.12.3/templates/core/core-svc.yaml b/charts/harbor/harbor/1.12.3/templates/core/core-svc.yaml deleted file mode 100644 index 0d2cfb2915..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/core/core-svc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.core.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - name: {{ ternary "https-web" "http-web" .Values.internalTLS.enabled }} - port: {{ template "harbor.core.servicePort" . }} - targetPort: {{ template "harbor.core.containerPort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.core.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: core diff --git a/charts/harbor/harbor/1.12.3/templates/core/core-tls.yaml b/charts/harbor/harbor/1.12.3/templates/core/core-tls.yaml deleted file mode 100644 index c52148f0d9..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/core/core-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.core.crt\" is required!" .Values.internalTLS.core.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.core.key\" is required!" .Values.internalTLS.core.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/database/database-secret.yaml b/charts/harbor/harbor/1.12.3/templates/database/database-secret.yaml deleted file mode 100644 index 864aff4a18..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/database/database-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - POSTGRES_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end -}} diff --git a/charts/harbor/harbor/1.12.3/templates/database/database-ss.yaml b/charts/harbor/harbor/1.12.3/templates/database/database-ss.yaml deleted file mode 100644 index 733243c71c..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/database/database-ss.yaml +++ /dev/null @@ -1,162 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -{{- $database := .Values.persistence.persistentVolumeClaim.database -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: database -spec: - replicas: 1 - serviceName: "{{ template "harbor.database" . }}" - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: database - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: database - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} -{{- if .Values.database.podAnnotations }} -{{ toYaml .Values.database.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.database.internal.serviceAccountName }} - serviceAccountName: {{ .Values.database.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.database.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - # as we change the data directory to a sub folder to support psp, the init container here - # is used to migrate the existing data. See https://github.com/goharbor/harbor-helm/issues/756 - # for more detail. - # we may remove it after several releases - - name: "data-migrator" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "[ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true"] -{{- if .Values.database.internal.initContainer.migrator.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.migrator.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - # with "fsGroup" set, each time a volume is mounted, Kubernetes must recursively chown() and chmod() all the files and directories inside the volume - # this causes the postgresql reports the "data directory /var/lib/postgresql/data/pgdata has group or world access" issue when using some CSIs e.g. Ceph - # use this init container to correct the permission - # as "fsGroup" applied before the init container running, the container has enough permission to execute the command - - name: "data-permissions-ensurer" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"] -{{- if .Values.database.internal.initContainer.permissions.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.permissions.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - containers: - - name: database - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.livenessProbe.timeoutSeconds }} - readinessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 1 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.readinessProbe.timeoutSeconds }} -{{- if .Values.database.internal.resources }} - resources: -{{ toYaml .Values.database.internal.resources | indent 10 }} -{{- end }} - envFrom: - - secretRef: - name: "{{ template "harbor.database" . }}" - env: - # put the data into a sub directory to avoid the permission issue in k8s with restricted psp enabled - # more detail refer to https://github.com/goharbor/harbor-helm/issues/756 - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - - name: shm-volume - mountPath: /dev/shm - volumes: - - name: shm-volume - emptyDir: - medium: Memory - sizeLimit: {{ .Values.database.internal.shmSizeLimit }} - {{- if not .Values.persistence.enabled }} - - name: "database-data" - emptyDir: {} - {{- else if $database.existingClaim }} - - name: "database-data" - persistentVolumeClaim: - claimName: {{ $database.existingClaim }} - {{- end -}} - {{- with .Values.database.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.database.internal.priorityClassName }} - priorityClassName: {{ .Values.database.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $database.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $database.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $database.accessMode | quote }}] - {{- if $database.storageClass }} - {{- if (eq "-" $database.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $database.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $database.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.12.3/templates/database/database-svc.yaml b/charts/harbor/harbor/1.12.3/templates/database/database-svc.yaml deleted file mode 100644 index 6475048cd9..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/database/database-svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 5432 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: database -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/exporter/exporter-cm-env.yaml b/charts/harbor/harbor/1.12.3/templates/exporter/exporter-cm-env.yaml deleted file mode 100644 index 0bf4e7d905..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/exporter/exporter-cm-env.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.exporter" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - LOG_LEVEL: "{{ .Values.logLevel }}" - HARBOR_EXPORTER_PORT: "{{ .Values.metrics.exporter.port }}" - HARBOR_EXPORTER_METRICS_PATH: "{{ .Values.metrics.exporter.path }}" - HARBOR_EXPORTER_METRICS_ENABLED: "{{ .Values.metrics.enabled }}" - HARBOR_EXPORTER_CACHE_TIME: "{{ .Values.exporter.cacheDuration }}" - HARBOR_EXPORTER_CACHE_CLEAN_INTERVAL: "{{ .Values.exporter.cacheCleanInterval }}" - HARBOR_METRIC_NAMESPACE: harbor - HARBOR_METRIC_SUBSYSTEM: exporter - HARBOR_REDIS_URL: "{{ template "harbor.redis.urlForJobservice" . }}" - HARBOR_REDIS_NAMESPACE: harbor_job_service_namespace - HARBOR_REDIS_TIMEOUT: "3600" - HARBOR_SERVICE_SCHEME: "{{ template "harbor.component.scheme" . }}" - HARBOR_SERVICE_HOST: "{{ template "harbor.core" . }}" - HARBOR_SERVICE_PORT: "{{ template "harbor.core.servicePort" . }}" - HARBOR_DATABASE_HOST: "{{ template "harbor.database.host" . }}" - HARBOR_DATABASE_PORT: "{{ template "harbor.database.port" . }}" - HARBOR_DATABASE_USERNAME: "{{ template "harbor.database.username" . }}" - HARBOR_DATABASE_DBNAME: "{{ template "harbor.database.coreDatabase" . }}" - HARBOR_DATABASE_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - HARBOR_DATABASE_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - HARBOR_DATABASE_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" -{{- end}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/exporter/exporter-dpl.yaml b/charts/harbor/harbor/1.12.3/templates/exporter/exporter-dpl.yaml deleted file mode 100644 index 5ff36f48a6..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/exporter/exporter-dpl.yaml +++ /dev/null @@ -1,117 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: exporter -spec: - replicas: {{ .Values.exporter.replicas }} - revisionHistoryLimit: {{ .Values.exporter.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: exporter - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: exporter - annotations: -{{- if .Values.exporter.podAnnotations }} -{{ toYaml .Values.exporter.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.exporter.serviceAccountName }} - serviceAccountName: {{ .Values.exporter.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.exporter.automountServiceAccountToken | default false }} - containers: - - name: exporter - image: {{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 30 - periodSeconds: 10 - args: ["-log-level", "{{ .Values.logLevel }}"] - envFrom: - - configMapRef: - name: "{{ template "harbor.exporter" . }}-env" - - secretRef: - name: "{{ template "harbor.exporter" . }}" - env: - {{- if .Values.database.external.existingSecret }} - - name: HARBOR_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} -{{- if .Values.exporter.resources }} - resources: -{{ toYaml .Values.exporter.resources | indent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - # There are some metric data are collectd from harbor core. - # When internal TLS is enabled, the Exporter need the CA file to collect these data. - {{- end }} - volumes: - - name: config - secret: - secretName: "{{ template "harbor.exporter" . }}" - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.exporter.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.exporter.priorityClassName }} - priorityClassName: {{ .Values.exporter.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.12.3/templates/exporter/exporter-secret.yaml b/charts/harbor/harbor/1.12.3/templates/exporter/exporter-secret.yaml deleted file mode 100644 index 434a1bf689..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/exporter/exporter-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: -{{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} -{{- end }} -{{- if not .Values.database.external.existingSecret }} - HARBOR_DATABASE_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/exporter/exporter-svc.yaml b/charts/harbor/harbor/1.12.3/templates/exporter/exporter-svc.yaml deleted file mode 100644 index 4a6f3fdec6..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/exporter/exporter-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.exporter" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.exporter.port }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: exporter -{{ end }} diff --git a/charts/harbor/harbor/1.12.3/templates/ingress/ingress.yaml b/charts/harbor/harbor/1.12.3/templates/ingress/ingress.yaml deleted file mode 100644 index eedd13604a..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/ingress/ingress.yaml +++ /dev/null @@ -1,209 +0,0 @@ -{{- if eq .Values.expose.type "ingress" }} -{{- $ingress := .Values.expose.ingress -}} -{{- $tls := .Values.expose.tls -}} -{{- if eq .Values.expose.ingress.controller "gce" }} - {{- $_ := set . "portal_path" "/*" -}} - {{- $_ := set . "api_path" "/api/*" -}} - {{- $_ := set . "service_path" "/service/*" -}} - {{- $_ := set . "v2_path" "/v2/*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/*" -}} - {{- $_ := set . "controller_path" "/c/*" -}} - {{- $_ := set . "notary_path" "/" -}} -{{- else if eq .Values.expose.ingress.controller "ncp" }} - {{- $_ := set . "portal_path" "/.*" -}} - {{- $_ := set . "api_path" "/api/.*" -}} - {{- $_ := set . "service_path" "/service/.*" -}} - {{- $_ := set . "v2_path" "/v2/.*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}} - {{- $_ := set . "controller_path" "/c/.*" -}} - {{- $_ := set . "notary_path" "/.*" -}} -{{- else }} - {{- $_ := set . "portal_path" "/" -}} - {{- $_ := set . "api_path" "/api/" -}} - {{- $_ := set . "service_path" "/service/" -}} - {{- $_ := set . "v2_path" "/v2/" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/" -}} - {{- $_ := set . "controller_path" "/c/" -}} - {{- $_ := set . "notary_path" "/" -}} -{{- end }} - ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.harbor.labels }} -{{ toYaml $ingress.harbor.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if .Values.internalTLS.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" -{{- end }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -{{- if $ingress.harbor.annotations }} -{{ toYaml $ingress.harbor.annotations | indent 4 }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsCoreSecretForIngress" . }} - {{- if $ingress.hosts.core }} - hosts: - - {{ $ingress.hosts.core }} - {{- end }} - {{- end }} - rules: - - http: - paths: -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - - path: {{ .api_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - backend: - serviceName: {{ template "harbor.portal" . }} - servicePort: {{ template "harbor.portal.servicePort" . }} -{{- else }} - - path: {{ .api_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.portal" . }} - port: - number: {{ template "harbor.portal.servicePort" . }} -{{- end }} - {{- if $ingress.hosts.core }} - host: {{ $ingress.hosts.core }} - {{- end }} - -{{- if .Values.notary.enabled }} ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress-notary" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.notary.labels }} -{{ toYaml $ingress.notary.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -{{- if $ingress.notary.annotations }} -{{ toYaml $ingress.notary.annotations | indent 4 }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsNotarySecretForIngress" . }} - {{- if $ingress.hosts.notary }} - hosts: - - {{ $ingress.hosts.notary }} - {{- end }} - {{- end }} - rules: - - http: - paths: - - path: {{ .notary_path }} -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - backend: - serviceName: {{ template "harbor.notary-server" . }} - servicePort: 4443 -{{- else }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.notary-server" . }} - port: - number: 4443 -{{- end -}} - {{- if $ingress.hosts.notary }} - host: {{ $ingress.hosts.notary }} - {{- end }} -{{- end }} - -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/ingress/secret.yaml b/charts/harbor/harbor/1.12.3/templates/ingress/secret.yaml deleted file mode 100644 index 0d89af99ac..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/ingress/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForIngress" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cert := genSignedCert .Values.expose.ingress.hosts.core nil (list .Values.expose.ingress.hosts.core .Values.expose.ingress.hosts.notary) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/internal/auto-tls.yaml b/charts/harbor/harbor/1.12.3/templates/internal/auto-tls.yaml deleted file mode 100644 index da5f5e2c7b..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/internal/auto-tls.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} -{{- $ca := genCA "harbor-internal-ca" 365 }} -{{- $coreCN := (include "harbor.core" .) }} -{{- $coreCrt := genSignedCert $coreCN (list "127.0.0.1") (list "localhost" $coreCN) 365 $ca }} -{{- $jsCN := (include "harbor.jobservice" .) }} -{{- $jsCrt := genSignedCert $jsCN nil (list $jsCN) 365 $ca }} -{{- $regCN := (include "harbor.registry" .) }} -{{- $regCrt := genSignedCert $regCN nil (list $regCN) 365 $ca }} -{{- $portalCN := (include "harbor.portal" .) }} -{{- $portalCrt := genSignedCert $portalCN nil (list $portalCN) 365 $ca }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $coreCrt.Cert | b64enc | quote }} - tls.key: {{ $coreCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $jsCrt.Cert | b64enc | quote }} - tls.key: {{ $jsCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $regCrt.Cert | b64enc | quote }} - tls.key: {{ $regCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $portalCrt.Cert | b64enc | quote }} - tls.key: {{ $portalCrt.Key | b64enc | quote }} - -{{- if and .Values.trivy.enabled}} ---- -{{- $trivyCN := (include "harbor.trivy" .) }} -{{- $trivyCrt := genSignedCert $trivyCN nil (list $trivyCN) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $trivyCrt.Cert | b64enc | quote }} - tls.key: {{ $trivyCrt.Key | b64enc | quote }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-cm-env.yaml b/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-cm-env.yaml deleted file mode 100644 index 50de1dc868..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-cm-env.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - CORE_URL: "{{ template "harbor.coreURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - - JOBSERVICE_WEBHOOK_JOB_MAX_RETRY: "{{ .Values.jobservice.notification.webhook_job_max_retry }}" - JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT: "{{ .Values.jobservice.notification.webhook_job_http_client_timeout }}" - - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.metrics.enabled}} - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: jobservice - {{- end }} - {{- template "harbor.traceEnvsForJobservice" . }} - {{- if .Values.cache.enabled }} - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-cm.yaml b/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-cm.yaml deleted file mode 100644 index 8211c62209..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-cm.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - #Server listening port - protocol: "{{ template "harbor.component.scheme" . }}" - port: {{ template "harbor.jobservice.containerPort". }} - {{- if .Values.internalTLS.enabled }} - https_config: - cert: "/etc/harbor/ssl/jobservice/tls.crt" - key: "/etc/harbor/ssl/jobservice/tls.key" - {{- end }} - worker_pool: - workers: {{ .Values.jobservice.maxJobWorkers }} - backend: "redis" - redis_pool: - redis_url: "{{ template "harbor.redis.urlForJobservice" . }}" - namespace: "harbor_job_service_namespace" - idle_timeout_second: 3600 - job_loggers: - {{- if has "file" .Values.jobservice.jobLoggers }} - - name: "FILE" - level: {{ .Values.logLevel | upper }} - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - {{- end }} - {{- if has "database" .Values.jobservice.jobLoggers }} - - name: "DB" - level: {{ .Values.logLevel | upper }} - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - {{- end }} - {{- if has "stdout" .Values.jobservice.jobLoggers }} - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - {{- end }} - metric: - enabled: {{ .Values.metrics.enabled }} - path: {{ .Values.metrics.jobservice.path }} - port: {{ .Values.metrics.jobservice.port }} - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: {{ .Values.jobservice.reaper.max_update_hours }} - # the max time for execution in running state without new task created - max_dangling_hours: {{ .Values.jobservice.reaper.max_dangling_hours }} diff --git a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-dpl.yaml b/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-dpl.yaml deleted file mode 100644 index 32df454b10..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-dpl.yaml +++ /dev/null @@ -1,150 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - replicas: {{ .Values.jobservice.replicas }} - revisionHistoryLimit: {{ .Values.jobservice.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: jobservice - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} - checksum/configmap-env: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/jobservice/jobservice-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.jobservice.podAnnotations }} -{{ toYaml .Values.jobservice.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.jobservice.serviceAccountName }} - serviceAccountName: {{ .Values.jobservice.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: jobservice - image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.jobservice.resources }} - resources: -{{ toYaml .Values.jobservice.resources | indent 10 }} -{{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/jobservice/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/jobservice/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/jobservice/ca.crt - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.jobservice" . }}-env" - - secretRef: - name: "{{ template "harbor.jobservice" . }}" - ports: - - containerPort: {{ template "harbor.jobservice.containerPort" . }} - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.subPath }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - mountPath: /etc/harbor/ssl/jobservice - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: jobservice-config - configMap: - name: "{{ template "harbor.jobservice" . }}" - - name: job-logs - {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLoggers) }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim | default (include "harbor.jobservice" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.jobservice.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.jobservice.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.jobservice.priorityClassName }} - priorityClassName: {{ .Values.jobservice.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-pvc.yaml b/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-pvc.yaml deleted file mode 100644 index a6b8b8bd38..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-pvc.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- $jobLog := .Values.persistence.persistentVolumeClaim.jobservice.jobLog -}} -{{- if and .Values.persistence.enabled (not $jobLog.existingClaim) (has "file" .Values.jobservice.jobLoggers) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.jobservice" . }} - annotations: - {{- range $key, $value := $jobLog.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - accessModes: - - {{ $jobLog.accessMode }} - resources: - requests: - storage: {{ $jobLog.size }} - {{- if $jobLog.storageClass }} - {{- if eq "-" $jobLog.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $jobLog.storageClass }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-secrets.yaml b/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-secrets.yaml deleted file mode 100644 index 3dfa6bd5e6..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-secrets.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - JOBSERVICE_SECRET: {{ .Values.jobservice.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-svc.yaml b/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-svc.yaml deleted file mode 100644 index d2b7a47fd4..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-svc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }} - port: {{ template "harbor.jobservice.servicePort" . }} - targetPort: {{ template "harbor.jobservice.containerPort" . }} -{{- if .Values.metrics.enabled }} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.jobservice.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice diff --git a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-tls.yaml b/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-tls.yaml deleted file mode 100644 index 234cb39995..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/jobservice/jobservice-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.jobservice.crt\" is required!" .Values.internalTLS.jobservice.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.jobservice.key\" is required!" .Values.internalTLS.jobservice.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/metrics/metrics-svcmon.yaml b/charts/harbor/harbor/1.12.3/templates/metrics/metrics-svcmon.yaml deleted file mode 100644 index ad8522974d..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/metrics/metrics-svcmon.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "harbor.fullname" . }} - labels: {{ include "harbor.labels" . | nindent 4 }} -{{- if .Values.metrics.serviceMonitor.additionalLabels }} -{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} -{{- end }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: {{ template "harbor.metricsPortName" . }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - honorLabels: true -{{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.metrics.serviceMonitor.relabelings | indent 4 }} -{{- end }} - selector: - matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/nginx/configmap-http.yaml b/charts/harbor/harbor/1.12.3/templates/nginx/configmap-http.yaml deleted file mode 100644 index c4b8354d06..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/nginx/configmap-http.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server {{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled}} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end }} - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - proxy_send_timeout 900; - proxy_read_timeout 900; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/nginx/configmap-https.yaml b/charts/harbor/harbor/1.12.3/templates/nginx/configmap-https.yaml deleted file mode 100644 index 74c667e009..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/nginx/configmap-https.yaml +++ /dev/null @@ -1,230 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server "{{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}"; - } - - {{- if .Values.notary.enabled }} - upstream notary-server { - server {{ template "harbor.notary-server" . }}:4443; - } - {{- end }} - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - {{- if .Values.notary.enabled }} - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 4443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:4443 ssl; - {{- end }} - server_tokens off; - # ssl - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # recommendations from https://raymii.org/s/tutorials/strong_ssl_security_on_nginx.html - ssl_protocols tlsv1.2; - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:ssl:10m; - - # disable any limits to avoid http 413 for large image uploads - client_max_body_size 0; - - # required to avoid http 411: see issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - location /v2/ { - proxy_pass http://notary-server/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - - proxy_send_timeout 900; - proxy_read_timeout 900; - } - } - {{- end }} - - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8443 ssl; - {{- end }} - # server_name harbordomain.com; - server_tokens off; - # SSL - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2; - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - # Add extra headers - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; HttpOnly; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end}} - #server_name harbordomain.com; - return 301 https://$host$request_uri; - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/nginx/deployment.yaml b/charts/harbor/harbor/1.12.3/templates/nginx/deployment.yaml deleted file mode 100644 index bc1de0abfe..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/nginx/deployment.yaml +++ /dev/null @@ -1,109 +0,0 @@ -{{- if ne .Values.expose.type "ingress" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: nginx -spec: - replicas: {{ .Values.nginx.replicas }} - revisionHistoryLimit: {{ .Values.nginx.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: nginx - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: nginx - annotations: - {{- if not .Values.expose.tls.enabled }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} - {{- else }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-https.yaml") . | sha256sum }} - {{- end }} - {{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} - checksum/secret: {{ include (print $.Template.BasePath "/nginx/secret.yaml") . | sha256sum }} - {{- end }} -{{- if .Values.nginx.podAnnotations }} -{{ toYaml .Values.nginx.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- if .Values.nginx.serviceAccountName }} - serviceAccountName: {{ .Values.nginx.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.nginx.automountServiceAccountToken | default false }} - containers: - - name: nginx - image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - {{- $_ := set . "scheme" "HTTP" -}} - {{- $_ := set . "port" "8080" -}} - {{- if .Values.expose.tls.enabled }} - {{- $_ := set . "scheme" "HTTPS" -}} - {{- $_ := set . "port" "8443" -}} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.nginx.resources }} - resources: -{{ toYaml .Values.nginx.resources | indent 10 }} -{{- end }} - ports: - - containerPort: 8080 - - containerPort: 8443 - - containerPort: 4443 - volumeMounts: - - name: config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.expose.tls.enabled }} - - name: certificate - mountPath: /etc/nginx/cert - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.nginx" . }} - {{- if .Values.expose.tls.enabled }} - - name: certificate - secret: - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- with .Values.nginx.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nginx.priorityClassName }} - priorityClassName: {{ .Values.nginx.priorityClassName }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/nginx/secret.yaml b/charts/harbor/harbor/1.12.3/templates/nginx/secret.yaml deleted file mode 100644 index c819c556d9..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/nginx/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cn := (required "The \"expose.tls.auto.commonName\" is required!" .Values.expose.tls.auto.commonName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if regexMatch `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` $cn }} - {{- $cert := genSignedCert $cn (list $cn) nil 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- else }} - {{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/nginx/service.yaml b/charts/harbor/harbor/1.12.3/templates/nginx/service.yaml deleted file mode 100644 index df4da0944a..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/nginx/service.yaml +++ /dev/null @@ -1,96 +0,0 @@ -{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }} -apiVersion: v1 -kind: Service -metadata: -{{- if eq .Values.expose.type "clusterIP" }} -{{- $clusterIP := .Values.expose.clusterIP }} - name: {{ $clusterIP.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $clusterIP.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: ClusterIP - ports: - - name: http - port: {{ $clusterIP.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $clusterIP.ports.httpsPort }} - targetPort: 8443 - {{- end }} - {{- if .Values.notary.enabled }} - - name: notary - port: {{ $clusterIP.ports.notaryPort }} - targetPort: 4443 - {{- end }} -{{- else if eq .Values.expose.type "nodePort" }} -{{- $nodePort := .Values.expose.nodePort }} - name: {{ $nodePort.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - type: NodePort - ports: - - name: http - port: {{ $nodePort.ports.http.port }} - targetPort: 8080 - {{- if $nodePort.ports.http.nodePort }} - nodePort: {{ $nodePort.ports.http.nodePort }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $nodePort.ports.https.port }} - targetPort: 8443 - {{- if $nodePort.ports.https.nodePort }} - nodePort: {{ $nodePort.ports.https.nodePort }} - {{- end }} - {{- end }} - {{- if .Values.notary.enabled }} - - name: notary - port: {{ $nodePort.ports.notary.port }} - targetPort: 4443 - {{- if $nodePort.ports.notary.nodePort }} - nodePort: {{ $nodePort.ports.notary.nodePort }} - {{- end }} - {{- end }} -{{- else if eq .Values.expose.type "loadBalancer" }} -{{- $loadBalancer := .Values.expose.loadBalancer }} - name: {{ $loadBalancer.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $loadBalancer.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: LoadBalancer - {{- with $loadBalancer.sourceRanges }} - loadBalancerSourceRanges: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $loadBalancer.IP }} - loadBalancerIP: {{ $loadBalancer.IP }} - {{- end }} - ports: - - name: http - port: {{ $loadBalancer.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $loadBalancer.ports.httpsPort }} - targetPort: 8443 - {{- end }} - {{- if .Values.notary.enabled }} - - name: notary - port: {{ $loadBalancer.ports.notaryPort }} - targetPort: 4443 - {{- end }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: nginx -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/notary/notary-secret.yaml b/charts/harbor/harbor/1.12.3/templates/notary/notary-secret.yaml deleted file mode 100644 index 6de63dd8c5..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/notary/notary-secret.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if and .Values.notary.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.notary-server" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: notary -type: Opaque -data: - {{- if not .Values.notary.secretName }} - {{- $ca := genCA "harbor-notary-ca" 365 }} - {{- $cert := genSignedCert (include "harbor.notary-signer" .) nil (list (include "harbor.notary-signer" .)) 365 $ca }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - {{- end }} - server.json: {{ tpl (.Files.Get "conf/notary-server.json") . | b64enc }} - signer.json: {{ tpl (.Files.Get "conf/notary-signer.json") . | b64enc }} - NOTARY_SERVER_DB_URL: {{ include "harbor.database.notaryServer" . | b64enc }} - NOTARY_SIGNER_DB_URL: {{ include "harbor.database.notarySigner" . | b64enc }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/notary/notary-server.yaml b/charts/harbor/harbor/1.12.3/templates/notary/notary-server.yaml deleted file mode 100644 index 64cfd293f2..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/notary/notary-server.yaml +++ /dev/null @@ -1,111 +0,0 @@ -{{ if .Values.notary.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.notary-server" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: notary-server -spec: - replicas: {{ .Values.notary.server.replicas }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: notary-server - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: notary-server - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/notary/notary-secret.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if .Values.notary.server.podAnnotations }} -{{ toYaml .Values.notary.server.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.notary.server.serviceAccountName }} - serviceAccountName: {{ .Values.notary.server.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.notary.server.automountServiceAccountToken | default false }} - containers: - - name: notary-server - image: {{ .Values.notary.server.image.repository }}:{{ .Values.notary.server.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /_notary_server/health - scheme: "HTTP" - port: 4443 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /_notary_server/health - scheme: "HTTP" - port: 4443 - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.notary.server.resources }} - resources: -{{ toYaml .Values.notary.server.resources | indent 10 }} -{{- end }} - env: - - name: MIGRATIONS_PATH - value: migrations/server/postgresql - - name: DB_URL - valueFrom: - secretKeyRef: - name: {{ template "harbor.notary-server" . }} - key: NOTARY_SERVER_DB_URL - volumeMounts: - - name: config - mountPath: /etc/notary/server-config.postgres.json - subPath: server.json - - name: token-service-certificate - mountPath: /root.crt - subPath: tls.crt - - name: signer-certificate - mountPath: /etc/ssl/notary/ca.crt - subPath: ca.crt - volumes: - - name: config - secret: - secretName: "{{ template "harbor.notary-server" . }}" - - name: token-service-certificate - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - - name: signer-certificate - secret: - {{- if .Values.notary.secretName }} - secretName: {{ .Values.notary.secretName }} - {{- else }} - secretName: {{ template "harbor.notary-server" . }} - {{- end }} - {{- with .Values.notary.server.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.notary.server.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.notary.server.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.notary.server.priorityClassName }} - priorityClassName: {{ .Values.notary.server.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.12.3/templates/notary/notary-signer.yaml b/charts/harbor/harbor/1.12.3/templates/notary/notary-signer.yaml deleted file mode 100644 index d94e4909bf..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/notary/notary-signer.yaml +++ /dev/null @@ -1,105 +0,0 @@ -{{ if .Values.notary.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.notary-signer" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: notary-signer -spec: - replicas: {{ .Values.notary.signer.replicas }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: notary-signer - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: notary-signer - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/notary/notary-secret.yaml") . | sha256sum }} -{{- if .Values.notary.signer.podAnnotations }} -{{ toYaml .Values.notary.signer.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.notary.signer.serviceAccountName }} - serviceAccountName: {{ .Values.notary.signer.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.notary.signer.automountServiceAccountToken | default false }} - containers: - - name: notary-signer - image: {{ .Values.notary.signer.image.repository }}:{{ .Values.notary.signer.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: "HTTPS" - port: 7899 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: "HTTPS" - port: 7899 - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.notary.signer.resources }} - resources: -{{ toYaml .Values.notary.signer.resources | indent 10 }} -{{- end }} - env: - - name: MIGRATIONS_PATH - value: migrations/signer/postgresql - - name: DB_URL - valueFrom: - secretKeyRef: - name: {{ template "harbor.notary-server" . }} - key: NOTARY_SIGNER_DB_URL - - name: NOTARY_SIGNER_DEFAULTALIAS - value: defaultalias - volumeMounts: - - name: config - mountPath: /etc/notary/signer-config.postgres.json - subPath: signer.json - - name: signer-certificate - mountPath: /etc/ssl/notary/tls.crt - subPath: tls.crt - - name: signer-certificate - mountPath: /etc/ssl/notary/tls.key - subPath: tls.key - volumes: - - name: config - secret: - secretName: "{{ template "harbor.notary-server" . }}" - - name: signer-certificate - secret: - {{- if .Values.notary.secretName }} - secretName: {{ .Values.notary.secretName }} - {{- else }} - secretName: {{ template "harbor.notary-server" . }} - {{- end }} - {{- with .Values.notary.signer.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.notary.signer.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.notary.signer.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.notary.signer.priorityClassName }} - priorityClassName: {{ .Values.notary.signer.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.12.3/templates/notary/notary-svc.yaml b/charts/harbor/harbor/1.12.3/templates/notary/notary-svc.yaml deleted file mode 100644 index b6aa42d89e..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/notary/notary-svc.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{ if .Values.notary.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.notary-server" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.notary.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: 4443 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: notary-server - ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.notary-signer" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 7899 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: notary-signer -{{ end }} diff --git a/charts/harbor/harbor/1.12.3/templates/portal/configmap.yaml b/charts/harbor/harbor/1.12.3/templates/portal/configmap.yaml deleted file mode 100644 index 1cea8ab63f..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/portal/configmap.yaml +++ /dev/null @@ -1,63 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - events { - worker_connections 1024; - } - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - {{- if .Values.internalTLS.enabled }} - {{- if .Values.ipFamily.ipv4.enabled}} - listen {{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - # SSL - ssl_certificate /etc/harbor/ssl/portal/tls.crt; - ssl_certificate_key /etc/harbor/ssl/portal/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2; - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - {{- else }} - {{- if .Values.ipFamily.ipv4.enabled }} - listen {{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- end }} - server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location /devcenter-api-2.0 { - try_files $uri $uri/ /swagger-ui-index.html; - } - location / { - try_files $uri $uri/ /index.html; - } - location = /index.html { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - } - } diff --git a/charts/harbor/harbor/1.12.3/templates/portal/deployment.yaml b/charts/harbor/harbor/1.12.3/templates/portal/deployment.yaml deleted file mode 100644 index d3469deef4..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/portal/deployment.yaml +++ /dev/null @@ -1,97 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: portal -spec: - replicas: {{ .Values.portal.replicas }} - revisionHistoryLimit: {{ .Values.portal.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: portal - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: portal - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} -{{- end }} - checksum/configmap: {{ include (print $.Template.BasePath "/portal/configmap.yaml") . | sha256sum }} -{{- if .Values.portal.podAnnotations }} -{{ toYaml .Values.portal.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- if .Values.portal.serviceAccountName }} - serviceAccountName: {{ .Values.portal.serviceAccountName }} -{{- end }} - automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }} - containers: - - name: portal - image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} -{{- if .Values.portal.resources }} - resources: -{{ toYaml .Values.portal.resources | indent 10 }} -{{- end }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: {{ template "harbor.portal.containerPort" . }} - volumeMounts: - - name: portal-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - mountPath: /etc/harbor/ssl/portal - {{- end }} - volumes: - - name: portal-config - configMap: - name: "{{ template "harbor.portal" . }}" - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.portal.secretName" . }} - {{- end }} - {{- with .Values.portal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.portal.priorityClassName }} - priorityClassName: {{ .Values.portal.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/portal/service.yaml b/charts/harbor/harbor/1.12.3/templates/portal/service.yaml deleted file mode 100644 index ff4eda435b..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/portal/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: {{ template "harbor.portal.servicePort" . }} - targetPort: {{ template "harbor.portal.containerPort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: portal diff --git a/charts/harbor/harbor/1.12.3/templates/portal/tls.yaml b/charts/harbor/harbor/1.12.3/templates/portal/tls.yaml deleted file mode 100644 index de63f4e813..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/portal/tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.portal.crt\" is required!" .Values.internalTLS.portal.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.portal.key\" is required!" .Values.internalTLS.portal.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/redis/service.yaml b/charts/harbor/harbor/1.12.3/templates/redis/service.yaml deleted file mode 100644 index 79c95c3e05..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/redis/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 6379 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: redis -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/redis/statefulset.yaml b/charts/harbor/harbor/1.12.3/templates/redis/statefulset.yaml deleted file mode 100644 index 74b7581fd8..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/redis/statefulset.yaml +++ /dev/null @@ -1,109 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -{{- $redis := .Values.persistence.persistentVolumeClaim.redis -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: redis -spec: - replicas: 1 - serviceName: {{ template "harbor.redis" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: redis - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: redis -{{- if .Values.redis.podAnnotations }} - annotations: -{{ toYaml .Values.redis.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.redis.internal.serviceAccountName }} - serviceAccountName: {{ .Values.redis.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.redis.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: redis - image: {{ .Values.redis.internal.image.repository }}:{{ .Values.redis.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.redis.internal.resources }} - resources: -{{ toYaml .Values.redis.internal.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: {{ $redis.subPath }} - {{- if not .Values.persistence.enabled }} - volumes: - - name: data - emptyDir: {} - {{- else if $redis.existingClaim }} - volumes: - - name: data - persistentVolumeClaim: - claimName: {{ $redis.existingClaim }} - {{- end -}} - {{- with .Values.redis.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.redis.internal.priorityClassName }} - priorityClassName: {{ .Values.redis.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $redis.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $redis.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $redis.accessMode | quote }}] - {{- if $redis.storageClass }} - {{- if (eq "-" $redis.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $redis.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $redis.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.12.3/templates/registry/registry-cm.yaml b/charts/harbor/harbor/1.12.3/templates/registry/registry-cm.yaml deleted file mode 100644 index 4f7056c384..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/registry/registry-cm.yaml +++ /dev/null @@ -1,246 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - version: 0.1 - log: - {{- if eq .Values.logLevel "warning" }} - level: warn - {{- else if eq .Values.logLevel "fatal" }} - level: error - {{- else }} - level: {{ .Values.logLevel }} - {{- end }} - fields: - service: registry - storage: - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if eq $type "filesystem" }} - filesystem: - rootdirectory: {{ $storage.filesystem.rootdirectory }} - {{- if $storage.filesystem.maxthreads }} - maxthreads: {{ $storage.filesystem.maxthreads }} - {{- end }} - {{- else if eq $type "azure" }} - azure: - accountname: {{ $storage.azure.accountname }} - container: {{ $storage.azure.container }} - {{- if $storage.azure.realm }} - realm: {{ $storage.azure.realm }} - {{- end }} - {{- else if eq $type "gcs" }} - gcs: - bucket: {{ $storage.gcs.bucket }} - {{- if not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity }} - keyfile: /etc/registry/gcs-key.json - {{- end }} - {{- if $storage.gcs.rootdirectory }} - rootdirectory: {{ $storage.gcs.rootdirectory }} - {{- end }} - {{- if $storage.gcs.chunksize }} - chunksize: {{ $storage.gcs.chunksize }} - {{- end }} - {{- else if eq $type "s3" }} - s3: - region: {{ $storage.s3.region }} - bucket: {{ $storage.s3.bucket }} - {{- if $storage.s3.regionendpoint }} - regionendpoint: {{ $storage.s3.regionendpoint }} - {{- end }} - {{- if $storage.s3.encrypt }} - encrypt: {{ $storage.s3.encrypt }} - {{- end }} - {{- if $storage.s3.keyid }} - keyid: {{ $storage.s3.keyid }} - {{- end }} - {{- if $storage.s3.secure }} - secure: {{ $storage.s3.secure }} - {{- end }} - {{- if and $storage.s3.secure $storage.s3.skipverify }} - skipverify: {{ $storage.s3.skipverify }} - {{- end }} - {{- if $storage.s3.v4auth }} - v4auth: {{ $storage.s3.v4auth }} - {{- end }} - {{- if $storage.s3.chunksize }} - chunksize: {{ $storage.s3.chunksize }} - {{- end }} - {{- if $storage.s3.rootdirectory }} - rootdirectory: {{ $storage.s3.rootdirectory }} - {{- end }} - {{- if $storage.s3.storageclass }} - storageclass: {{ $storage.s3.storageclass }} - {{- end }} - {{- if $storage.s3.multipartcopychunksize }} - multipartcopychunksize: {{ $storage.s3.multipartcopychunksize }} - {{- end }} - {{- if $storage.s3.multipartcopymaxconcurrency }} - multipartcopymaxconcurrency: {{ $storage.s3.multipartcopymaxconcurrency }} - {{- end }} - {{- if $storage.s3.multipartcopythresholdsize }} - multipartcopythresholdsize: {{ $storage.s3.multipartcopythresholdsize }} - {{- end }} - {{- else if eq $type "swift" }} - swift: - authurl: {{ $storage.swift.authurl }} - username: {{ $storage.swift.username }} - container: {{ $storage.swift.container }} - {{- if $storage.swift.region }} - region: {{ $storage.swift.region }} - {{- end }} - {{- if $storage.swift.tenant }} - tenant: {{ $storage.swift.tenant }} - {{- end }} - {{- if $storage.swift.tenantid }} - tenantid: {{ $storage.swift.tenantid }} - {{- end }} - {{- if $storage.swift.domain }} - domain: {{ $storage.swift.domain }} - {{- end }} - {{- if $storage.swift.domainid }} - domainid: {{ $storage.swift.domainid }} - {{- end }} - {{- if $storage.swift.trustid }} - trustid: {{ $storage.swift.trustid }} - {{- end }} - {{- if $storage.swift.insecureskipverify }} - insecureskipverify: {{ $storage.swift.insecureskipverify }} - {{- end }} - {{- if $storage.swift.chunksize }} - chunksize: {{ $storage.swift.chunksize }} - {{- end }} - {{- if $storage.swift.prefix }} - prefix: {{ $storage.swift.prefix }} - {{- end }} - {{- if $storage.swift.authversion }} - authversion: {{ $storage.swift.authversion }} - {{- end }} - {{- if $storage.swift.endpointtype }} - endpointtype: {{ $storage.swift.endpointtype }} - {{- end }} - {{- if $storage.swift.tempurlcontainerkey }} - tempurlcontainerkey: {{ $storage.swift.tempurlcontainerkey }} - {{- end }} - {{- if $storage.swift.tempurlmethods }} - tempurlmethods: {{ $storage.swift.tempurlmethods }} - {{- end }} - {{- else if eq $type "oss" }} - oss: - accesskeyid: {{ $storage.oss.accesskeyid }} - region: {{ $storage.oss.region }} - bucket: {{ $storage.oss.bucket }} - {{- if $storage.oss.endpoint }} - endpoint: {{ $storage.oss.bucket }}.{{ $storage.oss.endpoint }} - {{- end }} - {{- if $storage.oss.internal }} - internal: {{ $storage.oss.internal }} - {{- end }} - {{- if $storage.oss.encrypt }} - encrypt: {{ $storage.oss.encrypt }} - {{- end }} - {{- if $storage.oss.secure }} - secure: {{ $storage.oss.secure }} - {{- end }} - {{- if $storage.oss.chunksize }} - chunksize: {{ $storage.oss.chunksize }} - {{- end }} - {{- if $storage.oss.rootdirectory }} - rootdirectory: {{ $storage.oss.rootdirectory }} - {{- end }} - {{- end }} - cache: - layerinfo: redis - maintenance: - uploadpurging: - {{- if .Values.registry.upload_purging.enabled }} - enabled: true - age: {{ .Values.registry.upload_purging.age }} - interval: {{ .Values.registry.upload_purging.interval }} - dryrun: {{ .Values.registry.upload_purging.dryrun }} - {{- else }} - enabled: false - {{- end }} - delete: - enabled: true - redirect: - disable: {{ $storage.disableredirect }} - redis: - addr: {{ template "harbor.redis.addr" . }} - {{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }} - sentinelMasterSet: {{ template "harbor.redis.masterSet" . }} - {{- end }} - db: {{ template "harbor.redis.dbForRegistry" . }} - {{- if not (eq (include "harbor.redis.password" .) "") }} - password: {{ template "harbor.redis.password" . }} - {{- end }} - readtimeout: 10s - writetimeout: 10s - dialtimeout: 10s - pool: - maxidle: 100 - maxactive: 500 - idletimeout: 60s - http: - addr: :{{ template "harbor.registry.containerPort" . }} - relativeurls: {{ .Values.registry.relativeurls }} - {{- if .Values.internalTLS.enabled }} - tls: - certificate: /etc/harbor/ssl/registry/tls.crt - key: /etc/harbor/ssl/registry/tls.key - minimumtls: tls1.2 - {{- end }} - # set via environment variable - # secret: placeholder - debug: - {{- if .Values.metrics.enabled}} - addr: :{{ .Values.metrics.registry.port }} - prometheus: - enabled: true - path: {{ .Values.metrics.registry.path }} - {{- else }} - addr: localhost:5001 - {{- end }} - auth: - htpasswd: - realm: harbor-registry-basic-realm - path: /etc/registry/passwd - validation: - disabled: true - compatibility: - schema1: - enabled: true - - {{- if .Values.registry.middleware.enabled }} - {{- $middleware := .Values.registry.middleware }} - {{- $middlewareType := $middleware.type }} - {{- if eq $middlewareType "cloudFront" }} - middleware: - storage: - - name: cloudfront - options: - baseurl: {{ $middleware.cloudFront.baseurl }} - privatekey: /etc/registry/pk.pem - keypairid: {{ $middleware.cloudFront.keypairid }} - duration: {{ $middleware.cloudFront.duration }} - ipfilteredby: {{ $middleware.cloudFront.ipfilteredby }} - {{- end }} - {{- end }} - ctl-config.yml: |+ - --- - {{- if .Values.internalTLS.enabled }} - protocol: "https" - port: 8443 - https_config: - cert: "/etc/harbor/ssl/registry/tls.crt" - key: "/etc/harbor/ssl/registry/tls.key" - {{- else }} - protocol: "http" - port: 8080 - {{- end }} - log_level: {{ .Values.logLevel }} - registry_config: "/etc/registry/config.yml" diff --git a/charts/harbor/harbor/1.12.3/templates/registry/registry-dpl.yaml b/charts/harbor/harbor/1.12.3/templates/registry/registry-dpl.yaml deleted file mode 100644 index 118a165d46..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/registry/registry-dpl.yaml +++ /dev/null @@ -1,317 +0,0 @@ -{{- $storage := .Values.persistence.imageChartStorage }} -{{- $type := $storage.type }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - replicas: {{ .Values.registry.replicas }} - revisionHistoryLimit: {{ .Values.registry.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: registry - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: registry - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/registry/registry-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.registry.podAnnotations }} -{{ toYaml .Values.registry.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - fsGroupChangePolicy: OnRootMismatch -{{- if .Values.registry.serviceAccountName }} - serviceAccountName: {{ .Values.registry.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: registry - image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.registry.resources }} - resources: -{{ toYaml .Values.registry.registry.resources | indent 10 }} -{{- end }} - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: "{{ template "harbor.registry" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - ports: - - containerPort: {{ template "harbor.registry.containerPort" . }} - - containerPort: 5001 - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-htpasswd - mountPath: /etc/registry/passwd - subPath: passwd - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - mountPath: /etc/registry/pk.pem - subPath: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - - name: registryctl - image: {{ .Values.registry.controller.image.repository }}:{{ .Values.registry.controller.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.controller.resources }} - resources: -{{ toYaml .Values.registry.controller.resources | indent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.registryCtl" . }}" - - secretRef: - name: "{{ template "harbor.registry" . }}" - - secretRef: - name: "{{ template "harbor.registryCtl" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.jobservice" . }} - key: JOBSERVICE_SECRET - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - ports: - - containerPort: {{ template "harbor.registryctl.containerPort" . }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: registry-htpasswd - secret: - {{- if not .Values.registry.credentials.existingSecret }} - secretName: {{ template "harbor.registry" . }}-htpasswd - {{ else }} - secretName: {{ .Values.registry.credentials.existingSecret }} - {{- end }} - items: - - key: REGISTRY_HTPASSWD - path: passwd - - name: registry-config - configMap: - name: "{{ template "harbor.registry" . }}" - - name: registry-data - {{- if and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "filesystem") }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.registry.existingClaim | default (include "harbor.registry" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.registry.secretName" . }} - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - secret: - {{- if and (eq $type "gcs") $storage.gcs.existingSecret }} - secretName: {{ $storage.gcs.existingSecret }} - {{- else }} - secretName: {{ template "harbor.registry" . }} - {{- end }} - items: - - key: GCS_KEY_DATA - path: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - secret: - secretName: {{ .Values.persistence.imageChartStorage.caBundleSecretName }} - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - secret: - secretName: {{ .Values.registry.middleware.cloudFront.privateKeySecret }} - items: - - key: CLOUDFRONT_KEY_DATA - path: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.registry.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.registry.priorityClassName }} - priorityClassName: {{ .Values.registry.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/registry/registry-pvc.yaml b/charts/harbor/harbor/1.12.3/templates/registry/registry-pvc.yaml deleted file mode 100644 index 2112e22877..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/registry/registry-pvc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.persistence.enabled }} -{{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} -{{- if and (not $registry.existingClaim) (eq .Values.persistence.imageChartStorage.type "filesystem") }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.registry" . }} - annotations: - {{- range $key, $value := $registry.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - accessModes: - - {{ $registry.accessMode }} - resources: - requests: - storage: {{ $registry.size }} - {{- if $registry.storageClass }} - {{- if eq "-" $registry.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $registry.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/registry/registry-secret.yaml b/charts/harbor/harbor/1.12.3/templates/registry/registry-secret.yaml deleted file mode 100644 index 529462906e..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/registry/registry-secret.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.redis.external.existingSecret }} - REGISTRY_REDIS_PASSWORD: {{ include "harbor.redis.password" . | b64enc | quote }} - {{- end }} - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if and (eq $type "azure") (not $storage.azure.existingSecret) }} - REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }} - {{- else if and (and (eq $type "gcs") (not $storage.gcs.existingSecret)) (not $storage.gcs.useWorkloadIdentity) }} - GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }} - {{- else if eq $type "s3" }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.accesskey) }} - REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }} - {{- end }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.secretkey) }} - REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }} - {{- end }} - {{- else if eq $type "swift" }} - REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }} - {{- if $storage.swift.secretkey }} - REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }} - {{- end }} - {{- if $storage.swift.accesskey }} - REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }} - {{- end }} - {{- else if eq $type "oss" }} - REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }} - {{- end }} -{{- if not .Values.registry.credentials.existingSecret }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}-htpasswd" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if .Values.registry.credentials.htpasswdString }} - REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswdString | b64enc | quote }} - {{- else }} - REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/registry/registry-svc.yaml b/charts/harbor/harbor/1.12.3/templates/registry/registry-svc.yaml deleted file mode 100644 index 749690ea03..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/registry/registry-svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }} - port: {{ template "harbor.registry.servicePort" . }} - - - name: {{ ternary "https-controller" "http-controller" .Values.internalTLS.enabled }} - port: {{ template "harbor.registryctl.servicePort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.registry.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/registry/registry-tls.yaml b/charts/harbor/harbor/1.12.3/templates/registry/registry-tls.yaml deleted file mode 100644 index 9d1862c417..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/registry/registry-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.registry.crt\" is required!" .Values.internalTLS.registry.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.registry.key\" is required!" .Values.internalTLS.registry.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/registry/registryctl-cm.yaml b/charts/harbor/harbor/1.12.3/templates/registry/registryctl-cm.yaml deleted file mode 100644 index 87aa5ffe24..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/registry/registryctl-cm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- template "harbor.traceEnvsForRegistryCtl" . }} diff --git a/charts/harbor/harbor/1.12.3/templates/registry/registryctl-secret.yaml b/charts/harbor/harbor/1.12.3/templates/registry/registryctl-secret.yaml deleted file mode 100644 index 70097703e9..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/registry/registryctl-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- template "harbor.traceJaegerPassword" . }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.3/templates/trivy/trivy-secret.yaml b/charts/harbor/harbor/1.12.3/templates/trivy/trivy-secret.yaml deleted file mode 100644 index 84652c7498..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/trivy/trivy-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.trivy.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - redisURL: {{ include "harbor.redis.urlForTrivy" . | b64enc }} - gitHubToken: {{ .Values.trivy.gitHubToken | default "" | b64enc | quote }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/trivy/trivy-sts.yaml b/charts/harbor/harbor/1.12.3/templates/trivy/trivy-sts.yaml deleted file mode 100644 index 37b19ac2d3..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/trivy/trivy-sts.yaml +++ /dev/null @@ -1,206 +0,0 @@ -{{- if .Values.trivy.enabled }} -{{- $trivy := .Values.persistence.persistentVolumeClaim.trivy }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: trivy -spec: - replicas: {{ .Values.trivy.replicas }} - serviceName: {{ template "harbor.trivy" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: trivy - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: trivy - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/trivy/trivy-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/trivy/trivy-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.trivy.podAnnotations }} -{{ toYaml .Values.trivy.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} -{{- end }} -{{- if .Values.trivy.serviceAccountName }} - serviceAccountName: {{ .Values.trivy.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }} - containers: - - name: trivy - image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - securityContext: - privileged: false - allowPrivilegeEscalation: false - env: - {{- if has "trivy" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - - name: "SCANNER_LOG_LEVEL" - value: {{ .Values.logLevel | quote }} - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: {{ .Values.trivy.debugMode | quote }} - - name: "SCANNER_TRIVY_VULN_TYPE" - value: {{ .Values.trivy.vulnType | quote }} - - name: "SCANNER_TRIVY_TIMEOUT" - value: {{ .Values.trivy.timeout | quote }} - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: {{ .Values.trivy.severity | quote }} - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: {{ .Values.trivy.ignoreUnfixed | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: {{ .Values.trivy.skipUpdate | default false | quote }} - - name: "SCANNER_TRIVY_OFFLINE_SCAN" - value: {{ .Values.trivy.offlineScan | default false | quote }} - - name: "SCANNER_TRIVY_SECURITY_CHECKS" - value: {{ .Values.trivy.securityCheck | quote }} - - name: "SCANNER_TRIVY_INSECURE" - value: {{ .Values.trivy.insecure | default false | quote }} - - name: SCANNER_API_SERVER_ADDR - value: ":{{ template "harbor.trivy.containerPort" . }}" - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: SCANNER_API_SERVER_TLS_KEY - value: /etc/harbor/ssl/trivy/tls.key - - name: SCANNER_API_SERVER_TLS_CERTIFICATE - value: /etc/harbor/ssl/trivy/tls.crt - {{- end }} - - name: "SCANNER_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - ports: - - name: api-server - containerPort: {{ template "harbor.trivy.containerPort" . }} - volumeMounts: - - name: data - mountPath: /home/scanner/.cache - subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} - readOnly: false - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - mountPath: /etc/harbor/ssl/trivy - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 10 }} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: -{{ toYaml .Values.trivy.resources | indent 12 }} - {{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }} - volumes: - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.trivy.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- if not .Values.persistence.enabled }} - - name: "data" - emptyDir: {} - {{- else if $trivy.existingClaim }} - - name: "data" - persistentVolumeClaim: - claimName: {{ $trivy.existingClaim }} - {{- end }} - {{- end }} - {{- with .Values.trivy.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.trivy.priorityClassName }} - priorityClassName: {{ .Values.trivy.priorityClassName }} - {{- end }} -{{- if and .Values.persistence.enabled (not $trivy.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $trivy.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $trivy.accessMode | quote }}] - {{- if $trivy.storageClass }} - {{- if (eq "-" $trivy.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $trivy.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $trivy.size | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/templates/trivy/trivy-svc.yaml b/charts/harbor/harbor/1.12.3/templates/trivy/trivy-svc.yaml deleted file mode 100644 index 24daf094e8..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/trivy/trivy-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{ if .Values.trivy.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.trivy" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-trivy" "http-trivy" .Values.internalTLS.enabled }} - protocol: TCP - port: {{ template "harbor.trivy.servicePort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: trivy -{{ end }} diff --git a/charts/harbor/harbor/1.12.3/templates/trivy/trivy-tls.yaml b/charts/harbor/harbor/1.12.3/templates/trivy/trivy-tls.yaml deleted file mode 100644 index a9c8330c37..0000000000 --- a/charts/harbor/harbor/1.12.3/templates/trivy/trivy-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.trivy.enabled .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.trivy.crt\" is required!" .Values.internalTLS.trivy.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.trivy.key\" is required!" .Values.internalTLS.trivy.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.3/values.yaml b/charts/harbor/harbor/1.12.3/values.yaml deleted file mode 100644 index d8f4319ffc..0000000000 --- a/charts/harbor/harbor/1.12.3/values.yaml +++ /dev/null @@ -1,944 +0,0 @@ -expose: - # Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" - # and fill the information in the corresponding section - type: ingress - tls: - # Enable TLS or not. - # Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" - # Note: if the "expose.type" is "ingress" and TLS is disabled, - # the port must be included in the command when pulling/pushing images. - # Refer to https://github.com/goharbor/harbor/issues/5291 for details. - enabled: true - # The source of the tls certificate. Set as "auto", "secret" - # or "none" and fill the information in the corresponding section - # 1) auto: generate the tls certificate automatically - # 2) secret: read the tls certificate from the specified secret. - # The tls certificate can be generated manually or by cert manager - # 3) none: configure no tls certificate for the ingress. If the default - # tls certificate is configured in the ingress controller, choose this option - certSource: auto - auto: - # The common name used to generate the certificate, it's necessary - # when the type isn't "ingress" - commonName: "" - secret: - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - secretName: "" - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - # Only needed when the "expose.type" is "ingress". - notarySecretName: "" - ingress: - hosts: - core: core.harbor.domain - notary: notary.harbor.domain - # set to the type of ingress controller if it has specific requirements. - # leave as `default` for most ingress controllers. - # set to `gce` if using the GCE ingress controller - # set to `ncp` if using the NCP (NSX-T Container Plugin) ingress controller - # set to `alb` if using the ALB ingress controller - # set to `f5-bigip` if using the F5 BIG-IP ingress controller - controller: default - ## Allow .Capabilities.KubeVersion.Version to be overridden while creating ingress - kubeVersionOverride: "" - className: "" - annotations: - # note different ingress controllers may require a different ssl-redirect annotation - # for Envoy, use ingress.kubernetes.io/force-ssl-redirect: "true" and remove the nginx lines below - ingress.kubernetes.io/ssl-redirect: "true" - ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - notary: - # notary ingress-specific annotations - annotations: {} - # notary ingress-specific labels - labels: {} - harbor: - # harbor ingress-specific annotations - annotations: {} - # harbor ingress-specific labels - labels: {} - clusterIP: - # The name of ClusterIP service - name: harbor - # Annotations on the ClusterIP service - annotations: {} - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - # The service port Notary listens on. Only needed when notary.enabled - # is set to true - notaryPort: 4443 - nodePort: - # The name of NodePort service - name: harbor - ports: - http: - # The service port Harbor listens on when serving HTTP - port: 80 - # The node port Harbor listens on when serving HTTP - nodePort: 30002 - https: - # The service port Harbor listens on when serving HTTPS - port: 443 - # The node port Harbor listens on when serving HTTPS - nodePort: 30003 - # Only needed when notary.enabled is set to true - notary: - # The service port Notary listens on - port: 4443 - # The node port Notary listens on - nodePort: 30004 - loadBalancer: - # The name of LoadBalancer service - name: harbor - # Set the IP if the LoadBalancer supports assigning IP - IP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - # The service port Notary listens on. Only needed when notary.enabled - # is set to true - notaryPort: 4443 - annotations: {} - sourceRanges: [] - -# The external URL for Harbor core service. It is used to -# 1) populate the docker/helm commands showed on portal -# 2) populate the token service URL returned to docker/notary client -# -# Format: protocol://domain[:port]. Usually: -# 1) if "expose.type" is "ingress", the "domain" should be -# the value of "expose.ingress.hosts.core" -# 2) if "expose.type" is "clusterIP", the "domain" should be -# the value of "expose.clusterIP.name" -# 3) if "expose.type" is "nodePort", the "domain" should be -# the IP address of k8s node -# -# If Harbor is deployed behind the proxy, set it as the URL of proxy -externalURL: https://core.harbor.domain - -# The internal TLS used for harbor components secure communicating. In order to enable https -# in each components tls cert files need to provided in advance. -internalTLS: - # If internal TLS enabled - enabled: false - # There are three ways to provide tls - # 1) "auto" will generate cert automatically - # 2) "manual" need provide cert file manually in following value - # 3) "secret" internal certificates from secret - certSource: "auto" - # The content of trust ca, only available when `certSource` is "manual" - trustCa: "" - # core related cert configuration - core: - # secret name for core's tls certs - secretName: "" - # Content of core's TLS cert file, only available when `certSource` is "manual" - crt: "" - # Content of core's TLS key file, only available when `certSource` is "manual" - key: "" - # jobservice related cert configuration - jobservice: - # secret name for jobservice's tls certs - secretName: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - key: "" - # registry related cert configuration - registry: - # secret name for registry's tls certs - secretName: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - key: "" - # portal related cert configuration - portal: - # secret name for portal's tls certs - secretName: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - key: "" - # trivy related cert configuration - trivy: - # secret name for trivy's tls certs - secretName: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - key: "" - -ipFamily: - # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component - ipv6: - enabled: true - # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component - ipv4: - enabled: true - -# The persistence is enabled by default and a default StorageClass -# is needed in the k8s cluster to provision volumes dynamically. -# Specify another StorageClass in the "storageClass" or set "existingClaim" -# if you already have existing persistent volumes to use -# -# For storing images and charts, you can also use "azure", "gcs", "s3", -# "swift" or "oss". Set it in the "imageChartStorage" section -persistence: - enabled: true - # Setting it to "keep" to avoid removing PVCs during a helm delete - # operation. Leaving it empty will delete PVCs after the chart deleted - # (this does not apply for PVCs that are created for internal database - # and redis components, i.e. they are never deleted automatically) - resourcePolicy: "keep" - persistentVolumeClaim: - registry: - # Use the existing PVC which must be created manually before bound, - # and specify the "subPath" if the PVC is shared with other components - existingClaim: "" - # Specify the "storageClass" used to provision the volume. Or the default - # StorageClass will be used (the default). - # Set it to "-" to disable dynamic provisioning - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - jobservice: - jobLog: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external database is used, the following settings for database will - # be ignored - database: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external Redis is used, the following settings for Redis will - # be ignored - redis: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - trivy: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - # Define which storage backend is used for registry to store - # images and charts. Refer to - # https://github.com/docker/distribution/blob/master/docs/configuration.md#storage - # for the detail. - imageChartStorage: - # Specify whether to disable `redirect` for images and chart storage, for - # backends which not supported it (such as using minio for `s3` storage type), please disable - # it. To disable redirects, simply set `disableredirect` to `true` instead. - # Refer to - # https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect - # for the detail. - disableredirect: false - # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate. - # The secret must contain keys named "ca.crt" which will be injected into the trust store - # of registry's containers. - # caBundleSecretName: - - # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift", - # "oss" and fill the information needed in the corresponding section. The type - # must be "filesystem" if you want to use persistent volumes for registry - type: filesystem - filesystem: - rootdirectory: /storage - #maxthreads: 100 - azure: - accountname: accountname - accountkey: base64encodedaccountkey - container: containername - #realm: core.windows.net - # To use existing secret, the key must be AZURE_STORAGE_ACCESS_KEY - existingSecret: "" - gcs: - bucket: bucketname - # The base64 encoded json file which contains the key - encodedkey: base64-encoded-json-key-file - #rootdirectory: /gcs/object/name/prefix - #chunksize: "5242880" - # To use existing secret, the key must be gcs-key.json - existingSecret: "" - useWorkloadIdentity: false - s3: - # Set an existing secret for S3 accesskey and secretkey - # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry - #existingSecret: "" - region: us-west-1 - bucket: bucketname - #accesskey: awsaccesskey - #secretkey: awssecretkey - #regionendpoint: http://myobjects.local - #encrypt: false - #keyid: mykeyid - #secure: true - #skipverify: false - #v4auth: true - #chunksize: "5242880" - #rootdirectory: /s3/object/name/prefix - #storageclass: STANDARD - #multipartcopychunksize: "33554432" - #multipartcopymaxconcurrency: 100 - #multipartcopythresholdsize: "33554432" - swift: - authurl: https://storage.myprovider.com/v3/auth - username: username - password: password - container: containername - #region: fr - #tenant: tenantname - #tenantid: tenantid - #domain: domainname - #domainid: domainid - #trustid: trustid - #insecureskipverify: false - #chunksize: 5M - #prefix: - #secretkey: secretkey - #accesskey: accesskey - #authversion: 3 - #endpointtype: public - #tempurlcontainerkey: false - #tempurlmethods: - oss: - accesskeyid: accesskeyid - accesskeysecret: accesskeysecret - region: regionname - bucket: bucketname - #endpoint: endpoint - #internal: false - #encrypt: false - #secure: true - #chunksize: 10M - #rootdirectory: rootdirectory - -imagePullPolicy: IfNotPresent - -# Use this set to assign a list of default pullSecrets -imagePullSecrets: -# - name: docker-registry-secret -# - name: internal-registry-secret - -# The update strategy for deployments with persistent volumes(jobservice, registry): "RollingUpdate" or "Recreate" -# Set it as "Recreate" when "RWM" for volumes isn't supported -updateStrategy: - type: RollingUpdate - -# debug, info, warning, error or fatal -logLevel: info - -# The initial password of Harbor admin. Change it from portal after launching Harbor -# or give an existing secret for it -# key in secret is given via (default to HARBOR_ADMIN_PASSWORD) -# existingSecretAdminPassword: -existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD -harborAdminPassword: "Harbor12345" - -# The name of the secret which contains key named "ca.crt". Setting this enables the -# download link on portal to download the CA certificate when the certificate isn't -# generated automatically -caSecretName: "" - -# The secret key used for encryption. Must be a string of 16 chars. -secretKey: "not-a-secure-key" -# If using existingSecretSecretKey, the key must be secretKey -existingSecretSecretKey: "" - -# The proxy settings for updating trivy vulnerabilities from the Internet and replicating -# artifacts from/to the registries that cannot be reached directly -proxy: - httpProxy: - httpsProxy: - noProxy: 127.0.0.1,localhost,.local,.internal - components: - - core - - jobservice - - trivy - -# Run the migration job via helm hook -enableMigrateHelmHook: false - -# The custom ca bundle secret, the secret must contain key named "ca.crt" -# which will be injected into the trust store for core, jobservice, registry, trivy components -# caBundleSecretName: "" - -## UAA Authentication Options -# If you're using UAA for authentication behind a self-signed -# certificate you will need to provide the CA Cert. -# Set uaaSecretName below to provide a pre-created secret that -# contains a base64 encoded CA Certificate named `ca.crt`. -# uaaSecretName: - -# If service exposed via "ingress", the Nginx will not be used -nginx: - image: - repository: goharbor/nginx-photon - tag: v2.8.3 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - -portal: - image: - repository: goharbor/harbor-portal - tag: v2.8.3 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - -core: - image: - repository: goharbor/harbor-core - tag: v2.8.3 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - ## Startup probe values - startupProbe: - enabled: true - initialDelaySeconds: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## Additional service annotations - serviceAnnotations: {} - # Secret is used when core server communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Fill the name of a kubernetes secret if you want to use your own - # TLS certificate and private key for token encryption/decryption. - # The secret must contain keys named: - # "tls.key" - the private key - # "tls.crt" - the certificate - secretName: "" - # If not specifying a preexisting secret, a secret can be created from tokenKey and tokenCert and used instead. - # If none of secretName, tokenKey, and tokenCert are specified, an ephemeral key and certificate will be autogenerated. - # tokenKey and tokenCert must BOTH be set or BOTH unset. - # The tokenKey value is formatted as a multiline string containing a PEM-encoded RSA key, indented one more than tokenKey on the following line. - tokenKey: | - # If tokenKey is set, the value of tokenCert must be set as a PEM-encoded certificate signed by tokenKey, and supplied as a multiline string, indented one more than tokenCert on the following line. - tokenCert: | - # The XSRF key. Will be generated automatically if it isn't specified - xsrfKey: "" - ## The priority class to run the pod as - priorityClassName: - # The time duration for async update artifact pull_time and repository - # pull_count, the unit is second. Will be 10 seconds if it isn't set. - # eg. artifactPullAsyncFlushDuration: 10 - artifactPullAsyncFlushDuration: - gdpr: - deleteUser: false - -jobservice: - image: - repository: goharbor/harbor-jobservice - tag: v2.8.3 - replicas: 1 - revisionHistoryLimit: 10 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - maxJobWorkers: 10 - # The logger for jobs: "file", "database" or "stdout" - jobLoggers: - - file - # - database - # - stdout - # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days - notification: - webhook_job_max_retry: 3 - webhook_job_http_client_timeout: 3 # in seconds - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: 24 - # the max time for execution in running state without new task created - max_dangling_hours: 168 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - # Secret is used when job service communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - ## The priority class to run the pod as - priorityClassName: - -registry: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - registry: - image: - repository: goharbor/registry-photon - tag: v2.8.3 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - controller: - image: - repository: goharbor/harbor-registryctl - tag: v2.8.3 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - replicas: 1 - revisionHistoryLimit: 10 - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - # Secret is used to secure the upload state from client - # and registry storage backend. - # See: https://github.com/docker/distribution/blob/master/docs/configuration.md#http - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. - relativeurls: false - credentials: - username: "harbor_registry_user" - password: "harbor_registry_password" - # If using existingSecret, the key must be REGISTRY_PASSWD and REGISTRY_HTPASSWD - existingSecret: "" - # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. - # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string - middleware: - enabled: false - type: cloudFront - cloudFront: - baseurl: example.cloudfront.net - keypairid: KEYPAIRID - duration: 3000s - ipfilteredby: none - # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key - # that allows access to CloudFront - privateKeySecret: "my-secret" - # enable purge _upload directories - upload_purging: - enabled: true - # remove files in _upload directories which exist for a period of time, default is one week. - age: 168h - # the interval of the purge operations - interval: 24h - dryrun: false - -trivy: - # enabled the flag to enable Trivy scanner - enabled: true - image: - # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon - # tag the tag for Trivy adapter image - tag: v2.8.3 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # replicas the number of Pod replicas - replicas: 1 - # debugMode the flag to enable Trivy debug mode with more verbose scanning log - debugMode: false - # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`. - vulnType: "os,library" - # severity a comma-separated list of severities to be checked - severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - # ignoreUnfixed the flag to display only fixed vulnerabilities - ignoreUnfixed: false - # insecure the flag to skip verifying registry certificate - insecure: false - # gitHubToken the GitHub access token to download Trivy DB - # - # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases. - # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached - # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update - # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one. - # Currently, the database is updated every 12 hours and published as a new release to GitHub. - # - # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough - # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000 - # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult - # https://developer.github.com/v3/#rate-limiting - # - # You can create a GitHub token by following the instructions in - # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - gitHubToken: "" - # skipUpdate the flag to disable Trivy DB downloads from GitHub - # - # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues. - # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the - # `/home/scanner/.cache/trivy/db/trivy.db` path. - skipUpdate: false - # The offlineScan option prevents Trivy from sending API requests to identify dependencies. - # - # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it. - # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't - # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode. - # It would work if all the dependencies are in local. - # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment. - offlineScan: false - # Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. Defaults to `vuln`. - securityCheck: "vuln" - # The duration to wait for scan completion - timeout: 5m0s - resources: - requests: - cpu: 200m - memory: 512Mi - limits: - cpu: 1 - memory: 1Gi - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - -notary: - enabled: true - server: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/notary-server-photon - tag: v2.8.3 - replicas: 1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - ## Additional service annotations - serviceAnnotations: {} - signer: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/notary-signer-photon - tag: v2.8.3 - replicas: 1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - # Fill the name of a kubernetes secret if you want to use your own - # TLS certificate authority, certificate and private key for notary - # communications. - # The secret must contain keys named ca.crt, tls.crt and tls.key that - # contain the CA, certificate and private key. - # They will be generated if not set. - secretName: "" - -database: - # if external database is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-db - tag: v2.8.3 - # The initial superuser password for internal database - password: "changeit" - # The size limit for Shared memory, pgSQL use it for shared_buffer - # More details see: - # https://github.com/goharbor/harbor/issues/15034 - shmSizeLimit: 512Mi - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - # The timeout used in livenessProbe; 1 to 5 seconds - livenessProbe: - timeoutSeconds: 1 - # The timeout used in readinessProbe; 1 to 5 seconds - readinessProbe: - timeoutSeconds: 1 - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - initContainer: - migrator: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - permissions: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - external: - host: "192.168.0.1" - port: "5432" - username: "user" - password: "password" - coreDatabase: "registry" - notaryServerDatabase: "notary_server" - notarySignerDatabase: "notary_signer" - # if using existing secret, the key must be "password" - existingSecret: "" - # "disable" - No SSL - # "require" - Always SSL (skip verification) - # "verify-ca" - Always SSL (verify that the certificate presented by the - # server was signed by a trusted CA) - # "verify-full" - Always SSL (verify that the certification presented by the - # server was signed by a trusted CA and the server host name matches the one - # in the certificate) - sslmode: "disable" - # The maximum number of connections in the idle connection pool per pod (core+exporter). - # If it <=0, no idle connections are retained. - maxIdleConns: 100 - # The maximum number of open connections to the database per pod (core+exporter). - # If it <= 0, then there is no limit on the number of open connections. - # Note: the default number of connections is 1024 for postgre of harbor. - maxOpenConns: 900 - ## Additional deployment annotations - podAnnotations: {} - -redis: - # if external Redis is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/redis-photon - tag: v2.8.3 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - external: - # support redis, redis+sentinel - # addr for redis: : - # addr for redis+sentinel: :,:,: - addr: "192.168.0.2:6379" - # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel - sentinelMasterSet: "" - # The "coreDatabaseIndex" must be "0" as the library Harbor - # used doesn't support configuring it - coreDatabaseIndex: "0" - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # username field can be an empty string and it will be authenticated against the default user - username: "" - password: "" - # If using existingSecret, the key must be REDIS_PASSWORD - existingSecret: "" - ## Additional deployment annotations - podAnnotations: {} - -exporter: - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - podAnnotations: {} - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-exporter - tag: v2.8.3 - nodeSelector: {} - tolerations: [] - affinity: {} - cacheDuration: 23 - cacheCleanInterval: 14400 - ## The priority class to run the pod as - priorityClassName: - -metrics: - enabled: false - core: - path: /metrics - port: 8001 - registry: - path: /metrics - port: 8001 - jobservice: - path: /metrics - port: 8001 - exporter: - path: /metrics - port: 8001 - ## Create prometheus serviceMonitor to scrape harbor metrics. - ## This requires the monitoring.coreos.com/v1 CRD. Please see - ## https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md - ## - serviceMonitor: - enabled: false - additionalLabels: {} - # Scrape interval. If not set, the Prometheus default scrape interval is used. - interval: "" - # Metric relabel configs to apply to samples before ingestion. - metricRelabelings: - [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - # Relabel configs to apply to samples before ingestion. - relabelings: - [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] - # separator: ; - # regex: ^(.*)$ - # targetLabel: nodename - # replacement: $1 - # action: replace - -trace: - enabled: false - # trace provider: jaeger or otel - # jaeger should be 1.26+ - provider: jaeger - # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth - sample_rate: 1 - # namespace used to differentiate different harbor services - # namespace: - # attributes is a key value dict contains user defined attributes used to initialize trace provider - # attributes: - # application: harbor - jaeger: - # jaeger supports two modes: - # collector mode(uncomment endpoint and uncomment username, password if needed) - # agent mode(uncomment agent_host and agent_port) - endpoint: http://hostname:14268/api/traces - # username: - # password: - # agent_host: hostname - # export trace data by jaeger.thrift in compact mode - # agent_port: 6831 - otel: - endpoint: hostname:4318 - url_path: /v1/traces - compression: false - insecure: true - # timeout is in seconds - timeout: 10 - -# cache layer configurations -# if this feature enabled, harbor will cache the resource -# `project/project_metadata/repository/artifact/manifest` in the redis -# which help to improve the performance of high concurrent pulling manifest. -cache: - # default is not enabled. - enabled: false - # default keep cache for one day. - expireHours: 24 diff --git a/charts/harbor/harbor/1.12.4/.helmignore b/charts/harbor/harbor/1.12.4/.helmignore deleted file mode 100644 index b4424fd59b..0000000000 --- a/charts/harbor/harbor/1.12.4/.helmignore +++ /dev/null @@ -1,6 +0,0 @@ -.github/* -docs/* -.git/* -.gitignore -CONTRIBUTING.md -test/* \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/Chart.yaml b/charts/harbor/harbor/1.12.4/Chart.yaml deleted file mode 100644 index 7a69cca9f4..0000000000 --- a/charts/harbor/harbor/1.12.4/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor -apiVersion: v1 -appVersion: 2.8.4 -description: An open source trusted cloud native registry that stores, signs, and - scans content -home: https://goharbor.io -icon: https://raw.githubusercontent.com/goharbor/website/master/static/img/logos/harbor-icon-color.png -keywords: -- docker -- registry -- harbor -maintainers: -- email: yinw@vmware.com - name: Wenkai Yin -- email: hweiwei@vmware.com - name: Weiwei He -- email: yshengwen@vmware.com - name: Shengwen Yu -name: harbor -sources: -- https://github.com/goharbor/harbor -- https://github.com/goharbor/harbor-helm -version: 1.12.4 diff --git a/charts/harbor/harbor/1.12.4/LICENSE b/charts/harbor/harbor/1.12.4/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/charts/harbor/harbor/1.12.4/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/charts/harbor/harbor/1.12.4/README.md b/charts/harbor/harbor/1.12.4/README.md deleted file mode 100644 index 85cc537c67..0000000000 --- a/charts/harbor/harbor/1.12.4/README.md +++ /dev/null @@ -1,427 +0,0 @@ -# Helm Chart for Harbor - -**Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be find [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. - -This repository, including the issues, focuses on deploying Harbor chart via helm. For functionality issues or Harbor questions, please open issues on [goharbor/harbor](https://github.com/goharbor/harbor) - -## Introduction - -This [Helm](https://github.com/kubernetes/helm) chart installs [Harbor](https://github.com/goharbor/harbor) in a Kubernetes cluster. Welcome to [contribute](CONTRIBUTING.md) to Helm Chart for Harbor. - -## Prerequisites - -- Kubernetes cluster 1.20+ -- Helm v3.2.0+ - -## Installation - -### Add Helm repository - -```bash -helm repo add harbor https://helm.goharbor.io -``` - -### Configure the chart - -The following items can be set via `--set` flag during installation or configured by editing the `values.yaml` directly (need to download the chart first). - -#### Configure how to expose Harbor service - -- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. - **Notes:** if TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to issue [#5291](https://github.com/goharbor/harbor/issues/5291) for details. -- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. -- **NodePort**: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. -- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. - -#### Configure the external URL - -The external URL for Harbor core service is used to: - -1. populate the docker/helm commands showed on portal -2. populate the token service URL returned to docker/notary client - -Format: `protocol://domain[:port]`. Usually: - -- if service exposed via `Ingress`, the `domain` should be the value of `expose.ingress.hosts.core` -- if service exposed via `ClusterIP`, the `domain` should be the value of `expose.clusterIP.name` -- if service exposed via `NodePort`, the `domain` should be the IP address of one Kubernetes node -- if service exposed via `LoadBalancer`, set the `domain` as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider - -If Harbor is deployed behind the proxy, set it as the URL of proxy. - -#### Configure how to persist data - -- **Disable**: The data does not survive the termination of a pod. -- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you already have existing persistent volumes to use. -- **External Storage(only for images and charts)**: For images and charts, the external storages are supported: `azure`, `gcs`, `s3` `swift` and `oss`. - -#### Configure the other items listed in [configuration](#configuration) section - -### Install the chart - -Install the Harbor helm chart with a release name `my-release`: -```bash -helm install my-release harbor/harbor -``` - -## Uninstallation - -To uninstall/delete the `my-release` deployment: -```bash -helm uninstall my-release -``` - -## Configuration - -The following table lists the configurable parameters of the Harbor chart and the default values. - -| Parameter | Description | Default | -| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| **Expose** | | | -| `expose.type` | How to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` | -| `expose.tls.enabled` | Enable TLS or not. Delete the `ssl-redirect` annotations in `expose.ingress.annotations` when TLS is disabled and `expose.type` is `ingress`. Note: if the `expose.type` is `ingress` and TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to https://github.com/goharbor/harbor/issues/5291 for details. | `true` | -| `expose.tls.certSource` | The source of the TLS certificate. Set as `auto`, `secret` or `none` and fill the information in the corresponding section: 1) auto: generate the TLS certificate automatically 2) secret: read the TLS certificate from the specified secret. The TLS certificate can be generated manually or by cert manager 3) none: configure no TLS certificate for the ingress. If the default TLS certificate is configured in the ingress controller, choose this option | `auto` | -| `expose.tls.auto.commonName` | The common name used to generate the certificate, it's necessary when the type isn't `ingress` | | -| `expose.tls.secret.secretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key | | -| `expose.tls.secret.notarySecretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key. Only needed when the `expose.type` is `ingress` | | -| `expose.ingress.hosts.core` | The host of Harbor core service in ingress rule | `core.harbor.domain` | -| `expose.ingress.hosts.notary` | The host of Harbor Notary service in ingress rule | `notary.harbor.domain` | -| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce`, `alb`, `f5-bigip` and `ncp` | `default` | -| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | | -| `expose.ingress.annotations` | The annotations used commonly for ingresses | | -| `expose.ingress.harbor.annotations` | The annotations specific to harbor ingress | {} | -| `expose.ingress.harbor.labels` | The labels specific to harbor ingress | {} | -| `expose.ingress.notary.annotations` | The annotations specific to notary ingress | {} | -| `expose.ingress.notary.labels` | The labels specific to notary ingress | {} | -| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` | -| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} | -| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.clusterIP.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.clusterIP.ports.notaryPort` | The service port Notary listens on. Only needed when `notary.enabled` is set to `true` | `4443` | -| `expose.nodePort.name` | The name of NodePort service | `harbor` | -| `expose.nodePort.ports.http.port` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.nodePort.ports.http.nodePort` | The node port Harbor listens on when serving HTTP | `30002` | -| `expose.nodePort.ports.https.port` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.ports.https.nodePort` | The node port Harbor listens on when serving HTTPS | `30003` | -| `expose.nodePort.ports.notary.port` | The service port Notary listens on. Only needed when `notary.enabled` is set to `true` | `4443` | -| `expose.nodePort.ports.notary.nodePort` | The node port Notary listens on. Only needed when `notary.enabled` is set to `true` | `30004` | -| `expose.loadBalancer.name` | The name of service | `harbor` | -| `expose.loadBalancer.IP` | The IP of the loadBalancer. It only works when loadBalancer supports assigning IP | `""` | -| `expose.loadBalancer.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.loadBalancer.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `30002` | -| `expose.loadBalancer.ports.notaryPort` | The service port Notary listens on. Only needed when `notary.enabled` is set to `true` | | -| `expose.loadBalancer.annotations` | The annotations attached to the loadBalancer service | {} | -| `expose.loadBalancer.sourceRanges` | List of IP address ranges to assign to loadBalancerSourceRanges | [] | -| **Internal TLS** | | | -| `internalTLS.enabled` | Enable TLS for the components (core, jobservice, portal, registry, trivy) | `false` | -| `internalTLS.certSource` | Method to provide TLS for the components, options are `auto`, `manual`, `secret`. | `auto` | -| `internalTLS.trustCa` | The content of trust CA, only available when `certSource` is `manual`. **Note**: all the internal certificates of the components must be issued by this CA | | -| `internalTLS.core.secretName` | The secret name for core component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.core.crt` | Content of core's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.core.key` | Content of core's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.secretName` | The secret name for jobservice component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.jobservice.crt` | Content of jobservice's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.key` | Content of jobservice's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.registry.secretName` | The secret name for registry component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.registry.crt` | Content of registry's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.registry.key` | Content of registry's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.portal.secretName` | The secret name for portal component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.portal.crt` | Content of portal's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.portal.key` | Content of portal's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.secretName` | The secret name for trivy component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.trivy.crt` | Content of trivy's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.key` | Content of trivy's TLS key file, only available when `certSource` is `manual` | | -| **IPFamily** | | | -| `ipFamily.ipv4.enabled` | if cluster is ipv4 enabled, all ipv4 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| `ipFamily.ipv6.enabled` | if cluster is ipv6 enabled, all ipv6 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| **Persistence** | | | -| `persistence.enabled` | Enable the data persistence or not | `true` | -| `persistence.resourcePolicy` | Setting it to `keep` to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted. Does not affect PVCs created for internal database and redis components. | `keep` | -| `persistence.persistentVolumeClaim.registry.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.registry.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.registry.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.registry.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.registry.size` | The size of the volume | `5Gi` | -| `persistence.persistentVolumeClaim.registry.annotations` | The annotations of the volume | | -|`persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.database.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.subPath` | The sub path used in the volume. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.accessMode` | The access mode of the volume. If external database is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.database.size` | The size of the volume. If external database is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.database.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.redis.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.subPath` | The sub path used in the volume. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.accessMode` | The access mode of the volume. If external Redis is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.redis.size` | The size of the volume. If external Redis is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.redis.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.trivy.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.trivy.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.trivy.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.trivy.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.trivy.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.trivy.annotations` | The annotations of the volume | | -| `persistence.imageChartStorage.disableredirect` | The configuration for managing redirects from content backends. For backends which not supported it (such as using minio for `s3` storage type), please set it to `true` to disable redirects. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect) for more details | `false` | -| `persistence.imageChartStorage.caBundleSecretName` | Specify the `caBundleSecretName` if the storage service uses a self-signed certificate. The secret must contain keys named `ca.crt` which will be injected into the trust store of registry's and containers. | | -| `persistence.imageChartStorage.type` | The type of storage for images and charts: `filesystem`, `azure`, `gcs`, `s3`, `swift` or `oss`. The type must be `filesystem` if you want to use persistent volumes for registry. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#storage) for more details | `filesystem` | -| `persistence.imageChartStorage.gcs.existingSecret` | An existing secret containing the gcs service account json key. The key must be gcs-key.json. | `""` | -| `persistence.imageChartStorage.gcs.useWorkloadIdentity` | A boolean to allow the use of workloadidentity in a GKE cluster. To use it, create a kubernetes service account and set the name in the key `serviceAccountName` of each component, then allow automounting the service account. | `false` | -| **General** | | | -| `externalURL` | The external URL for Harbor core service | `https://core.harbor.domain` | -| `caBundleSecretName` | The custom CA bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for core, jobservice, registry, trivy components. | | -| `uaaSecretName` | If using external UAA auth which has a self signed cert, you can provide a pre-created secret containing it under the key `ca.crt`. | | -| `imagePullPolicy` | The image pull policy | | -| `imagePullSecrets` | The imagePullSecrets names for all deployments | | -| `updateStrategy.type` | The update strategy for deployments with persistent volumes(jobservice, registry): `RollingUpdate` or `Recreate`. Set it as `Recreate` when `RWM` for volumes isn't supported | `RollingUpdate` | -| `logLevel` | The log level: `debug`, `info`, `warning`, `error` or `fatal` | `info` | -| `harborAdminPassword` | The initial password of Harbor admin. Change it from portal after launching Harbor | `Harbor12345` | -| `existingSecretAdminPassword` | The name of secret where admin password can be found. | | -| `existingSecretAdminPasswordKey` | The name of the key in the secret where to find harbor admin password Harbor | `HARBOR_ADMIN_PASSWORD` | -| `caSecretName` | The name of the secret which contains key named `ca.crt`. Setting this enables the download link on portal to download the CA certificate when the certificate isn't generated automatically | | -| `secretKey` | The key used for encryption. Must be a string of 16 chars | `not-a-secure-key` | -| `existingSecretSecretKey` | An existing secret containing the encoding secretKey | `""` | -| `proxy.httpProxy` | The URL of the HTTP proxy server | | -| `proxy.httpsProxy` | The URL of the HTTPS proxy server | | -| `proxy.noProxy` | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal | -| `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | -| `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | -| **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | -| `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | -| `nginx.image.tag` | Image tag | `dev` | -| `nginx.replicas` | The replica count | `1` | -| `nginx.revisionHistoryLimit` | The revision history limit | `10` | -| `nginx.resources` | The [resources] to allocate for container | undefined | -| `nginx.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `nginx.nodeSelector` | Node labels for pod assignment | `{}` | -| `nginx.tolerations` | Tolerations for pod assignment | `[]` | -| `nginx.affinity` | Node/Pod affinities | `{}` | -| `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | -| `nginx.priorityClassName` | The priority class to run the pod as | | -| **Portal** | | | -| `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | -| `portal.image.tag` | Tag for portal image | `dev` | -| `portal.replicas` | The replica count | `1` | -| `portal.revisionHistoryLimit` | The revision history limit | `10` | -| `portal.resources` | The [resources] to allocate for container | undefined | -| `portal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `portal.nodeSelector` | Node labels for pod assignment | `{}` | -| `portal.tolerations` | Tolerations for pod assignment | `[]` | -| `portal.affinity` | Node/Pod affinities | `{}` | -| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` | -| `portal.priorityClassName` | The priority class to run the pod as | | -| **Core** | | | -| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | -| `core.image.tag` | Tag for Harbor core image | `dev` | -| `core.replicas` | The replica count | `1` | -| `core.revisionHistoryLimit` | The revision history limit | `10` | -| `core.startupProbe.initialDelaySeconds` | The initial delay in seconds for the startup probe | `10` | -| `core.resources` | The [resources] to allocate for container | undefined | -| `core.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `core.nodeSelector` | Node labels for pod assignment | `{}` | -| `core.tolerations` | Tolerations for pod assignment | `[]` | -| `core.affinity` | Node/Pod affinities | `{}` | -| `core.podAnnotations` | Annotations to add to the core pod | `{}` | -| `core.serviceAnnotations` | Annotations to add to the core service | `{}` | -| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `core.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate and private key for token encryption/decryption. The secret must contain keys named: `tls.crt` - the certificate and `tls.key` - the private key. The default key pair will be used if it isn't set | | -| `core.tokenKey` | PEM-formatted RSA private key used to sign service tokens. Only used if `core.secretName` is unset. If set, `core.tokenCert` MUST also be set. | | -| `core.tokenCert` | PEM-formatted certificate signed by `core.tokenKey` used to validate service tokens. Only used if `core.secretName` is unset. If set, `core.tokenKey` MUST also be set. | | -| `core.xsrfKey` | The XSRF key. Will be generated automatically if it isn't specified | | -| `core.priorityClassName` | The priority class to run the pod as | | -| `core.artifactPullAsyncFlushDuration` | The time duration for async update artifact pull_time and repository pull_count | | -| `core.gdpr.deleteUser` | Enable GDPR compliant user delete | `false` | -| **Jobservice** | | | -| `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | -| `jobservice.image.tag` | Tag for jobservice image | `dev` | -| `jobservice.replicas` | The replica count | `1` | -| `jobservice.revisionHistoryLimit` | The revision history limit | `10` | -| `jobservice.maxJobWorkers` | The max job workers | `10` | -| `jobservice.jobLoggers` | The loggers for jobs: `file`, `database` or `stdout` | `[file]` | -| `jobservice.loggerSweeperDuration` | The jobLogger sweeper duration in days (ignored if `jobLoggers` is set to `stdout`) | `14` | -| `jobservice.notification.webhook_job_max_retry` | The maximum retry of webhook sending notifications | `3` | -| `jobservice.notification.webhook_job_http_client_timeout` | The http client timeout value of webhook sending notifications | `3` | -| `jobservice.reaper.max_update_hours` | the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 | `24` | -| `jobservice.reaper.max_dangling_hours` | the max time for execution in running state without new task created | `168` | -| `jobservice.resources` | The [resources] to allocate for container | undefined | -| `jobservice.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `jobservice.nodeSelector` | Node labels for pod assignment | `{}` | -| `jobservice.tolerations` | Tolerations for pod assignment | `[]` | -| `jobservice.affinity` | Node/Pod affinities | `{}` | -| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` | -| `jobservice.priorityClassName` | The priority class to run the pod as | | -| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| **Registry** | | | -| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | -| `registry.registry.image.tag` | Tag for registry image | `dev` | -| `registry.registry.resources` | The [resources] to allocate for container | undefined | -| `registry.controller.image.repository` | Repository for registry controller image | `goharbor/harbor-registryctl` | -| `registry.controller.image.tag` | Tag for registry controller image | `dev` | -| `registry.controller.resources` | The [resources] to allocate for container | undefined | -| `registry.replicas` | The replica count | `1` | -| `registry.revisionHistoryLimit` | The revision history limit | `10` | -| `registry.nodeSelector` | Node labels for pod assignment | `{}` | -| `registry.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `registry.tolerations` | Tolerations for pod assignment | `[]` | -| `registry.affinity` | Node/Pod affinities | `{}` | -| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | | -| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` | -| `registry.priorityClassName` | The priority class to run the pod as | | -| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `registry.credentials.username` | The username for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` | -| `registry.credentials.password` | The password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). It is suggested you update this value before installation. | `harbor_registry_password` | -| `registry.credentials.existingSecret` | An existing secret containing the password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). The key must be `REGISTRY_PASSWD` | `""` | -| `registry.credentials.htpasswdString` | Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. | undefined | -| `registry.relativeurls` | If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. Needed if harbor is behind a reverse proxy | `false` | -| `registry.upload_purging.enabled` | If true, enable purge _upload directories | `true` | -| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` | -| `registry.upload_purging.interval` | The interval of the purge operations | `24h` | -| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` | -| **[Trivy][trivy]** | | | -| `trivy.enabled` | The flag to enable Trivy scanner | `true` | -| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` | -| `trivy.image.tag` | Tag for Trivy adapter image | `dev` | -| `trivy.resources` | The [resources] to allocate for Trivy adapter container | | -| `trivy.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `trivy.replicas` | The number of Pod replicas | `1` | -| `trivy.debugMode` | The flag to enable Trivy debug mode | `false` | -| `trivy.vulnType` | Comma-separated list of vulnerability types. Possible values `os` and `library`. | `os,library` | -| `trivy.severity` | Comma-separated list of severities to be checked | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | -| `trivy.ignoreUnfixed` | The flag to display only fixed vulnerabilities | `false` | -| `trivy.insecure` | The flag to skip verifying registry certificate | `false` | -| `trivy.skipUpdate` | The flag to disable [Trivy DB][trivy-db] downloads from GitHub | `false` | -| `trivy.offlineScan` | The flag prevents Trivy from sending API requests to identify dependencies. | `false` | -| `trivy.securityCheck` | Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. | `vuln` | -| `trivy.timeout` | The duration to wait for scan completion | `5m0s` | -| `trivy.gitHubToken` | The GitHub access token to download [Trivy DB][trivy-db] (see [GitHub rate limiting][trivy-rate-limiting]) | | -| `trivy.priorityClassName` | The priority class to run the pod as | | -| **Notary** | | | -| `notary.enabled` | Enable Notary? | `true` | -| `notary.server.image.repository` | Repository for notary server image | `goharbor/notary-server-photon` | -| `notary.server.image.tag` | Tag for notary server image | `dev` | -| `notary.server.replicas` | The replica count | `1` | -| `notary.server.resources` | The [resources] to allocate for container | undefined | -| `notary.server.priorityClassName` | The priority class to run the pod as | | -| `notary.server.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `notary.signer.image.repository` | Repository for notary signer image | `goharbor/notary-signer-photon` | -| `notary.signer.image.tag` | Tag for notary signer image | `dev` | -| `notary.signer.replicas` | The replica count | `1` | -| `notary.signer.resources` | The [resources] to allocate for container | undefined | -| `notary.signer.priorityClassName` | The priority class to run the pod as | | -| `notary.signer.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `notary.nodeSelector` | Node labels for pod assignment | `{}` | -| `notary.tolerations` | Tolerations for pod assignment | `[]` | -| `notary.affinity` | Node/Pod affinities | `{}` | -| `notary.podAnnotations` | Annotations to add to the notary pod | `{}` | -| `notary.serviceAnnotations` | Annotations to add to the notary service | `{}` | -| `notary.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate authority, certificate and private key for notary communications. The secret must contain keys named `ca.crt`, `tls.crt` and `tls.key` that contain the CA, certificate and private key. They will be generated if not set. | | -| **Database** | | | -| `database.type` | If external database is used, set it to `external` | `internal` | -| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` | -| `database.internal.image.tag` | Tag for database image | `dev` | -| `database.internal.password` | The password for database | `changeit` | -| `database.internal.shmSizeLimit` | The limit for the size of shared memory for internal PostgreSQL, conventionally it's around 50% of the memory limit of the container | `512Mi` | -| `database.internal.resources` | The [resources] to allocate for container | undefined | -| `database.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `database.internal.initContainer.migrator.resources` | The [resources] to allocate for the database migrator initContainer | undefined | -| `database.internal.initContainer.permissions.resources` | The [resources] to allocate for the database permissions initContainer | undefined | -| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `database.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `database.internal.affinity` | Node/Pod affinities | `{}` | -| `database.internal.priorityClassName` | The priority class to run the pod as | | -| `database.internal.livenessProbe.timeoutSeconds` | The timeout used in liveness probe; 1 to 5 seconds | 1 | -| `database.internal.readinessProbe.timeoutSeconds` | The timeout used in readiness probe; 1 to 5 seconds | 1 | -| `database.external.host` | The hostname of external database | `192.168.0.1` | -| `database.external.port` | The port of external database | `5432` | -| `database.external.username` | The username of external database | `user` | -| `database.external.password` | The password of external database | `password` | -| `database.external.coreDatabase` | The database used by core service | `registry` | -| `database.external.notaryServerDatabase` | The database used by Notary server | `notary_server` | -| `database.external.notarySignerDatabase` | The database used by Notary signer | `notary_signer` | -| `database.external.existingSecret` | An existing password containing the database password. the key must be `password`. | `""` | -| `database.external.sslmode` | Connection method of external database (require, verify-full, verify-ca, disable) | `disable` | -| `database.maxIdleConns` | The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained. | `50` | -| `database.maxOpenConns` | The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections. | `100` | -| `database.podAnnotations` | Annotations to add to the database pod | `{}` | -| **Redis** | | | -| `redis.type` | If external redis is used, set it to `external` | `internal` | -| `redis.internal.image.repository` | Repository for redis image | `goharbor/redis-photon` | -| `redis.internal.image.tag` | Tag for redis image | `dev` | -| `redis.internal.resources` | The [resources] to allocate for container | undefined | -| `redis.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `redis.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `redis.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `redis.internal.affinity` | Node/Pod affinities | `{}` | -| `redis.internal.priorityClassName` | The priority class to run the pod as | | -| `redis.internal.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.internal.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.internal.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.internal.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.internal.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.addr` | The addr of external Redis: :. When using sentinel, it should be :,:,: | `192.168.0.2:6379` | -| `redis.external.sentinelMasterSet` | The name of the set of Redis instances to monitor | | -| `redis.external.coreDatabaseIndex` | The database index for core | `0` | -| `redis.external.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.external.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.external.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.external.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.external.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.username` | The username of external Redis | | -| `redis.external.password` | The password of external Redis | | -| `redis.external.existingSecret` | Use an existing secret to connect to redis. The key must be `REDIS_PASSWORD`. | `""` | -| `redis.podAnnotations` | Annotations to add to the redis pod | `{}` | -| **Exporter** | | | -| `exporter.replicas` | The replica count | `1` | -| `exporter.revisionHistoryLimit` | The revision history limit | `10` | -| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` | -| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` | -| `exporter.image.tag` | Tag for exporter image | `dev` | -| `exporter.nodeSelector` | Node labels for pod assignment | `{}` | -| `exporter.tolerations` | Tolerations for pod assignment | `[]` | -| `exporter.affinity` | Node/Pod affinities | `{}` | -| `exporter.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `exporter.cacheDuration` | the cache duration for information that exporter collected from Harbor | `30` | -| `exporter.cacheCleanInterval` | cache clean interval for information that exporter collected from Harbor | `14400` | -| `exporter.priorityClassName` | The priority class to run the pod as | | -| **Metrics** | | | -| `metrics.enabled` | if enable harbor metrics | `false` | -| `metrics.core.path` | the url path for core metrics | `/metrics` | -| `metrics.core.port` | the port for core metrics | `8001` | -| `metrics.registry.path` | the url path for registry metrics | `/metrics` | -| `metrics.registry.port` | the port for registry metrics | `8001` | -| `metrics.exporter.path` | the url path for exporter metrics | `/metrics` | -| `metrics.exporter.port` | the port for exporter metrics | `8001` | -| `metrics.serviceMonitor.enabled` | create prometheus serviceMonitor. Requires prometheus CRD's | `false` | -| `metrics.serviceMonitor.additionalLabels` | additional labels to upsert to the manifest | `""` | -| `metrics.serviceMonitor.interval` | scrape period for harbor metrics | `""` | -| `metrics.serviceMonitor.metricRelabelings` | metrics relabel to add/mod/del before ingestion | `[]` | -| `metrics.serviceMonitor.relabelings` | relabels to add/mod/del to sample before scrape | `[]` | -| **Trace** | | | -| `trace.enabled` | Enable tracing or not | `false` | -| `trace.provider` | The tracing provider: `jaeger` or `otel`. `jaeger` should be 1.26+ | `jaeger` | -| `trace.sample_rate` | Set `sample_rate` to 1 if you want sampling 100% of trace data; set 0.5 if you want sampling 50% of trace data, and so forth | `1` | -| `trace.namespace` | Namespace used to differentiate different harbor services | | -| `trace.attributes` | `attributes` is a key value dict contains user defined attributes used to initialize trace provider | | -| `trace.jaeger.endpoint` | The endpoint of jaeger | `http://hostname:14268/api/traces` | -| `trace.jaeger.username` | The username of jaeger | | -| `trace.jaeger.password` | The password of jaeger | | -| `trace.jaeger.agent_host` | The agent host of jaeger | | -| `trace.jaeger.agent_port` | The agent port of jaeger | `6831` | -| `trace.otel.endpoint` | The endpoint of otel | `hostname:4318` | -| `trace.otel.url_path` | The URL path of otel | `/v1/traces` | -| `trace.otel.compression` | Whether enable compression or not for otel | `false` | -| `trace.otel.insecure` | Whether establish insecure connection or not for otel | `true` | -| `trace.otel.timeout` | The timeout in seconds of otel | `10` | -| **Cache** | | | -| `cache.enabled` | Enable cache layer or not | `false` | -| `cache.expireHours` | The expire hours of cache layer | `24` | - -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[trivy]: https://github.com/aquasecurity/trivy -[trivy-db]: https://github.com/aquasecurity/trivy-db -[trivy-rate-limiting]: https://github.com/aquasecurity/trivy#github-rate-limiting diff --git a/charts/harbor/harbor/1.12.4/conf/notary-server.json b/charts/harbor/harbor/1.12.4/conf/notary-server.json deleted file mode 100644 index b3c2624134..0000000000 --- a/charts/harbor/harbor/1.12.4/conf/notary-server.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "server": { - "http_addr": ":4443" - }, - "trust_service": { - "type": "remote", - "hostname": "{{ template "harbor.notary-signer" . }}", - "port": "7899", - "tls_ca_file": "/etc/ssl/notary/ca.crt", - "key_algorithm": "ecdsa" - }, - "logging": { - "level": "{{ .Values.logLevel }}" - }, - "storage": { - "backend": "postgres", - "db_url": "{{ template "harbor.database.notaryServer" . }}" - }, - "auth": { - "type": "token", - "options": { - "realm": "{{ .Values.externalURL }}/service/token", - "service": "harbor-notary", - "issuer": "harbor-token-issuer", - "rootcertbundle": "/root.crt" - } - } -} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/conf/notary-signer.json b/charts/harbor/harbor/1.12.4/conf/notary-signer.json deleted file mode 100644 index 75a4d68bdb..0000000000 --- a/charts/harbor/harbor/1.12.4/conf/notary-signer.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "server": { - "grpc_addr": ":7899", - "tls_cert_file": "/etc/ssl/notary/tls.crt", - "tls_key_file": "/etc/ssl/notary/tls.key" - }, - "logging": { - "level": "{{ .Values.logLevel }}" - }, - "storage": { - "backend": "postgres", - "db_url": "{{ template "harbor.database.notarySigner" . }}", - "default_alias": "defaultalias" - } -} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/NOTES.txt b/charts/harbor/harbor/1.12.4/templates/NOTES.txt deleted file mode 100644 index 0980c08a35..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }} -For more details, please visit https://github.com/goharbor/harbor diff --git a/charts/harbor/harbor/1.12.4/templates/_helpers.tpl b/charts/harbor/harbor/1.12.4/templates/_helpers.tpl deleted file mode 100644 index 130ad5c04a..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/_helpers.tpl +++ /dev/null @@ -1,586 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "harbor.name" -}} -{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "harbor.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "harbor" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Helm required labels */}} -{{- define "harbor.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* matchLabels */}} -{{- define "harbor.matchLabels" -}} -release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{- define "harbor.autoGenCert" -}} - {{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForIngress" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (eq .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForNginx" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (ne .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.host" -}} - {{- if eq .Values.database.type "internal" -}} - {{- template "harbor.database" . }} - {{- else -}} - {{- .Values.database.external.host -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.port" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "5432" -}} - {{- else -}} - {{- .Values.database.external.port -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.username" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "postgres" -}} - {{- else -}} - {{- .Values.database.external.username -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.rawPassword" -}} - {{- if eq .Values.database.type "internal" -}} - {{- .Values.database.internal.password -}} - {{- else -}} - {{- .Values.database.external.password -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.escapedRawPassword" -}} - {{- include "harbor.database.rawPassword" . | urlquery | replace "+" "%20" -}} -{{- end -}} - -{{- define "harbor.database.encryptedPassword" -}} - {{- include "harbor.database.rawPassword" . | b64enc | quote -}} -{{- end -}} - -{{- define "harbor.database.coreDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "registry" -}} - {{- else -}} - {{- .Values.database.external.coreDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.notaryServerDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "notaryserver" -}} - {{- else -}} - {{- .Values.database.external.notaryServerDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.notarySignerDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "notarysigner" -}} - {{- else -}} - {{- .Values.database.external.notarySignerDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.sslmode" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "disable" -}} - {{- else -}} - {{- .Values.database.external.sslmode -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.notaryServer" -}} -postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.database.escapedRawPassword" . }}@{{ template "harbor.database.host" . }}:{{ template "harbor.database.port" . }}/{{ template "harbor.database.notaryServerDatabase" . }}?sslmode={{ template "harbor.database.sslmode" . }} -{{- end -}} - -{{- define "harbor.database.notarySigner" -}} -postgres://{{ template "harbor.database.username" . }}:{{ template "harbor.database.escapedRawPassword" . }}@{{ template "harbor.database.host" . }}:{{ template "harbor.database.port" . }}/{{ template "harbor.database.notarySignerDatabase" . }}?sslmode={{ template "harbor.database.sslmode" . }} -{{- end -}} - -{{- define "harbor.redis.scheme" -}} - {{- with .Values.redis }} - {{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }} - {{- end }} -{{- end -}} - -/*host:port*/ -{{- define "harbor.redis.addr" -}} - {{- with .Values.redis }} - {{- ternary (printf "%s:6379" (include "harbor.redis" $ )) .external.addr (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.masterSet" -}} - {{- with .Values.redis }} - {{- ternary .external.sentinelMasterSet "" (eq "redis+sentinel" (include "harbor.redis.scheme" $)) }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.password" -}} - {{- with .Values.redis }} - {{- ternary "" .external.password (eq .type "internal") }} - {{- end }} -{{- end -}} - -/*scheme://[:password@]host:port[/master_set]*/ -{{- define "harbor.redis.url" -}} - {{- with .Values.redis }} - {{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }} - {{- $cred := ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }} - {{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) $cred (include "harbor.redis.addr" $) $path -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCore" -}} - {{- with .Values.redis }} - {{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index*/ -{{- define "harbor.redis.urlForJobservice" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.jobserviceDatabaseIndex .external.jobserviceDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForRegistry" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForTrivy" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.trivyAdapterIndex .external.trivyAdapterIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForHarbor" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.harborDatabaseIndex .external.harborDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCache" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.cacheLayerDatabaseIndex .external.cacheLayerDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.dbForRegistry" -}} - {{- with .Values.redis }} - {{- ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.notary-server" -}} - {{- printf "%s-notary-server" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.notary-signer" -}} - {{- printf "%s-notary-signer" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress-notary" -}} - {{- printf "%s-ingress-notary" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.noProxy" -}} - {{- printf "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.notary-server" .) (include "harbor.notary-signer" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}} -{{- end -}} - -{{- define "harbor.caBundleVolume" -}} -- name: ca-bundle-certs - secret: - secretName: {{ .Values.caBundleSecretName }} -{{- end -}} - -{{- define "harbor.caBundleVolumeMount" -}} -- name: ca-bundle-certs - mountPath: /harbor_cust_cert/custom-ca.crt - subPath: ca.crt -{{- end -}} - -{{/* scheme for all components except notary because it only support http mode */}} -{{- define "harbor.component.scheme" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "https" -}} - {{- else -}} - {{- printf "http" -}} - {{- end -}} -{{- end -}} - -{{/* core component container port */}} -{{- define "harbor.core.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* core component service port */}} -{{- define "harbor.core.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component container port */}} -{{- define "harbor.jobservice.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component service port */}} -{{- define "harbor.jobservice.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* portal component container port */}} -{{- define "harbor.portal.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* portal component service port */}} -{{- define "harbor.portal.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* registry component container port */}} -{{- define "harbor.registry.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registry component service port */}} -{{- define "harbor.registry.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component container port */}} -{{- define "harbor.registryctl.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component service port */}} -{{- define "harbor.registryctl.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component container port */}} -{{- define "harbor.trivy.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component service port */}} -{{- define "harbor.trivy.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* CORE_URL */}} -{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}} -{{- define "harbor.coreURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}} -{{- end -}} - -{{/* JOBSERVICE_URL */}} -{{- define "harbor.jobserviceURL" -}} - {{- printf "%s://%s-jobservice" (include "harbor.component.scheme" .) (include "harbor.fullname" .) -}} -{{- end -}} - -{{/* PORTAL_URL */}} -{{- define "harbor.portalURL" -}} - {{- printf "%s://%s" (include "harbor.component.scheme" .) (include "harbor.portal" .) -}} -{{- end -}} - -{{/* REGISTRY_URL */}} -{{- define "harbor.registryURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registry.servicePort" .) -}} -{{- end -}} - -{{/* REGISTRY_CONTROLLER_URL */}} -{{- define "harbor.registryControllerURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registryctl.servicePort" .) -}} -{{- end -}} - -{{/* TOKEN_SERVICE_URL */}} -{{- define "harbor.tokenServiceURL" -}} - {{- printf "%s/service/token" (include "harbor.coreURL" .) -}} -{{- end -}} - -{{/* TRIVY_ADAPTER_URL */}} -{{- define "harbor.trivyAdapterURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}} -{{- end -}} - -{{- define "harbor.internalTLS.core.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.core.secretName -}} - {{- else -}} - {{- printf "%s-core-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.jobservice.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.jobservice.secretName -}} - {{- else -}} - {{- printf "%s-jobservice-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.portal.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.portal.secretName -}} - {{- else -}} - {{- printf "%s-portal-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.registry.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.registry.secretName -}} - {{- else -}} - {{- printf "%s-registry-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.trivy.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.trivy.secretName -}} - {{- else -}} - {{- printf "%s-trivy-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsCoreSecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsNotarySecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.notarySecretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsSecretForNginx" -}} - {{- if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.nginx" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.metricsPortName" -}} - {{- if .Values.internalTLS.enabled }} - {{- printf "https-metrics" -}} - {{- else -}} - {{- printf "http-metrics" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.traceEnvs" -}} - TRACE_ENABLED: "{{ .Values.trace.enabled }}" - TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}" - TRACE_NAMESPACE: "{{ .Values.trace.namespace }}" - {{- if .Values.trace.attributes }} - TRACE_ATTRIBUTES: "{{ .Values.trace.attributes | toJson }}" - {{- end }} - {{- if eq .Values.trace.provider "jaeger" }} - TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}" - TRACE_JAEGER_USERNAME: "{{ .Values.trace.jaeger.username }}" - TRACE_JAEGER_AGENT_HOSTNAME: "{{ .Values.trace.jaeger.agent_host }}" - TRACE_JAEGER_AGENT_PORT: "{{ .Values.trace.jaeger.agent_port }}" - {{- else }} - TRACE_OTEL_ENDPOINT: "{{ .Values.trace.otel.endpoint }}" - TRACE_OTEL_URL_PATH: "{{ .Values.trace.otel.url_path }}" - TRACE_OTEL_COMPRESSION: "{{ .Values.trace.otel.compression }}" - TRACE_OTEL_INSECURE: "{{ .Values.trace.otel.insecure }}" - TRACE_OTEL_TIMEOUT: "{{ .Values.trace.otel.timeout }}" - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForCore" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-core" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForJobservice" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-jobservice" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForRegistryCtl" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-registryctl" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceJaegerPassword" -}} - {{- if and .Values.trace.enabled (eq .Values.trace.provider "jaeger") }} - TRACE_JAEGER_PASSWORD: "{{ .Values.trace.jaeger.password | default "" | b64enc }}" - {{- end }} -{{- end -}} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "harbor.ingress.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/core/core-cm.yaml b/charts/harbor/harbor/1.12.4/templates/core/core-cm.yaml deleted file mode 100644 index 96562cc066..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/core/core-cm.yaml +++ /dev/null @@ -1,85 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - app.conf: |+ - appname = Harbor - runmode = prod - enablegzip = true - - [prod] - httpport = {{ ternary "8443" "8080" .Values.internalTLS.enabled }} - PORT: "{{ ternary "8443" "8080" .Values.internalTLS.enabled }}" - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "{{ template "harbor.database.host" . }}" - POSTGRESQL_PORT: "{{ template "harbor.database.port" . }}" - POSTGRESQL_USERNAME: "{{ template "harbor.database.username" . }}" - POSTGRESQL_DATABASE: "{{ template "harbor.database.coreDatabase" . }}" - POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" - EXT_ENDPOINT: "{{ .Values.externalURL }}" - CORE_URL: "{{ template "harbor.coreURL" . }}" - JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - WITH_NOTARY: "{{ .Values.notary.enabled }}" - NOTARY_URL: "http://{{ template "harbor.notary-server" . }}:4443" - CORE_LOCAL_URL: "{{ ternary "https://127.0.0.1:8443" "http://127.0.0.1:8080" .Values.internalTLS.enabled }}" - WITH_TRIVY: {{ .Values.trivy.enabled | quote }} - TRIVY_ADAPTER_URL: "{{ template "harbor.trivyAdapterURL" . }}" - REGISTRY_STORAGE_PROVIDER_NAME: "{{ .Values.persistence.imageChartStorage.type }}" - LOG_LEVEL: "{{ .Values.logLevel }}" - CONFIG_PATH: "/etc/core/app.conf" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}" - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.harborDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.harborDatabaseIndex) }} - _REDIS_URL_HARBOR: "{{ template "harbor.redis.urlForHarbor" . }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} - PORTAL_URL: "{{ template "harbor.portalURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - {{- if .Values.uaaSecretName }} - UAA_CA_ROOT: "/etc/core/auth-ca/auth-ca.crt" - {{- end }} - {{- if has "core" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE: "docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory" - {{- if .Values.metrics.enabled}} - METRIC_ENABLE: "true" - METRIC_PATH: "{{ .Values.metrics.core.path }}" - METRIC_PORT: "{{ .Values.metrics.core.port }}" - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: core - {{- end }} - - {{- if hasKey .Values.core "gcTimeWindowHours" }} - #make the GC time window configurable for testing - GC_TIME_WINDOW_HOURS: "{{ .Values.core.gcTimeWindowHours }}" - {{- end }} - {{- template "harbor.traceEnvsForCore" . }} - - {{- if .Values.core.artifactPullAsyncFlushDuration | quote }} - ARTIFACT_PULL_ASYNC_FLUSH_DURATION: {{ .Values.core.artifactPullAsyncFlushDuration }} - {{- end }} - - {{- if .Values.core.gdpr}} - {{- if .Values.core.gdpr.deleteUser}} - GDPR_DELETE_USER: "true" - {{- end }} - {{- end }} - - {{- if .Values.cache.enabled }} - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/core/core-dpl.yaml b/charts/harbor/harbor/1.12.4/templates/core/core-dpl.yaml deleted file mode 100644 index 2ca8b0c5e5..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/core/core-dpl.yaml +++ /dev/null @@ -1,221 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: core -spec: - replicas: {{ .Values.core.replicas }} - revisionHistoryLimit: {{ .Values.core.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: core - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: core - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.core.podAnnotations }} -{{ toYaml .Values.core.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: core - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if .Values.core.startupProbe.enabled }} - startupProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 360 - initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} - periodSeconds: 10 - {{- end }} - livenessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: "{{ template "harbor.jobservice" . }}" - key: JOBSERVICE_SECRET - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/core/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/core/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/core/ca.crt - {{- end }} - {{- if .Values.database.external.existingSecret }} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - {{- if .Values.expose.tls.enabled }} - - name: ca-download - mountPath: /etc/core/ca - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - mountPath: /etc/core/auth-ca/auth-ca.crt - subPath: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - {{- end }} - - name: psc - mountPath: /etc/core/token - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} -{{- if .Values.core.resources }} - resources: -{{ toYaml .Values.core.resources | indent 10 }} -{{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - - name: secret-key - secret: - {{- if .Values.existingSecretSecretKey }} - secretName: {{ .Values.existingSecretSecretKey }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - items: - - key: secretKey - path: key - - name: token-service-private-key - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: ca-download - secret: - {{- if .Values.caSecretName }} - secretName: {{ .Values.caSecretName }} - {{- else if eq (include "harbor.autoGenCertForIngress" .) "true" }} - secretName: "{{ template "harbor.ingress" . }}" - {{- else if eq (include "harbor.autoGenCertForNginx" .) "true" }} - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - secret: - secretName: {{ .Values.uaaSecretName }} - items: - - key: ca.crt - path: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - - name: psc - emptyDir: {} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.core.priorityClassName }} - priorityClassName: {{ .Values.core.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/core/core-pre-upgrade-job.yaml b/charts/harbor/harbor/1.12.4/templates/core/core-pre-upgrade-job.yaml deleted file mode 100644 index 43c9d3596d..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/core/core-pre-upgrade-job.yaml +++ /dev/null @@ -1,74 +0,0 @@ -{{- if .Values.enableMigrateHelmHook }} -apiVersion: batch/v1 -kind: Job -metadata: - name: migration-job - labels: -{{ include "harbor.labels" . | indent 4 }} - component: migrator - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-5" -spec: - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: migrator - spec: - restartPolicy: Never - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 120 - containers: - - name: core-job - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/harbor/harbor_core", "-mode=migrate"] - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - {{- if .Values.database.external.existingSecret }} - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/core/core-secret.yaml b/charts/harbor/harbor/1.12.4/templates/core/core-secret.yaml deleted file mode 100644 index 20f835b1d8..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/core/core-secret.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.existingSecretSecretKey }} - secretKey: {{ .Values.secretKey | b64enc | quote }} - {{- end }} - secret: {{ .Values.core.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.core.secretName }} - {{- $ca := genCA "harbor-token-ca" 365 }} - tls.key: {{ .Values.core.tokenKey | default $ca.Key | b64enc | quote }} - tls.crt: {{ .Values.core.tokenCert | default $ca.Cert | b64enc | quote }} - {{- end }} - {{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} - {{- end }} - {{- if not .Values.database.external.existingSecret }} - POSTGRESQL_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - CSRF_KEY: {{ .Values.core.xsrfKey | default (randAlphaNum 32) | b64enc | quote }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.12.4/templates/core/core-svc.yaml b/charts/harbor/harbor/1.12.4/templates/core/core-svc.yaml deleted file mode 100644 index 0d2cfb2915..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/core/core-svc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.core.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - name: {{ ternary "https-web" "http-web" .Values.internalTLS.enabled }} - port: {{ template "harbor.core.servicePort" . }} - targetPort: {{ template "harbor.core.containerPort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.core.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: core diff --git a/charts/harbor/harbor/1.12.4/templates/core/core-tls.yaml b/charts/harbor/harbor/1.12.4/templates/core/core-tls.yaml deleted file mode 100644 index c52148f0d9..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/core/core-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.core.crt\" is required!" .Values.internalTLS.core.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.core.key\" is required!" .Values.internalTLS.core.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/database/database-secret.yaml b/charts/harbor/harbor/1.12.4/templates/database/database-secret.yaml deleted file mode 100644 index 864aff4a18..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/database/database-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - POSTGRES_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end -}} diff --git a/charts/harbor/harbor/1.12.4/templates/database/database-ss.yaml b/charts/harbor/harbor/1.12.4/templates/database/database-ss.yaml deleted file mode 100644 index 733243c71c..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/database/database-ss.yaml +++ /dev/null @@ -1,162 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -{{- $database := .Values.persistence.persistentVolumeClaim.database -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: database -spec: - replicas: 1 - serviceName: "{{ template "harbor.database" . }}" - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: database - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: database - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} -{{- if .Values.database.podAnnotations }} -{{ toYaml .Values.database.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.database.internal.serviceAccountName }} - serviceAccountName: {{ .Values.database.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.database.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - # as we change the data directory to a sub folder to support psp, the init container here - # is used to migrate the existing data. See https://github.com/goharbor/harbor-helm/issues/756 - # for more detail. - # we may remove it after several releases - - name: "data-migrator" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "[ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true"] -{{- if .Values.database.internal.initContainer.migrator.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.migrator.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - # with "fsGroup" set, each time a volume is mounted, Kubernetes must recursively chown() and chmod() all the files and directories inside the volume - # this causes the postgresql reports the "data directory /var/lib/postgresql/data/pgdata has group or world access" issue when using some CSIs e.g. Ceph - # use this init container to correct the permission - # as "fsGroup" applied before the init container running, the container has enough permission to execute the command - - name: "data-permissions-ensurer" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"] -{{- if .Values.database.internal.initContainer.permissions.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.permissions.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - containers: - - name: database - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.livenessProbe.timeoutSeconds }} - readinessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 1 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.readinessProbe.timeoutSeconds }} -{{- if .Values.database.internal.resources }} - resources: -{{ toYaml .Values.database.internal.resources | indent 10 }} -{{- end }} - envFrom: - - secretRef: - name: "{{ template "harbor.database" . }}" - env: - # put the data into a sub directory to avoid the permission issue in k8s with restricted psp enabled - # more detail refer to https://github.com/goharbor/harbor-helm/issues/756 - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - - name: shm-volume - mountPath: /dev/shm - volumes: - - name: shm-volume - emptyDir: - medium: Memory - sizeLimit: {{ .Values.database.internal.shmSizeLimit }} - {{- if not .Values.persistence.enabled }} - - name: "database-data" - emptyDir: {} - {{- else if $database.existingClaim }} - - name: "database-data" - persistentVolumeClaim: - claimName: {{ $database.existingClaim }} - {{- end -}} - {{- with .Values.database.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.database.internal.priorityClassName }} - priorityClassName: {{ .Values.database.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $database.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $database.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $database.accessMode | quote }}] - {{- if $database.storageClass }} - {{- if (eq "-" $database.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $database.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $database.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.12.4/templates/database/database-svc.yaml b/charts/harbor/harbor/1.12.4/templates/database/database-svc.yaml deleted file mode 100644 index 6475048cd9..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/database/database-svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 5432 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: database -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/exporter/exporter-cm-env.yaml b/charts/harbor/harbor/1.12.4/templates/exporter/exporter-cm-env.yaml deleted file mode 100644 index 0bf4e7d905..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/exporter/exporter-cm-env.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.exporter" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - LOG_LEVEL: "{{ .Values.logLevel }}" - HARBOR_EXPORTER_PORT: "{{ .Values.metrics.exporter.port }}" - HARBOR_EXPORTER_METRICS_PATH: "{{ .Values.metrics.exporter.path }}" - HARBOR_EXPORTER_METRICS_ENABLED: "{{ .Values.metrics.enabled }}" - HARBOR_EXPORTER_CACHE_TIME: "{{ .Values.exporter.cacheDuration }}" - HARBOR_EXPORTER_CACHE_CLEAN_INTERVAL: "{{ .Values.exporter.cacheCleanInterval }}" - HARBOR_METRIC_NAMESPACE: harbor - HARBOR_METRIC_SUBSYSTEM: exporter - HARBOR_REDIS_URL: "{{ template "harbor.redis.urlForJobservice" . }}" - HARBOR_REDIS_NAMESPACE: harbor_job_service_namespace - HARBOR_REDIS_TIMEOUT: "3600" - HARBOR_SERVICE_SCHEME: "{{ template "harbor.component.scheme" . }}" - HARBOR_SERVICE_HOST: "{{ template "harbor.core" . }}" - HARBOR_SERVICE_PORT: "{{ template "harbor.core.servicePort" . }}" - HARBOR_DATABASE_HOST: "{{ template "harbor.database.host" . }}" - HARBOR_DATABASE_PORT: "{{ template "harbor.database.port" . }}" - HARBOR_DATABASE_USERNAME: "{{ template "harbor.database.username" . }}" - HARBOR_DATABASE_DBNAME: "{{ template "harbor.database.coreDatabase" . }}" - HARBOR_DATABASE_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - HARBOR_DATABASE_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - HARBOR_DATABASE_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" -{{- end}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/exporter/exporter-dpl.yaml b/charts/harbor/harbor/1.12.4/templates/exporter/exporter-dpl.yaml deleted file mode 100644 index 5ff36f48a6..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/exporter/exporter-dpl.yaml +++ /dev/null @@ -1,117 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: exporter -spec: - replicas: {{ .Values.exporter.replicas }} - revisionHistoryLimit: {{ .Values.exporter.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: exporter - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: exporter - annotations: -{{- if .Values.exporter.podAnnotations }} -{{ toYaml .Values.exporter.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.exporter.serviceAccountName }} - serviceAccountName: {{ .Values.exporter.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.exporter.automountServiceAccountToken | default false }} - containers: - - name: exporter - image: {{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 30 - periodSeconds: 10 - args: ["-log-level", "{{ .Values.logLevel }}"] - envFrom: - - configMapRef: - name: "{{ template "harbor.exporter" . }}-env" - - secretRef: - name: "{{ template "harbor.exporter" . }}" - env: - {{- if .Values.database.external.existingSecret }} - - name: HARBOR_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} -{{- if .Values.exporter.resources }} - resources: -{{ toYaml .Values.exporter.resources | indent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - # There are some metric data are collectd from harbor core. - # When internal TLS is enabled, the Exporter need the CA file to collect these data. - {{- end }} - volumes: - - name: config - secret: - secretName: "{{ template "harbor.exporter" . }}" - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.exporter.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.exporter.priorityClassName }} - priorityClassName: {{ .Values.exporter.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.12.4/templates/exporter/exporter-secret.yaml b/charts/harbor/harbor/1.12.4/templates/exporter/exporter-secret.yaml deleted file mode 100644 index 434a1bf689..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/exporter/exporter-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: -{{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} -{{- end }} -{{- if not .Values.database.external.existingSecret }} - HARBOR_DATABASE_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/exporter/exporter-svc.yaml b/charts/harbor/harbor/1.12.4/templates/exporter/exporter-svc.yaml deleted file mode 100644 index 4a6f3fdec6..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/exporter/exporter-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.exporter" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.exporter.port }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: exporter -{{ end }} diff --git a/charts/harbor/harbor/1.12.4/templates/ingress/ingress.yaml b/charts/harbor/harbor/1.12.4/templates/ingress/ingress.yaml deleted file mode 100644 index eedd13604a..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/ingress/ingress.yaml +++ /dev/null @@ -1,209 +0,0 @@ -{{- if eq .Values.expose.type "ingress" }} -{{- $ingress := .Values.expose.ingress -}} -{{- $tls := .Values.expose.tls -}} -{{- if eq .Values.expose.ingress.controller "gce" }} - {{- $_ := set . "portal_path" "/*" -}} - {{- $_ := set . "api_path" "/api/*" -}} - {{- $_ := set . "service_path" "/service/*" -}} - {{- $_ := set . "v2_path" "/v2/*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/*" -}} - {{- $_ := set . "controller_path" "/c/*" -}} - {{- $_ := set . "notary_path" "/" -}} -{{- else if eq .Values.expose.ingress.controller "ncp" }} - {{- $_ := set . "portal_path" "/.*" -}} - {{- $_ := set . "api_path" "/api/.*" -}} - {{- $_ := set . "service_path" "/service/.*" -}} - {{- $_ := set . "v2_path" "/v2/.*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}} - {{- $_ := set . "controller_path" "/c/.*" -}} - {{- $_ := set . "notary_path" "/.*" -}} -{{- else }} - {{- $_ := set . "portal_path" "/" -}} - {{- $_ := set . "api_path" "/api/" -}} - {{- $_ := set . "service_path" "/service/" -}} - {{- $_ := set . "v2_path" "/v2/" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/" -}} - {{- $_ := set . "controller_path" "/c/" -}} - {{- $_ := set . "notary_path" "/" -}} -{{- end }} - ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.harbor.labels }} -{{ toYaml $ingress.harbor.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if .Values.internalTLS.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" -{{- end }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -{{- if $ingress.harbor.annotations }} -{{ toYaml $ingress.harbor.annotations | indent 4 }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsCoreSecretForIngress" . }} - {{- if $ingress.hosts.core }} - hosts: - - {{ $ingress.hosts.core }} - {{- end }} - {{- end }} - rules: - - http: - paths: -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - - path: {{ .api_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - backend: - serviceName: {{ template "harbor.portal" . }} - servicePort: {{ template "harbor.portal.servicePort" . }} -{{- else }} - - path: {{ .api_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.portal" . }} - port: - number: {{ template "harbor.portal.servicePort" . }} -{{- end }} - {{- if $ingress.hosts.core }} - host: {{ $ingress.hosts.core }} - {{- end }} - -{{- if .Values.notary.enabled }} ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress-notary" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.notary.labels }} -{{ toYaml $ingress.notary.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -{{- if $ingress.notary.annotations }} -{{ toYaml $ingress.notary.annotations | indent 4 }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsNotarySecretForIngress" . }} - {{- if $ingress.hosts.notary }} - hosts: - - {{ $ingress.hosts.notary }} - {{- end }} - {{- end }} - rules: - - http: - paths: - - path: {{ .notary_path }} -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - backend: - serviceName: {{ template "harbor.notary-server" . }} - servicePort: 4443 -{{- else }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.notary-server" . }} - port: - number: 4443 -{{- end -}} - {{- if $ingress.hosts.notary }} - host: {{ $ingress.hosts.notary }} - {{- end }} -{{- end }} - -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/ingress/secret.yaml b/charts/harbor/harbor/1.12.4/templates/ingress/secret.yaml deleted file mode 100644 index 0d89af99ac..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/ingress/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForIngress" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cert := genSignedCert .Values.expose.ingress.hosts.core nil (list .Values.expose.ingress.hosts.core .Values.expose.ingress.hosts.notary) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/internal/auto-tls.yaml b/charts/harbor/harbor/1.12.4/templates/internal/auto-tls.yaml deleted file mode 100644 index da5f5e2c7b..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/internal/auto-tls.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} -{{- $ca := genCA "harbor-internal-ca" 365 }} -{{- $coreCN := (include "harbor.core" .) }} -{{- $coreCrt := genSignedCert $coreCN (list "127.0.0.1") (list "localhost" $coreCN) 365 $ca }} -{{- $jsCN := (include "harbor.jobservice" .) }} -{{- $jsCrt := genSignedCert $jsCN nil (list $jsCN) 365 $ca }} -{{- $regCN := (include "harbor.registry" .) }} -{{- $regCrt := genSignedCert $regCN nil (list $regCN) 365 $ca }} -{{- $portalCN := (include "harbor.portal" .) }} -{{- $portalCrt := genSignedCert $portalCN nil (list $portalCN) 365 $ca }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $coreCrt.Cert | b64enc | quote }} - tls.key: {{ $coreCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $jsCrt.Cert | b64enc | quote }} - tls.key: {{ $jsCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $regCrt.Cert | b64enc | quote }} - tls.key: {{ $regCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $portalCrt.Cert | b64enc | quote }} - tls.key: {{ $portalCrt.Key | b64enc | quote }} - -{{- if and .Values.trivy.enabled}} ---- -{{- $trivyCN := (include "harbor.trivy" .) }} -{{- $trivyCrt := genSignedCert $trivyCN nil (list $trivyCN) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $trivyCrt.Cert | b64enc | quote }} - tls.key: {{ $trivyCrt.Key | b64enc | quote }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-cm-env.yaml b/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-cm-env.yaml deleted file mode 100644 index 8411c7a47c..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-cm-env.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - CORE_URL: "{{ template "harbor.coreURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - - JOBSERVICE_WEBHOOK_JOB_MAX_RETRY: "{{ .Values.jobservice.notification.webhook_job_max_retry }}" - JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT: "{{ .Values.jobservice.notification.webhook_job_http_client_timeout }}" - - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.metrics.enabled}} - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: jobservice - {{- end }} - {{- template "harbor.traceEnvsForJobservice" . }} - {{- if .Values.cache.enabled }} - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-cm.yaml b/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-cm.yaml deleted file mode 100644 index 8211c62209..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-cm.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - #Server listening port - protocol: "{{ template "harbor.component.scheme" . }}" - port: {{ template "harbor.jobservice.containerPort". }} - {{- if .Values.internalTLS.enabled }} - https_config: - cert: "/etc/harbor/ssl/jobservice/tls.crt" - key: "/etc/harbor/ssl/jobservice/tls.key" - {{- end }} - worker_pool: - workers: {{ .Values.jobservice.maxJobWorkers }} - backend: "redis" - redis_pool: - redis_url: "{{ template "harbor.redis.urlForJobservice" . }}" - namespace: "harbor_job_service_namespace" - idle_timeout_second: 3600 - job_loggers: - {{- if has "file" .Values.jobservice.jobLoggers }} - - name: "FILE" - level: {{ .Values.logLevel | upper }} - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - {{- end }} - {{- if has "database" .Values.jobservice.jobLoggers }} - - name: "DB" - level: {{ .Values.logLevel | upper }} - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - {{- end }} - {{- if has "stdout" .Values.jobservice.jobLoggers }} - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - {{- end }} - metric: - enabled: {{ .Values.metrics.enabled }} - path: {{ .Values.metrics.jobservice.path }} - port: {{ .Values.metrics.jobservice.port }} - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: {{ .Values.jobservice.reaper.max_update_hours }} - # the max time for execution in running state without new task created - max_dangling_hours: {{ .Values.jobservice.reaper.max_dangling_hours }} diff --git a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-dpl.yaml b/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-dpl.yaml deleted file mode 100644 index 32df454b10..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-dpl.yaml +++ /dev/null @@ -1,150 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - replicas: {{ .Values.jobservice.replicas }} - revisionHistoryLimit: {{ .Values.jobservice.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: jobservice - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} - checksum/configmap-env: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/jobservice/jobservice-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.jobservice.podAnnotations }} -{{ toYaml .Values.jobservice.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.jobservice.serviceAccountName }} - serviceAccountName: {{ .Values.jobservice.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: jobservice - image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.jobservice.resources }} - resources: -{{ toYaml .Values.jobservice.resources | indent 10 }} -{{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/jobservice/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/jobservice/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/jobservice/ca.crt - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.jobservice" . }}-env" - - secretRef: - name: "{{ template "harbor.jobservice" . }}" - ports: - - containerPort: {{ template "harbor.jobservice.containerPort" . }} - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.subPath }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - mountPath: /etc/harbor/ssl/jobservice - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: jobservice-config - configMap: - name: "{{ template "harbor.jobservice" . }}" - - name: job-logs - {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLoggers) }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim | default (include "harbor.jobservice" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.jobservice.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.jobservice.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.jobservice.priorityClassName }} - priorityClassName: {{ .Values.jobservice.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-pvc.yaml b/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-pvc.yaml deleted file mode 100644 index a6b8b8bd38..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-pvc.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- $jobLog := .Values.persistence.persistentVolumeClaim.jobservice.jobLog -}} -{{- if and .Values.persistence.enabled (not $jobLog.existingClaim) (has "file" .Values.jobservice.jobLoggers) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.jobservice" . }} - annotations: - {{- range $key, $value := $jobLog.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - accessModes: - - {{ $jobLog.accessMode }} - resources: - requests: - storage: {{ $jobLog.size }} - {{- if $jobLog.storageClass }} - {{- if eq "-" $jobLog.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $jobLog.storageClass }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-secrets.yaml b/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-secrets.yaml deleted file mode 100644 index 3dfa6bd5e6..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-secrets.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - JOBSERVICE_SECRET: {{ .Values.jobservice.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-svc.yaml b/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-svc.yaml deleted file mode 100644 index d2b7a47fd4..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-svc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }} - port: {{ template "harbor.jobservice.servicePort" . }} - targetPort: {{ template "harbor.jobservice.containerPort" . }} -{{- if .Values.metrics.enabled }} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.jobservice.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice diff --git a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-tls.yaml b/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-tls.yaml deleted file mode 100644 index 234cb39995..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/jobservice/jobservice-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.jobservice.crt\" is required!" .Values.internalTLS.jobservice.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.jobservice.key\" is required!" .Values.internalTLS.jobservice.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/metrics/metrics-svcmon.yaml b/charts/harbor/harbor/1.12.4/templates/metrics/metrics-svcmon.yaml deleted file mode 100644 index ad8522974d..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/metrics/metrics-svcmon.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "harbor.fullname" . }} - labels: {{ include "harbor.labels" . | nindent 4 }} -{{- if .Values.metrics.serviceMonitor.additionalLabels }} -{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} -{{- end }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: {{ template "harbor.metricsPortName" . }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - honorLabels: true -{{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.metrics.serviceMonitor.relabelings | indent 4 }} -{{- end }} - selector: - matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/nginx/configmap-http.yaml b/charts/harbor/harbor/1.12.4/templates/nginx/configmap-http.yaml deleted file mode 100644 index c4b8354d06..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/nginx/configmap-http.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server {{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled}} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end }} - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - proxy_send_timeout 900; - proxy_read_timeout 900; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/nginx/configmap-https.yaml b/charts/harbor/harbor/1.12.4/templates/nginx/configmap-https.yaml deleted file mode 100644 index 74c667e009..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/nginx/configmap-https.yaml +++ /dev/null @@ -1,230 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server "{{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}"; - } - - {{- if .Values.notary.enabled }} - upstream notary-server { - server {{ template "harbor.notary-server" . }}:4443; - } - {{- end }} - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - {{- if .Values.notary.enabled }} - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 4443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:4443 ssl; - {{- end }} - server_tokens off; - # ssl - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # recommendations from https://raymii.org/s/tutorials/strong_ssl_security_on_nginx.html - ssl_protocols tlsv1.2; - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:ssl:10m; - - # disable any limits to avoid http 413 for large image uploads - client_max_body_size 0; - - # required to avoid http 411: see issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - location /v2/ { - proxy_pass http://notary-server/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - - proxy_send_timeout 900; - proxy_read_timeout 900; - } - } - {{- end }} - - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8443 ssl; - {{- end }} - # server_name harbordomain.com; - server_tokens off; - # SSL - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2; - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - # Add extra headers - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; HttpOnly; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end}} - #server_name harbordomain.com; - return 301 https://$host$request_uri; - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/nginx/deployment.yaml b/charts/harbor/harbor/1.12.4/templates/nginx/deployment.yaml deleted file mode 100644 index bc1de0abfe..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/nginx/deployment.yaml +++ /dev/null @@ -1,109 +0,0 @@ -{{- if ne .Values.expose.type "ingress" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: nginx -spec: - replicas: {{ .Values.nginx.replicas }} - revisionHistoryLimit: {{ .Values.nginx.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: nginx - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: nginx - annotations: - {{- if not .Values.expose.tls.enabled }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} - {{- else }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-https.yaml") . | sha256sum }} - {{- end }} - {{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} - checksum/secret: {{ include (print $.Template.BasePath "/nginx/secret.yaml") . | sha256sum }} - {{- end }} -{{- if .Values.nginx.podAnnotations }} -{{ toYaml .Values.nginx.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- if .Values.nginx.serviceAccountName }} - serviceAccountName: {{ .Values.nginx.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.nginx.automountServiceAccountToken | default false }} - containers: - - name: nginx - image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - {{- $_ := set . "scheme" "HTTP" -}} - {{- $_ := set . "port" "8080" -}} - {{- if .Values.expose.tls.enabled }} - {{- $_ := set . "scheme" "HTTPS" -}} - {{- $_ := set . "port" "8443" -}} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.nginx.resources }} - resources: -{{ toYaml .Values.nginx.resources | indent 10 }} -{{- end }} - ports: - - containerPort: 8080 - - containerPort: 8443 - - containerPort: 4443 - volumeMounts: - - name: config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.expose.tls.enabled }} - - name: certificate - mountPath: /etc/nginx/cert - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.nginx" . }} - {{- if .Values.expose.tls.enabled }} - - name: certificate - secret: - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- with .Values.nginx.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nginx.priorityClassName }} - priorityClassName: {{ .Values.nginx.priorityClassName }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/nginx/secret.yaml b/charts/harbor/harbor/1.12.4/templates/nginx/secret.yaml deleted file mode 100644 index c819c556d9..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/nginx/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cn := (required "The \"expose.tls.auto.commonName\" is required!" .Values.expose.tls.auto.commonName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if regexMatch `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` $cn }} - {{- $cert := genSignedCert $cn (list $cn) nil 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- else }} - {{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/nginx/service.yaml b/charts/harbor/harbor/1.12.4/templates/nginx/service.yaml deleted file mode 100644 index df4da0944a..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/nginx/service.yaml +++ /dev/null @@ -1,96 +0,0 @@ -{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }} -apiVersion: v1 -kind: Service -metadata: -{{- if eq .Values.expose.type "clusterIP" }} -{{- $clusterIP := .Values.expose.clusterIP }} - name: {{ $clusterIP.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $clusterIP.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: ClusterIP - ports: - - name: http - port: {{ $clusterIP.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $clusterIP.ports.httpsPort }} - targetPort: 8443 - {{- end }} - {{- if .Values.notary.enabled }} - - name: notary - port: {{ $clusterIP.ports.notaryPort }} - targetPort: 4443 - {{- end }} -{{- else if eq .Values.expose.type "nodePort" }} -{{- $nodePort := .Values.expose.nodePort }} - name: {{ $nodePort.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - type: NodePort - ports: - - name: http - port: {{ $nodePort.ports.http.port }} - targetPort: 8080 - {{- if $nodePort.ports.http.nodePort }} - nodePort: {{ $nodePort.ports.http.nodePort }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $nodePort.ports.https.port }} - targetPort: 8443 - {{- if $nodePort.ports.https.nodePort }} - nodePort: {{ $nodePort.ports.https.nodePort }} - {{- end }} - {{- end }} - {{- if .Values.notary.enabled }} - - name: notary - port: {{ $nodePort.ports.notary.port }} - targetPort: 4443 - {{- if $nodePort.ports.notary.nodePort }} - nodePort: {{ $nodePort.ports.notary.nodePort }} - {{- end }} - {{- end }} -{{- else if eq .Values.expose.type "loadBalancer" }} -{{- $loadBalancer := .Values.expose.loadBalancer }} - name: {{ $loadBalancer.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $loadBalancer.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: LoadBalancer - {{- with $loadBalancer.sourceRanges }} - loadBalancerSourceRanges: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $loadBalancer.IP }} - loadBalancerIP: {{ $loadBalancer.IP }} - {{- end }} - ports: - - name: http - port: {{ $loadBalancer.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $loadBalancer.ports.httpsPort }} - targetPort: 8443 - {{- end }} - {{- if .Values.notary.enabled }} - - name: notary - port: {{ $loadBalancer.ports.notaryPort }} - targetPort: 4443 - {{- end }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: nginx -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/notary/notary-secret.yaml b/charts/harbor/harbor/1.12.4/templates/notary/notary-secret.yaml deleted file mode 100644 index 6de63dd8c5..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/notary/notary-secret.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if and .Values.notary.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.notary-server" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: notary -type: Opaque -data: - {{- if not .Values.notary.secretName }} - {{- $ca := genCA "harbor-notary-ca" 365 }} - {{- $cert := genSignedCert (include "harbor.notary-signer" .) nil (list (include "harbor.notary-signer" .)) 365 $ca }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - {{- end }} - server.json: {{ tpl (.Files.Get "conf/notary-server.json") . | b64enc }} - signer.json: {{ tpl (.Files.Get "conf/notary-signer.json") . | b64enc }} - NOTARY_SERVER_DB_URL: {{ include "harbor.database.notaryServer" . | b64enc }} - NOTARY_SIGNER_DB_URL: {{ include "harbor.database.notarySigner" . | b64enc }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/notary/notary-server.yaml b/charts/harbor/harbor/1.12.4/templates/notary/notary-server.yaml deleted file mode 100644 index 64cfd293f2..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/notary/notary-server.yaml +++ /dev/null @@ -1,111 +0,0 @@ -{{ if .Values.notary.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.notary-server" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: notary-server -spec: - replicas: {{ .Values.notary.server.replicas }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: notary-server - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: notary-server - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/notary/notary-secret.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if .Values.notary.server.podAnnotations }} -{{ toYaml .Values.notary.server.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.notary.server.serviceAccountName }} - serviceAccountName: {{ .Values.notary.server.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.notary.server.automountServiceAccountToken | default false }} - containers: - - name: notary-server - image: {{ .Values.notary.server.image.repository }}:{{ .Values.notary.server.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /_notary_server/health - scheme: "HTTP" - port: 4443 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /_notary_server/health - scheme: "HTTP" - port: 4443 - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.notary.server.resources }} - resources: -{{ toYaml .Values.notary.server.resources | indent 10 }} -{{- end }} - env: - - name: MIGRATIONS_PATH - value: migrations/server/postgresql - - name: DB_URL - valueFrom: - secretKeyRef: - name: {{ template "harbor.notary-server" . }} - key: NOTARY_SERVER_DB_URL - volumeMounts: - - name: config - mountPath: /etc/notary/server-config.postgres.json - subPath: server.json - - name: token-service-certificate - mountPath: /root.crt - subPath: tls.crt - - name: signer-certificate - mountPath: /etc/ssl/notary/ca.crt - subPath: ca.crt - volumes: - - name: config - secret: - secretName: "{{ template "harbor.notary-server" . }}" - - name: token-service-certificate - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - - name: signer-certificate - secret: - {{- if .Values.notary.secretName }} - secretName: {{ .Values.notary.secretName }} - {{- else }} - secretName: {{ template "harbor.notary-server" . }} - {{- end }} - {{- with .Values.notary.server.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.notary.server.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.notary.server.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.notary.server.priorityClassName }} - priorityClassName: {{ .Values.notary.server.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.12.4/templates/notary/notary-signer.yaml b/charts/harbor/harbor/1.12.4/templates/notary/notary-signer.yaml deleted file mode 100644 index d94e4909bf..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/notary/notary-signer.yaml +++ /dev/null @@ -1,105 +0,0 @@ -{{ if .Values.notary.enabled }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.notary-signer" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: notary-signer -spec: - replicas: {{ .Values.notary.signer.replicas }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: notary-signer - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: notary-signer - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/notary/notary-secret.yaml") . | sha256sum }} -{{- if .Values.notary.signer.podAnnotations }} -{{ toYaml .Values.notary.signer.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.notary.signer.serviceAccountName }} - serviceAccountName: {{ .Values.notary.signer.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.notary.signer.automountServiceAccountToken | default false }} - containers: - - name: notary-signer - image: {{ .Values.notary.signer.image.repository }}:{{ .Values.notary.signer.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: "HTTPS" - port: 7899 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: "HTTPS" - port: 7899 - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.notary.signer.resources }} - resources: -{{ toYaml .Values.notary.signer.resources | indent 10 }} -{{- end }} - env: - - name: MIGRATIONS_PATH - value: migrations/signer/postgresql - - name: DB_URL - valueFrom: - secretKeyRef: - name: {{ template "harbor.notary-server" . }} - key: NOTARY_SIGNER_DB_URL - - name: NOTARY_SIGNER_DEFAULTALIAS - value: defaultalias - volumeMounts: - - name: config - mountPath: /etc/notary/signer-config.postgres.json - subPath: signer.json - - name: signer-certificate - mountPath: /etc/ssl/notary/tls.crt - subPath: tls.crt - - name: signer-certificate - mountPath: /etc/ssl/notary/tls.key - subPath: tls.key - volumes: - - name: config - secret: - secretName: "{{ template "harbor.notary-server" . }}" - - name: signer-certificate - secret: - {{- if .Values.notary.secretName }} - secretName: {{ .Values.notary.secretName }} - {{- else }} - secretName: {{ template "harbor.notary-server" . }} - {{- end }} - {{- with .Values.notary.signer.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.notary.signer.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.notary.signer.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.notary.signer.priorityClassName }} - priorityClassName: {{ .Values.notary.signer.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.12.4/templates/notary/notary-svc.yaml b/charts/harbor/harbor/1.12.4/templates/notary/notary-svc.yaml deleted file mode 100644 index b6aa42d89e..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/notary/notary-svc.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{ if .Values.notary.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.notary-server" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.notary.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: 4443 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: notary-server - ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.notary-signer" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 7899 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: notary-signer -{{ end }} diff --git a/charts/harbor/harbor/1.12.4/templates/portal/configmap.yaml b/charts/harbor/harbor/1.12.4/templates/portal/configmap.yaml deleted file mode 100644 index 1cea8ab63f..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/portal/configmap.yaml +++ /dev/null @@ -1,63 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - events { - worker_connections 1024; - } - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - {{- if .Values.internalTLS.enabled }} - {{- if .Values.ipFamily.ipv4.enabled}} - listen {{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - # SSL - ssl_certificate /etc/harbor/ssl/portal/tls.crt; - ssl_certificate_key /etc/harbor/ssl/portal/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2; - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - {{- else }} - {{- if .Values.ipFamily.ipv4.enabled }} - listen {{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- end }} - server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location /devcenter-api-2.0 { - try_files $uri $uri/ /swagger-ui-index.html; - } - location / { - try_files $uri $uri/ /index.html; - } - location = /index.html { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - } - } diff --git a/charts/harbor/harbor/1.12.4/templates/portal/deployment.yaml b/charts/harbor/harbor/1.12.4/templates/portal/deployment.yaml deleted file mode 100644 index d3469deef4..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/portal/deployment.yaml +++ /dev/null @@ -1,97 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: portal -spec: - replicas: {{ .Values.portal.replicas }} - revisionHistoryLimit: {{ .Values.portal.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: portal - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: portal - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} -{{- end }} - checksum/configmap: {{ include (print $.Template.BasePath "/portal/configmap.yaml") . | sha256sum }} -{{- if .Values.portal.podAnnotations }} -{{ toYaml .Values.portal.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- if .Values.portal.serviceAccountName }} - serviceAccountName: {{ .Values.portal.serviceAccountName }} -{{- end }} - automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }} - containers: - - name: portal - image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} -{{- if .Values.portal.resources }} - resources: -{{ toYaml .Values.portal.resources | indent 10 }} -{{- end }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: {{ template "harbor.portal.containerPort" . }} - volumeMounts: - - name: portal-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - mountPath: /etc/harbor/ssl/portal - {{- end }} - volumes: - - name: portal-config - configMap: - name: "{{ template "harbor.portal" . }}" - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.portal.secretName" . }} - {{- end }} - {{- with .Values.portal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.portal.priorityClassName }} - priorityClassName: {{ .Values.portal.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/portal/service.yaml b/charts/harbor/harbor/1.12.4/templates/portal/service.yaml deleted file mode 100644 index ff4eda435b..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/portal/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: {{ template "harbor.portal.servicePort" . }} - targetPort: {{ template "harbor.portal.containerPort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: portal diff --git a/charts/harbor/harbor/1.12.4/templates/portal/tls.yaml b/charts/harbor/harbor/1.12.4/templates/portal/tls.yaml deleted file mode 100644 index de63f4e813..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/portal/tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.portal.crt\" is required!" .Values.internalTLS.portal.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.portal.key\" is required!" .Values.internalTLS.portal.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/redis/service.yaml b/charts/harbor/harbor/1.12.4/templates/redis/service.yaml deleted file mode 100644 index 79c95c3e05..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/redis/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 6379 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: redis -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/redis/statefulset.yaml b/charts/harbor/harbor/1.12.4/templates/redis/statefulset.yaml deleted file mode 100644 index 74b7581fd8..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/redis/statefulset.yaml +++ /dev/null @@ -1,109 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -{{- $redis := .Values.persistence.persistentVolumeClaim.redis -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: redis -spec: - replicas: 1 - serviceName: {{ template "harbor.redis" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: redis - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: redis -{{- if .Values.redis.podAnnotations }} - annotations: -{{ toYaml .Values.redis.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.redis.internal.serviceAccountName }} - serviceAccountName: {{ .Values.redis.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.redis.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: redis - image: {{ .Values.redis.internal.image.repository }}:{{ .Values.redis.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.redis.internal.resources }} - resources: -{{ toYaml .Values.redis.internal.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: {{ $redis.subPath }} - {{- if not .Values.persistence.enabled }} - volumes: - - name: data - emptyDir: {} - {{- else if $redis.existingClaim }} - volumes: - - name: data - persistentVolumeClaim: - claimName: {{ $redis.existingClaim }} - {{- end -}} - {{- with .Values.redis.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.redis.internal.priorityClassName }} - priorityClassName: {{ .Values.redis.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $redis.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $redis.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $redis.accessMode | quote }}] - {{- if $redis.storageClass }} - {{- if (eq "-" $redis.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $redis.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $redis.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.12.4/templates/registry/registry-cm.yaml b/charts/harbor/harbor/1.12.4/templates/registry/registry-cm.yaml deleted file mode 100644 index 4f7056c384..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/registry/registry-cm.yaml +++ /dev/null @@ -1,246 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - version: 0.1 - log: - {{- if eq .Values.logLevel "warning" }} - level: warn - {{- else if eq .Values.logLevel "fatal" }} - level: error - {{- else }} - level: {{ .Values.logLevel }} - {{- end }} - fields: - service: registry - storage: - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if eq $type "filesystem" }} - filesystem: - rootdirectory: {{ $storage.filesystem.rootdirectory }} - {{- if $storage.filesystem.maxthreads }} - maxthreads: {{ $storage.filesystem.maxthreads }} - {{- end }} - {{- else if eq $type "azure" }} - azure: - accountname: {{ $storage.azure.accountname }} - container: {{ $storage.azure.container }} - {{- if $storage.azure.realm }} - realm: {{ $storage.azure.realm }} - {{- end }} - {{- else if eq $type "gcs" }} - gcs: - bucket: {{ $storage.gcs.bucket }} - {{- if not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity }} - keyfile: /etc/registry/gcs-key.json - {{- end }} - {{- if $storage.gcs.rootdirectory }} - rootdirectory: {{ $storage.gcs.rootdirectory }} - {{- end }} - {{- if $storage.gcs.chunksize }} - chunksize: {{ $storage.gcs.chunksize }} - {{- end }} - {{- else if eq $type "s3" }} - s3: - region: {{ $storage.s3.region }} - bucket: {{ $storage.s3.bucket }} - {{- if $storage.s3.regionendpoint }} - regionendpoint: {{ $storage.s3.regionendpoint }} - {{- end }} - {{- if $storage.s3.encrypt }} - encrypt: {{ $storage.s3.encrypt }} - {{- end }} - {{- if $storage.s3.keyid }} - keyid: {{ $storage.s3.keyid }} - {{- end }} - {{- if $storage.s3.secure }} - secure: {{ $storage.s3.secure }} - {{- end }} - {{- if and $storage.s3.secure $storage.s3.skipverify }} - skipverify: {{ $storage.s3.skipverify }} - {{- end }} - {{- if $storage.s3.v4auth }} - v4auth: {{ $storage.s3.v4auth }} - {{- end }} - {{- if $storage.s3.chunksize }} - chunksize: {{ $storage.s3.chunksize }} - {{- end }} - {{- if $storage.s3.rootdirectory }} - rootdirectory: {{ $storage.s3.rootdirectory }} - {{- end }} - {{- if $storage.s3.storageclass }} - storageclass: {{ $storage.s3.storageclass }} - {{- end }} - {{- if $storage.s3.multipartcopychunksize }} - multipartcopychunksize: {{ $storage.s3.multipartcopychunksize }} - {{- end }} - {{- if $storage.s3.multipartcopymaxconcurrency }} - multipartcopymaxconcurrency: {{ $storage.s3.multipartcopymaxconcurrency }} - {{- end }} - {{- if $storage.s3.multipartcopythresholdsize }} - multipartcopythresholdsize: {{ $storage.s3.multipartcopythresholdsize }} - {{- end }} - {{- else if eq $type "swift" }} - swift: - authurl: {{ $storage.swift.authurl }} - username: {{ $storage.swift.username }} - container: {{ $storage.swift.container }} - {{- if $storage.swift.region }} - region: {{ $storage.swift.region }} - {{- end }} - {{- if $storage.swift.tenant }} - tenant: {{ $storage.swift.tenant }} - {{- end }} - {{- if $storage.swift.tenantid }} - tenantid: {{ $storage.swift.tenantid }} - {{- end }} - {{- if $storage.swift.domain }} - domain: {{ $storage.swift.domain }} - {{- end }} - {{- if $storage.swift.domainid }} - domainid: {{ $storage.swift.domainid }} - {{- end }} - {{- if $storage.swift.trustid }} - trustid: {{ $storage.swift.trustid }} - {{- end }} - {{- if $storage.swift.insecureskipverify }} - insecureskipverify: {{ $storage.swift.insecureskipverify }} - {{- end }} - {{- if $storage.swift.chunksize }} - chunksize: {{ $storage.swift.chunksize }} - {{- end }} - {{- if $storage.swift.prefix }} - prefix: {{ $storage.swift.prefix }} - {{- end }} - {{- if $storage.swift.authversion }} - authversion: {{ $storage.swift.authversion }} - {{- end }} - {{- if $storage.swift.endpointtype }} - endpointtype: {{ $storage.swift.endpointtype }} - {{- end }} - {{- if $storage.swift.tempurlcontainerkey }} - tempurlcontainerkey: {{ $storage.swift.tempurlcontainerkey }} - {{- end }} - {{- if $storage.swift.tempurlmethods }} - tempurlmethods: {{ $storage.swift.tempurlmethods }} - {{- end }} - {{- else if eq $type "oss" }} - oss: - accesskeyid: {{ $storage.oss.accesskeyid }} - region: {{ $storage.oss.region }} - bucket: {{ $storage.oss.bucket }} - {{- if $storage.oss.endpoint }} - endpoint: {{ $storage.oss.bucket }}.{{ $storage.oss.endpoint }} - {{- end }} - {{- if $storage.oss.internal }} - internal: {{ $storage.oss.internal }} - {{- end }} - {{- if $storage.oss.encrypt }} - encrypt: {{ $storage.oss.encrypt }} - {{- end }} - {{- if $storage.oss.secure }} - secure: {{ $storage.oss.secure }} - {{- end }} - {{- if $storage.oss.chunksize }} - chunksize: {{ $storage.oss.chunksize }} - {{- end }} - {{- if $storage.oss.rootdirectory }} - rootdirectory: {{ $storage.oss.rootdirectory }} - {{- end }} - {{- end }} - cache: - layerinfo: redis - maintenance: - uploadpurging: - {{- if .Values.registry.upload_purging.enabled }} - enabled: true - age: {{ .Values.registry.upload_purging.age }} - interval: {{ .Values.registry.upload_purging.interval }} - dryrun: {{ .Values.registry.upload_purging.dryrun }} - {{- else }} - enabled: false - {{- end }} - delete: - enabled: true - redirect: - disable: {{ $storage.disableredirect }} - redis: - addr: {{ template "harbor.redis.addr" . }} - {{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }} - sentinelMasterSet: {{ template "harbor.redis.masterSet" . }} - {{- end }} - db: {{ template "harbor.redis.dbForRegistry" . }} - {{- if not (eq (include "harbor.redis.password" .) "") }} - password: {{ template "harbor.redis.password" . }} - {{- end }} - readtimeout: 10s - writetimeout: 10s - dialtimeout: 10s - pool: - maxidle: 100 - maxactive: 500 - idletimeout: 60s - http: - addr: :{{ template "harbor.registry.containerPort" . }} - relativeurls: {{ .Values.registry.relativeurls }} - {{- if .Values.internalTLS.enabled }} - tls: - certificate: /etc/harbor/ssl/registry/tls.crt - key: /etc/harbor/ssl/registry/tls.key - minimumtls: tls1.2 - {{- end }} - # set via environment variable - # secret: placeholder - debug: - {{- if .Values.metrics.enabled}} - addr: :{{ .Values.metrics.registry.port }} - prometheus: - enabled: true - path: {{ .Values.metrics.registry.path }} - {{- else }} - addr: localhost:5001 - {{- end }} - auth: - htpasswd: - realm: harbor-registry-basic-realm - path: /etc/registry/passwd - validation: - disabled: true - compatibility: - schema1: - enabled: true - - {{- if .Values.registry.middleware.enabled }} - {{- $middleware := .Values.registry.middleware }} - {{- $middlewareType := $middleware.type }} - {{- if eq $middlewareType "cloudFront" }} - middleware: - storage: - - name: cloudfront - options: - baseurl: {{ $middleware.cloudFront.baseurl }} - privatekey: /etc/registry/pk.pem - keypairid: {{ $middleware.cloudFront.keypairid }} - duration: {{ $middleware.cloudFront.duration }} - ipfilteredby: {{ $middleware.cloudFront.ipfilteredby }} - {{- end }} - {{- end }} - ctl-config.yml: |+ - --- - {{- if .Values.internalTLS.enabled }} - protocol: "https" - port: 8443 - https_config: - cert: "/etc/harbor/ssl/registry/tls.crt" - key: "/etc/harbor/ssl/registry/tls.key" - {{- else }} - protocol: "http" - port: 8080 - {{- end }} - log_level: {{ .Values.logLevel }} - registry_config: "/etc/registry/config.yml" diff --git a/charts/harbor/harbor/1.12.4/templates/registry/registry-dpl.yaml b/charts/harbor/harbor/1.12.4/templates/registry/registry-dpl.yaml deleted file mode 100644 index 118a165d46..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/registry/registry-dpl.yaml +++ /dev/null @@ -1,317 +0,0 @@ -{{- $storage := .Values.persistence.imageChartStorage }} -{{- $type := $storage.type }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - replicas: {{ .Values.registry.replicas }} - revisionHistoryLimit: {{ .Values.registry.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: registry - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: registry - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/registry/registry-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.registry.podAnnotations }} -{{ toYaml .Values.registry.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - fsGroupChangePolicy: OnRootMismatch -{{- if .Values.registry.serviceAccountName }} - serviceAccountName: {{ .Values.registry.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: registry - image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.registry.resources }} - resources: -{{ toYaml .Values.registry.registry.resources | indent 10 }} -{{- end }} - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: "{{ template "harbor.registry" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - ports: - - containerPort: {{ template "harbor.registry.containerPort" . }} - - containerPort: 5001 - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-htpasswd - mountPath: /etc/registry/passwd - subPath: passwd - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - mountPath: /etc/registry/pk.pem - subPath: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - - name: registryctl - image: {{ .Values.registry.controller.image.repository }}:{{ .Values.registry.controller.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.controller.resources }} - resources: -{{ toYaml .Values.registry.controller.resources | indent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.registryCtl" . }}" - - secretRef: - name: "{{ template "harbor.registry" . }}" - - secretRef: - name: "{{ template "harbor.registryCtl" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.jobservice" . }} - key: JOBSERVICE_SECRET - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - ports: - - containerPort: {{ template "harbor.registryctl.containerPort" . }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: registry-htpasswd - secret: - {{- if not .Values.registry.credentials.existingSecret }} - secretName: {{ template "harbor.registry" . }}-htpasswd - {{ else }} - secretName: {{ .Values.registry.credentials.existingSecret }} - {{- end }} - items: - - key: REGISTRY_HTPASSWD - path: passwd - - name: registry-config - configMap: - name: "{{ template "harbor.registry" . }}" - - name: registry-data - {{- if and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "filesystem") }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.registry.existingClaim | default (include "harbor.registry" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.registry.secretName" . }} - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - secret: - {{- if and (eq $type "gcs") $storage.gcs.existingSecret }} - secretName: {{ $storage.gcs.existingSecret }} - {{- else }} - secretName: {{ template "harbor.registry" . }} - {{- end }} - items: - - key: GCS_KEY_DATA - path: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - secret: - secretName: {{ .Values.persistence.imageChartStorage.caBundleSecretName }} - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - secret: - secretName: {{ .Values.registry.middleware.cloudFront.privateKeySecret }} - items: - - key: CLOUDFRONT_KEY_DATA - path: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.registry.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.registry.priorityClassName }} - priorityClassName: {{ .Values.registry.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/registry/registry-pvc.yaml b/charts/harbor/harbor/1.12.4/templates/registry/registry-pvc.yaml deleted file mode 100644 index 2112e22877..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/registry/registry-pvc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.persistence.enabled }} -{{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} -{{- if and (not $registry.existingClaim) (eq .Values.persistence.imageChartStorage.type "filesystem") }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.registry" . }} - annotations: - {{- range $key, $value := $registry.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - accessModes: - - {{ $registry.accessMode }} - resources: - requests: - storage: {{ $registry.size }} - {{- if $registry.storageClass }} - {{- if eq "-" $registry.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $registry.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/registry/registry-secret.yaml b/charts/harbor/harbor/1.12.4/templates/registry/registry-secret.yaml deleted file mode 100644 index 529462906e..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/registry/registry-secret.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.redis.external.existingSecret }} - REGISTRY_REDIS_PASSWORD: {{ include "harbor.redis.password" . | b64enc | quote }} - {{- end }} - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if and (eq $type "azure") (not $storage.azure.existingSecret) }} - REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }} - {{- else if and (and (eq $type "gcs") (not $storage.gcs.existingSecret)) (not $storage.gcs.useWorkloadIdentity) }} - GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }} - {{- else if eq $type "s3" }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.accesskey) }} - REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }} - {{- end }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.secretkey) }} - REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }} - {{- end }} - {{- else if eq $type "swift" }} - REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }} - {{- if $storage.swift.secretkey }} - REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }} - {{- end }} - {{- if $storage.swift.accesskey }} - REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }} - {{- end }} - {{- else if eq $type "oss" }} - REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }} - {{- end }} -{{- if not .Values.registry.credentials.existingSecret }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}-htpasswd" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if .Values.registry.credentials.htpasswdString }} - REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswdString | b64enc | quote }} - {{- else }} - REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/registry/registry-svc.yaml b/charts/harbor/harbor/1.12.4/templates/registry/registry-svc.yaml deleted file mode 100644 index 749690ea03..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/registry/registry-svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }} - port: {{ template "harbor.registry.servicePort" . }} - - - name: {{ ternary "https-controller" "http-controller" .Values.internalTLS.enabled }} - port: {{ template "harbor.registryctl.servicePort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.registry.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/registry/registry-tls.yaml b/charts/harbor/harbor/1.12.4/templates/registry/registry-tls.yaml deleted file mode 100644 index 9d1862c417..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/registry/registry-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.registry.crt\" is required!" .Values.internalTLS.registry.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.registry.key\" is required!" .Values.internalTLS.registry.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/registry/registryctl-cm.yaml b/charts/harbor/harbor/1.12.4/templates/registry/registryctl-cm.yaml deleted file mode 100644 index 87aa5ffe24..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/registry/registryctl-cm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- template "harbor.traceEnvsForRegistryCtl" . }} diff --git a/charts/harbor/harbor/1.12.4/templates/registry/registryctl-secret.yaml b/charts/harbor/harbor/1.12.4/templates/registry/registryctl-secret.yaml deleted file mode 100644 index 70097703e9..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/registry/registryctl-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- template "harbor.traceJaegerPassword" . }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.12.4/templates/trivy/trivy-secret.yaml b/charts/harbor/harbor/1.12.4/templates/trivy/trivy-secret.yaml deleted file mode 100644 index 84652c7498..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/trivy/trivy-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.trivy.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - redisURL: {{ include "harbor.redis.urlForTrivy" . | b64enc }} - gitHubToken: {{ .Values.trivy.gitHubToken | default "" | b64enc | quote }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/trivy/trivy-sts.yaml b/charts/harbor/harbor/1.12.4/templates/trivy/trivy-sts.yaml deleted file mode 100644 index 37b19ac2d3..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/trivy/trivy-sts.yaml +++ /dev/null @@ -1,206 +0,0 @@ -{{- if .Values.trivy.enabled }} -{{- $trivy := .Values.persistence.persistentVolumeClaim.trivy }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: trivy -spec: - replicas: {{ .Values.trivy.replicas }} - serviceName: {{ template "harbor.trivy" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: trivy - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: trivy - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/trivy/trivy-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/trivy/trivy-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.trivy.podAnnotations }} -{{ toYaml .Values.trivy.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} -{{- end }} -{{- if .Values.trivy.serviceAccountName }} - serviceAccountName: {{ .Values.trivy.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }} - containers: - - name: trivy - image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - securityContext: - privileged: false - allowPrivilegeEscalation: false - env: - {{- if has "trivy" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - - name: "SCANNER_LOG_LEVEL" - value: {{ .Values.logLevel | quote }} - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: {{ .Values.trivy.debugMode | quote }} - - name: "SCANNER_TRIVY_VULN_TYPE" - value: {{ .Values.trivy.vulnType | quote }} - - name: "SCANNER_TRIVY_TIMEOUT" - value: {{ .Values.trivy.timeout | quote }} - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: {{ .Values.trivy.severity | quote }} - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: {{ .Values.trivy.ignoreUnfixed | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: {{ .Values.trivy.skipUpdate | default false | quote }} - - name: "SCANNER_TRIVY_OFFLINE_SCAN" - value: {{ .Values.trivy.offlineScan | default false | quote }} - - name: "SCANNER_TRIVY_SECURITY_CHECKS" - value: {{ .Values.trivy.securityCheck | quote }} - - name: "SCANNER_TRIVY_INSECURE" - value: {{ .Values.trivy.insecure | default false | quote }} - - name: SCANNER_API_SERVER_ADDR - value: ":{{ template "harbor.trivy.containerPort" . }}" - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: SCANNER_API_SERVER_TLS_KEY - value: /etc/harbor/ssl/trivy/tls.key - - name: SCANNER_API_SERVER_TLS_CERTIFICATE - value: /etc/harbor/ssl/trivy/tls.crt - {{- end }} - - name: "SCANNER_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - ports: - - name: api-server - containerPort: {{ template "harbor.trivy.containerPort" . }} - volumeMounts: - - name: data - mountPath: /home/scanner/.cache - subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} - readOnly: false - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - mountPath: /etc/harbor/ssl/trivy - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 10 }} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: -{{ toYaml .Values.trivy.resources | indent 12 }} - {{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }} - volumes: - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.trivy.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- if not .Values.persistence.enabled }} - - name: "data" - emptyDir: {} - {{- else if $trivy.existingClaim }} - - name: "data" - persistentVolumeClaim: - claimName: {{ $trivy.existingClaim }} - {{- end }} - {{- end }} - {{- with .Values.trivy.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.trivy.priorityClassName }} - priorityClassName: {{ .Values.trivy.priorityClassName }} - {{- end }} -{{- if and .Values.persistence.enabled (not $trivy.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $trivy.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $trivy.accessMode | quote }}] - {{- if $trivy.storageClass }} - {{- if (eq "-" $trivy.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $trivy.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $trivy.size | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/templates/trivy/trivy-svc.yaml b/charts/harbor/harbor/1.12.4/templates/trivy/trivy-svc.yaml deleted file mode 100644 index 24daf094e8..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/trivy/trivy-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{ if .Values.trivy.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.trivy" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-trivy" "http-trivy" .Values.internalTLS.enabled }} - protocol: TCP - port: {{ template "harbor.trivy.servicePort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: trivy -{{ end }} diff --git a/charts/harbor/harbor/1.12.4/templates/trivy/trivy-tls.yaml b/charts/harbor/harbor/1.12.4/templates/trivy/trivy-tls.yaml deleted file mode 100644 index a9c8330c37..0000000000 --- a/charts/harbor/harbor/1.12.4/templates/trivy/trivy-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.trivy.enabled .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.trivy.crt\" is required!" .Values.internalTLS.trivy.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.trivy.key\" is required!" .Values.internalTLS.trivy.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.12.4/values.yaml b/charts/harbor/harbor/1.12.4/values.yaml deleted file mode 100644 index 11d2c4a57d..0000000000 --- a/charts/harbor/harbor/1.12.4/values.yaml +++ /dev/null @@ -1,958 +0,0 @@ -expose: - # Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" - # and fill the information in the corresponding section - type: ingress - tls: - # Enable TLS or not. - # Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" - # Note: if the "expose.type" is "ingress" and TLS is disabled, - # the port must be included in the command when pulling/pushing images. - # Refer to https://github.com/goharbor/harbor/issues/5291 for details. - enabled: true - # The source of the tls certificate. Set as "auto", "secret" - # or "none" and fill the information in the corresponding section - # 1) auto: generate the tls certificate automatically - # 2) secret: read the tls certificate from the specified secret. - # The tls certificate can be generated manually or by cert manager - # 3) none: configure no tls certificate for the ingress. If the default - # tls certificate is configured in the ingress controller, choose this option - certSource: auto - auto: - # The common name used to generate the certificate, it's necessary - # when the type isn't "ingress" - commonName: "" - secret: - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - secretName: "" - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - # Only needed when the "expose.type" is "ingress". - notarySecretName: "" - ingress: - hosts: - core: core.harbor.domain - notary: notary.harbor.domain - # set to the type of ingress controller if it has specific requirements. - # leave as `default` for most ingress controllers. - # set to `gce` if using the GCE ingress controller - # set to `ncp` if using the NCP (NSX-T Container Plugin) ingress controller - # set to `alb` if using the ALB ingress controller - # set to `f5-bigip` if using the F5 BIG-IP ingress controller - controller: default - ## Allow .Capabilities.KubeVersion.Version to be overridden while creating ingress - kubeVersionOverride: "" - className: "" - annotations: - # note different ingress controllers may require a different ssl-redirect annotation - # for Envoy, use ingress.kubernetes.io/force-ssl-redirect: "true" and remove the nginx lines below - ingress.kubernetes.io/ssl-redirect: "true" - ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - notary: - # notary ingress-specific annotations - annotations: {} - # notary ingress-specific labels - labels: {} - harbor: - # harbor ingress-specific annotations - annotations: {} - # harbor ingress-specific labels - labels: {} - clusterIP: - # The name of ClusterIP service - name: harbor - # Annotations on the ClusterIP service - annotations: {} - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - # The service port Notary listens on. Only needed when notary.enabled - # is set to true - notaryPort: 4443 - nodePort: - # The name of NodePort service - name: harbor - ports: - http: - # The service port Harbor listens on when serving HTTP - port: 80 - # The node port Harbor listens on when serving HTTP - nodePort: 30002 - https: - # The service port Harbor listens on when serving HTTPS - port: 443 - # The node port Harbor listens on when serving HTTPS - nodePort: 30003 - # Only needed when notary.enabled is set to true - notary: - # The service port Notary listens on - port: 4443 - # The node port Notary listens on - nodePort: 30004 - loadBalancer: - # The name of LoadBalancer service - name: harbor - # Set the IP if the LoadBalancer supports assigning IP - IP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - # The service port Notary listens on. Only needed when notary.enabled - # is set to true - notaryPort: 4443 - annotations: {} - sourceRanges: [] - -# The external URL for Harbor core service. It is used to -# 1) populate the docker/helm commands showed on portal -# 2) populate the token service URL returned to docker/notary client -# -# Format: protocol://domain[:port]. Usually: -# 1) if "expose.type" is "ingress", the "domain" should be -# the value of "expose.ingress.hosts.core" -# 2) if "expose.type" is "clusterIP", the "domain" should be -# the value of "expose.clusterIP.name" -# 3) if "expose.type" is "nodePort", the "domain" should be -# the IP address of k8s node -# -# If Harbor is deployed behind the proxy, set it as the URL of proxy -externalURL: https://core.harbor.domain - -# The internal TLS used for harbor components secure communicating. In order to enable https -# in each components tls cert files need to provided in advance. -internalTLS: - # If internal TLS enabled - enabled: false - # There are three ways to provide tls - # 1) "auto" will generate cert automatically - # 2) "manual" need provide cert file manually in following value - # 3) "secret" internal certificates from secret - certSource: "auto" - # The content of trust ca, only available when `certSource` is "manual" - trustCa: "" - # core related cert configuration - core: - # secret name for core's tls certs - secretName: "" - # Content of core's TLS cert file, only available when `certSource` is "manual" - crt: "" - # Content of core's TLS key file, only available when `certSource` is "manual" - key: "" - # jobservice related cert configuration - jobservice: - # secret name for jobservice's tls certs - secretName: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - key: "" - # registry related cert configuration - registry: - # secret name for registry's tls certs - secretName: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - key: "" - # portal related cert configuration - portal: - # secret name for portal's tls certs - secretName: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - key: "" - # trivy related cert configuration - trivy: - # secret name for trivy's tls certs - secretName: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - key: "" - -ipFamily: - # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component - ipv6: - enabled: true - # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component - ipv4: - enabled: true - -# The persistence is enabled by default and a default StorageClass -# is needed in the k8s cluster to provision volumes dynamically. -# Specify another StorageClass in the "storageClass" or set "existingClaim" -# if you already have existing persistent volumes to use -# -# For storing images and charts, you can also use "azure", "gcs", "s3", -# "swift" or "oss". Set it in the "imageChartStorage" section -persistence: - enabled: true - # Setting it to "keep" to avoid removing PVCs during a helm delete - # operation. Leaving it empty will delete PVCs after the chart deleted - # (this does not apply for PVCs that are created for internal database - # and redis components, i.e. they are never deleted automatically) - resourcePolicy: "keep" - persistentVolumeClaim: - registry: - # Use the existing PVC which must be created manually before bound, - # and specify the "subPath" if the PVC is shared with other components - existingClaim: "" - # Specify the "storageClass" used to provision the volume. Or the default - # StorageClass will be used (the default). - # Set it to "-" to disable dynamic provisioning - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - jobservice: - jobLog: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external database is used, the following settings for database will - # be ignored - database: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external Redis is used, the following settings for Redis will - # be ignored - redis: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - trivy: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - # Define which storage backend is used for registry to store - # images and charts. Refer to - # https://github.com/docker/distribution/blob/master/docs/configuration.md#storage - # for the detail. - imageChartStorage: - # Specify whether to disable `redirect` for images and chart storage, for - # backends which not supported it (such as using minio for `s3` storage type), please disable - # it. To disable redirects, simply set `disableredirect` to `true` instead. - # Refer to - # https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect - # for the detail. - disableredirect: false - # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate. - # The secret must contain keys named "ca.crt" which will be injected into the trust store - # of registry's containers. - # caBundleSecretName: - - # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift", - # "oss" and fill the information needed in the corresponding section. The type - # must be "filesystem" if you want to use persistent volumes for registry - type: filesystem - filesystem: - rootdirectory: /storage - #maxthreads: 100 - azure: - accountname: accountname - accountkey: base64encodedaccountkey - container: containername - #realm: core.windows.net - # To use existing secret, the key must be AZURE_STORAGE_ACCESS_KEY - existingSecret: "" - gcs: - bucket: bucketname - # The base64 encoded json file which contains the key - encodedkey: base64-encoded-json-key-file - #rootdirectory: /gcs/object/name/prefix - #chunksize: "5242880" - # To use existing secret, the key must be gcs-key.json - existingSecret: "" - useWorkloadIdentity: false - s3: - # Set an existing secret for S3 accesskey and secretkey - # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry - #existingSecret: "" - region: us-west-1 - bucket: bucketname - #accesskey: awsaccesskey - #secretkey: awssecretkey - #regionendpoint: http://myobjects.local - #encrypt: false - #keyid: mykeyid - #secure: true - #skipverify: false - #v4auth: true - #chunksize: "5242880" - #rootdirectory: /s3/object/name/prefix - #storageclass: STANDARD - #multipartcopychunksize: "33554432" - #multipartcopymaxconcurrency: 100 - #multipartcopythresholdsize: "33554432" - swift: - authurl: https://storage.myprovider.com/v3/auth - username: username - password: password - container: containername - #region: fr - #tenant: tenantname - #tenantid: tenantid - #domain: domainname - #domainid: domainid - #trustid: trustid - #insecureskipverify: false - #chunksize: 5M - #prefix: - #secretkey: secretkey - #accesskey: accesskey - #authversion: 3 - #endpointtype: public - #tempurlcontainerkey: false - #tempurlmethods: - oss: - accesskeyid: accesskeyid - accesskeysecret: accesskeysecret - region: regionname - bucket: bucketname - #endpoint: endpoint - #internal: false - #encrypt: false - #secure: true - #chunksize: 10M - #rootdirectory: rootdirectory - -imagePullPolicy: IfNotPresent - -# Use this set to assign a list of default pullSecrets -imagePullSecrets: -# - name: docker-registry-secret -# - name: internal-registry-secret - -# The update strategy for deployments with persistent volumes(jobservice, registry): "RollingUpdate" or "Recreate" -# Set it as "Recreate" when "RWM" for volumes isn't supported -updateStrategy: - type: RollingUpdate - -# debug, info, warning, error or fatal -logLevel: info - -# The initial password of Harbor admin. Change it from portal after launching Harbor -# or give an existing secret for it -# key in secret is given via (default to HARBOR_ADMIN_PASSWORD) -# existingSecretAdminPassword: -existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD -harborAdminPassword: "Harbor12345" - -# The name of the secret which contains key named "ca.crt". Setting this enables the -# download link on portal to download the CA certificate when the certificate isn't -# generated automatically -caSecretName: "" - -# The secret key used for encryption. Must be a string of 16 chars. -secretKey: "not-a-secure-key" -# If using existingSecretSecretKey, the key must be secretKey -existingSecretSecretKey: "" - -# The proxy settings for updating trivy vulnerabilities from the Internet and replicating -# artifacts from/to the registries that cannot be reached directly -proxy: - httpProxy: - httpsProxy: - noProxy: 127.0.0.1,localhost,.local,.internal - components: - - core - - jobservice - - trivy - -# Run the migration job via helm hook -enableMigrateHelmHook: false - -# The custom ca bundle secret, the secret must contain key named "ca.crt" -# which will be injected into the trust store for core, jobservice, registry, trivy components -# caBundleSecretName: "" - -## UAA Authentication Options -# If you're using UAA for authentication behind a self-signed -# certificate you will need to provide the CA Cert. -# Set uaaSecretName below to provide a pre-created secret that -# contains a base64 encoded CA Certificate named `ca.crt`. -# uaaSecretName: - -# If service exposed via "ingress", the Nginx will not be used -nginx: - image: - repository: goharbor/nginx-photon - tag: v2.8.4 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - -portal: - image: - repository: goharbor/harbor-portal - tag: v2.8.4 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - -core: - image: - repository: goharbor/harbor-core - tag: v2.8.4 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - ## Startup probe values - startupProbe: - enabled: true - initialDelaySeconds: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## Additional service annotations - serviceAnnotations: {} - # Secret is used when core server communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Fill the name of a kubernetes secret if you want to use your own - # TLS certificate and private key for token encryption/decryption. - # The secret must contain keys named: - # "tls.key" - the private key - # "tls.crt" - the certificate - secretName: "" - # If not specifying a preexisting secret, a secret can be created from tokenKey and tokenCert and used instead. - # If none of secretName, tokenKey, and tokenCert are specified, an ephemeral key and certificate will be autogenerated. - # tokenKey and tokenCert must BOTH be set or BOTH unset. - # The tokenKey value is formatted as a multiline string containing a PEM-encoded RSA key, indented one more than tokenKey on the following line. - tokenKey: | - # If tokenKey is set, the value of tokenCert must be set as a PEM-encoded certificate signed by tokenKey, and supplied as a multiline string, indented one more than tokenCert on the following line. - tokenCert: | - # The XSRF key. Will be generated automatically if it isn't specified - xsrfKey: "" - ## The priority class to run the pod as - priorityClassName: - # The time duration for async update artifact pull_time and repository - # pull_count, the unit is second. Will be 10 seconds if it isn't set. - # eg. artifactPullAsyncFlushDuration: 10 - artifactPullAsyncFlushDuration: - gdpr: - deleteUser: false - -jobservice: - image: - repository: goharbor/harbor-jobservice - tag: v2.8.4 - replicas: 1 - revisionHistoryLimit: 10 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - maxJobWorkers: 10 - # The logger for jobs: "file", "database" or "stdout" - jobLoggers: - - file - # - database - # - stdout - # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days - notification: - webhook_job_max_retry: 3 - webhook_job_http_client_timeout: 3 # in seconds - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: 24 - # the max time for execution in running state without new task created - max_dangling_hours: 168 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - # Secret is used when job service communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - ## The priority class to run the pod as - priorityClassName: - -registry: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - registry: - image: - repository: goharbor/registry-photon - tag: v2.8.4 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - controller: - image: - repository: goharbor/harbor-registryctl - tag: v2.8.4 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - replicas: 1 - revisionHistoryLimit: 10 - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - # Secret is used to secure the upload state from client - # and registry storage backend. - # See: https://github.com/docker/distribution/blob/master/docs/configuration.md#http - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. - relativeurls: false - credentials: - username: "harbor_registry_user" - password: "harbor_registry_password" - # If using existingSecret, the key must be REGISTRY_PASSWD and REGISTRY_HTPASSWD - existingSecret: "" - # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. - # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string - middleware: - enabled: false - type: cloudFront - cloudFront: - baseurl: example.cloudfront.net - keypairid: KEYPAIRID - duration: 3000s - ipfilteredby: none - # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key - # that allows access to CloudFront - privateKeySecret: "my-secret" - # enable purge _upload directories - upload_purging: - enabled: true - # remove files in _upload directories which exist for a period of time, default is one week. - age: 168h - # the interval of the purge operations - interval: 24h - dryrun: false - -trivy: - # enabled the flag to enable Trivy scanner - enabled: true - image: - # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon - # tag the tag for Trivy adapter image - tag: v2.8.4 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # replicas the number of Pod replicas - replicas: 1 - # debugMode the flag to enable Trivy debug mode with more verbose scanning log - debugMode: false - # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`. - vulnType: "os,library" - # severity a comma-separated list of severities to be checked - severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - # ignoreUnfixed the flag to display only fixed vulnerabilities - ignoreUnfixed: false - # insecure the flag to skip verifying registry certificate - insecure: false - # gitHubToken the GitHub access token to download Trivy DB - # - # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases. - # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached - # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update - # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one. - # Currently, the database is updated every 12 hours and published as a new release to GitHub. - # - # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough - # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000 - # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult - # https://developer.github.com/v3/#rate-limiting - # - # You can create a GitHub token by following the instructions in - # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - gitHubToken: "" - # skipUpdate the flag to disable Trivy DB downloads from GitHub - # - # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues. - # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the - # `/home/scanner/.cache/trivy/db/trivy.db` path. - skipUpdate: false - # The offlineScan option prevents Trivy from sending API requests to identify dependencies. - # - # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it. - # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't - # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode. - # It would work if all the dependencies are in local. - # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment. - offlineScan: false - # Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. Defaults to `vuln`. - securityCheck: "vuln" - # The duration to wait for scan completion - timeout: 5m0s - resources: - requests: - cpu: 200m - memory: 512Mi - limits: - cpu: 1 - memory: 1Gi - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - -notary: - enabled: true - server: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/notary-server-photon - tag: v2.8.4 - replicas: 1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - ## Additional service annotations - serviceAnnotations: {} - signer: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/notary-signer-photon - tag: v2.8.4 - replicas: 1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## Additional deployment annotations - podAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - # Fill the name of a kubernetes secret if you want to use your own - # TLS certificate authority, certificate and private key for notary - # communications. - # The secret must contain keys named ca.crt, tls.crt and tls.key that - # contain the CA, certificate and private key. - # They will be generated if not set. - secretName: "" - -database: - # if external database is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-db - tag: v2.8.4 - # The initial superuser password for internal database - password: "changeit" - # The size limit for Shared memory, pgSQL use it for shared_buffer - # More details see: - # https://github.com/goharbor/harbor/issues/15034 - shmSizeLimit: 512Mi - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - # The timeout used in livenessProbe; 1 to 5 seconds - livenessProbe: - timeoutSeconds: 1 - # The timeout used in readinessProbe; 1 to 5 seconds - readinessProbe: - timeoutSeconds: 1 - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - initContainer: - migrator: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - permissions: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - external: - host: "192.168.0.1" - port: "5432" - username: "user" - password: "password" - coreDatabase: "registry" - notaryServerDatabase: "notary_server" - notarySignerDatabase: "notary_signer" - # if using existing secret, the key must be "password" - existingSecret: "" - # "disable" - No SSL - # "require" - Always SSL (skip verification) - # "verify-ca" - Always SSL (verify that the certificate presented by the - # server was signed by a trusted CA) - # "verify-full" - Always SSL (verify that the certification presented by the - # server was signed by a trusted CA and the server host name matches the one - # in the certificate) - sslmode: "disable" - # The maximum number of connections in the idle connection pool per pod (core+exporter). - # If it <=0, no idle connections are retained. - maxIdleConns: 100 - # The maximum number of open connections to the database per pod (core+exporter). - # If it <= 0, then there is no limit on the number of open connections. - # Note: the default number of connections is 1024 for postgre of harbor. - maxOpenConns: 900 - ## Additional deployment annotations - podAnnotations: {} - -redis: - # if external Redis is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/redis-photon - tag: v2.8.4 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # # jobserviceDatabaseIndex defaults to "1" - # # registryDatabaseIndex defaults to "2" - # # trivyAdapterIndex defaults to "5" - # # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - external: - # support redis, redis+sentinel - # addr for redis: : - # addr for redis+sentinel: :,:,: - addr: "192.168.0.2:6379" - # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel - sentinelMasterSet: "" - # The "coreDatabaseIndex" must be "0" as the library Harbor - # used doesn't support configuring it - # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - coreDatabaseIndex: "0" - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - # username field can be an empty string, and it will be authenticated against the default user - username: "" - password: "" - # If using existingSecret, the key must be REDIS_PASSWORD - existingSecret: "" - ## Additional deployment annotations - podAnnotations: {} - -exporter: - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - podAnnotations: {} - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-exporter - tag: v2.8.4 - nodeSelector: {} - tolerations: [] - affinity: {} - cacheDuration: 23 - cacheCleanInterval: 14400 - ## The priority class to run the pod as - priorityClassName: - -metrics: - enabled: false - core: - path: /metrics - port: 8001 - registry: - path: /metrics - port: 8001 - jobservice: - path: /metrics - port: 8001 - exporter: - path: /metrics - port: 8001 - ## Create prometheus serviceMonitor to scrape harbor metrics. - ## This requires the monitoring.coreos.com/v1 CRD. Please see - ## https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/user-guides/getting-started.md - ## - serviceMonitor: - enabled: false - additionalLabels: {} - # Scrape interval. If not set, the Prometheus default scrape interval is used. - interval: "" - # Metric relabel configs to apply to samples before ingestion. - metricRelabelings: - [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - # Relabel configs to apply to samples before ingestion. - relabelings: - [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] - # separator: ; - # regex: ^(.*)$ - # targetLabel: nodename - # replacement: $1 - # action: replace - -trace: - enabled: false - # trace provider: jaeger or otel - # jaeger should be 1.26+ - provider: jaeger - # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth - sample_rate: 1 - # namespace used to differentiate different harbor services - # namespace: - # attributes is a key value dict contains user defined attributes used to initialize trace provider - # attributes: - # application: harbor - jaeger: - # jaeger supports two modes: - # collector mode(uncomment endpoint and uncomment username, password if needed) - # agent mode(uncomment agent_host and agent_port) - endpoint: http://hostname:14268/api/traces - # username: - # password: - # agent_host: hostname - # export trace data by jaeger.thrift in compact mode - # agent_port: 6831 - otel: - endpoint: hostname:4318 - url_path: /v1/traces - compression: false - insecure: true - # timeout is in seconds - timeout: 10 - -# cache layer configurations -# if this feature enabled, harbor will cache the resource -# `project/project_metadata/repository/artifact/manifest` in the redis -# which help to improve the performance of high concurrent pulling manifest. -cache: - # default is not enabled. - enabled: false - # default keep cache for one day. - expireHours: 24 diff --git a/charts/harbor/harbor/1.13.0/.helmignore b/charts/harbor/harbor/1.13.0/.helmignore deleted file mode 100644 index b4424fd59b..0000000000 --- a/charts/harbor/harbor/1.13.0/.helmignore +++ /dev/null @@ -1,6 +0,0 @@ -.github/* -docs/* -.git/* -.gitignore -CONTRIBUTING.md -test/* \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/Chart.yaml b/charts/harbor/harbor/1.13.0/Chart.yaml deleted file mode 100644 index 6b093bb1a8..0000000000 --- a/charts/harbor/harbor/1.13.0/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor -apiVersion: v1 -appVersion: 2.9.0 -description: An open source trusted cloud native registry that stores, signs, and - scans content -home: https://goharbor.io -icon: https://raw.githubusercontent.com/goharbor/website/main/static/img/logos/harbor-icon-color.png -keywords: -- docker -- registry -- harbor -maintainers: -- email: yinw@vmware.com - name: Wenkai Yin -- email: hweiwei@vmware.com - name: Weiwei He -- email: yshengwen@vmware.com - name: Shengwen Yu -name: harbor -sources: -- https://github.com/goharbor/harbor -- https://github.com/goharbor/harbor-helm -version: 1.13.0 diff --git a/charts/harbor/harbor/1.13.0/LICENSE b/charts/harbor/harbor/1.13.0/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/charts/harbor/harbor/1.13.0/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/charts/harbor/harbor/1.13.0/README.md b/charts/harbor/harbor/1.13.0/README.md deleted file mode 100644 index f30598cc00..0000000000 --- a/charts/harbor/harbor/1.13.0/README.md +++ /dev/null @@ -1,407 +0,0 @@ -# Helm Chart for Harbor - -**Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be found [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. - -This repository, including the issues, focuses on deploying Harbor chart via helm. For functionality issues or Harbor questions, please open issues on [goharbor/harbor](https://github.com/goharbor/harbor) - -## Introduction - -This [Helm](https://github.com/kubernetes/helm) chart installs [Harbor](https://github.com/goharbor/harbor) in a Kubernetes cluster. Welcome to [contribute](CONTRIBUTING.md) to Helm Chart for Harbor. - -## Prerequisites - -- Kubernetes cluster 1.20+ -- Helm v3.2.0+ - -## Installation - -### Add Helm repository - -```bash -helm repo add harbor https://helm.goharbor.io -``` - -### Configure the chart - -The following items can be set via `--set` flag during installation or configured by editing the `values.yaml` directly (need to download the chart first). - -#### Configure how to expose Harbor service - -- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. - **Notes:** if TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to issue [#5291](https://github.com/goharbor/harbor/issues/5291) for details. -- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. -- **NodePort**: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. -- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. - -#### Configure the external URL - -The external URL for Harbor core service is used to: - -1. populate the docker/helm commands showed on portal -2. populate the token service URL returned to docker client - -Format: `protocol://domain[:port]`. Usually: - -- if service exposed via `Ingress`, the `domain` should be the value of `expose.ingress.hosts.core` -- if service exposed via `ClusterIP`, the `domain` should be the value of `expose.clusterIP.name` -- if service exposed via `NodePort`, the `domain` should be the IP address of one Kubernetes node -- if service exposed via `LoadBalancer`, set the `domain` as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider - -If Harbor is deployed behind the proxy, set it as the URL of proxy. - -#### Configure how to persist data - -- **Disable**: The data does not survive the termination of a pod. -- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you already have existing persistent volumes to use. -- **External Storage(only for images and charts)**: For images and charts, the external storages are supported: `azure`, `gcs`, `s3` `swift` and `oss`. - -#### Configure the other items listed in [configuration](#configuration) section - -### Install the chart - -Install the Harbor helm chart with a release name `my-release`: -```bash -helm install my-release harbor/harbor -``` - -## Uninstallation - -To uninstall/delete the `my-release` deployment: -```bash -helm uninstall my-release -``` - -## Configuration - -The following table lists the configurable parameters of the Harbor chart and the default values. - -| Parameter | Description | Default | -| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| **Expose** | | | -| `expose.type` | How to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` | -| `expose.tls.enabled` | Enable TLS or not. Delete the `ssl-redirect` annotations in `expose.ingress.annotations` when TLS is disabled and `expose.type` is `ingress`. Note: if the `expose.type` is `ingress` and TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to https://github.com/goharbor/harbor/issues/5291 for details. | `true` | -| `expose.tls.certSource` | The source of the TLS certificate. Set as `auto`, `secret` or `none` and fill the information in the corresponding section: 1) auto: generate the TLS certificate automatically 2) secret: read the TLS certificate from the specified secret. The TLS certificate can be generated manually or by cert manager 3) none: configure no TLS certificate for the ingress. If the default TLS certificate is configured in the ingress controller, choose this option | `auto` | -| `expose.tls.auto.commonName` | The common name used to generate the certificate, it's necessary when the type isn't `ingress` | | -| `expose.tls.secret.secretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key | | -| `expose.ingress.hosts.core` | The host of Harbor core service in ingress rule | `core.harbor.domain` | -| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce`, `alb`, `f5-bigip` and `ncp` | `default` | -| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | | -| `expose.ingress.annotations` | The annotations used commonly for ingresses | | -| `expose.ingress.harbor.annotations` | The annotations specific to harbor ingress | {} | -| `expose.ingress.harbor.labels` | The labels specific to harbor ingress | {} | -| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` | -| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} | -| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.clusterIP.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.name` | The name of NodePort service | `harbor` | -| `expose.nodePort.ports.http.port` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.nodePort.ports.http.nodePort` | The node port Harbor listens on when serving HTTP | `30002` | -| `expose.nodePort.ports.https.port` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.ports.https.nodePort` | The node port Harbor listens on when serving HTTPS | `30003` | -| `expose.loadBalancer.name` | The name of service | `harbor` | -| `expose.loadBalancer.IP` | The IP of the loadBalancer. It only works when loadBalancer supports assigning IP | `""` | -| `expose.loadBalancer.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.loadBalancer.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `30002` | -| `expose.loadBalancer.annotations` | The annotations attached to the loadBalancer service | {} | -| `expose.loadBalancer.sourceRanges` | List of IP address ranges to assign to loadBalancerSourceRanges | [] | -| **Internal TLS** | | | -| `internalTLS.enabled` | Enable TLS for the components (core, jobservice, portal, registry, trivy) | `false` | -| `internalTLS.strong_ssl_ciphers` | Enable strong ssl ciphers for nginx and portal | `false` -| `internalTLS.certSource` | Method to provide TLS for the components, options are `auto`, `manual`, `secret`. | `auto` | -| `internalTLS.trustCa` | The content of trust CA, only available when `certSource` is `manual`. **Note**: all the internal certificates of the components must be issued by this CA | | -| `internalTLS.core.secretName` | The secret name for core component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.core.crt` | Content of core's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.core.key` | Content of core's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.secretName` | The secret name for jobservice component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.jobservice.crt` | Content of jobservice's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.key` | Content of jobservice's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.registry.secretName` | The secret name for registry component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.registry.crt` | Content of registry's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.registry.key` | Content of registry's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.portal.secretName` | The secret name for portal component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.portal.crt` | Content of portal's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.portal.key` | Content of portal's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.secretName` | The secret name for trivy component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.trivy.crt` | Content of trivy's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.key` | Content of trivy's TLS key file, only available when `certSource` is `manual` | | -| **IPFamily** | | | -| `ipFamily.ipv4.enabled` | if cluster is ipv4 enabled, all ipv4 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| `ipFamily.ipv6.enabled` | if cluster is ipv6 enabled, all ipv6 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| **Persistence** | | | -| `persistence.enabled` | Enable the data persistence or not | `true` | -| `persistence.resourcePolicy` | Setting it to `keep` to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted. Does not affect PVCs created for internal database and redis components. | `keep` | -| `persistence.persistentVolumeClaim.registry.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.registry.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.registry.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.registry.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.registry.size` | The size of the volume | `5Gi` | -| `persistence.persistentVolumeClaim.registry.annotations` | The annotations of the volume | | -|`persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.database.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.subPath` | The sub path used in the volume. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.accessMode` | The access mode of the volume. If external database is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.database.size` | The size of the volume. If external database is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.database.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.redis.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.subPath` | The sub path used in the volume. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.accessMode` | The access mode of the volume. If external Redis is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.redis.size` | The size of the volume. If external Redis is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.redis.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.trivy.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.trivy.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.trivy.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.trivy.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.trivy.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.trivy.annotations` | The annotations of the volume | | -| `persistence.imageChartStorage.disableredirect` | The configuration for managing redirects from content backends. For backends which not supported it (such as using minio for `s3` storage type), please set it to `true` to disable redirects. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect) for more details | `false` | -| `persistence.imageChartStorage.caBundleSecretName` | Specify the `caBundleSecretName` if the storage service uses a self-signed certificate. The secret must contain keys named `ca.crt` which will be injected into the trust store of registry's and containers. | | -| `persistence.imageChartStorage.type` | The type of storage for images and charts: `filesystem`, `azure`, `gcs`, `s3`, `swift` or `oss`. The type must be `filesystem` if you want to use persistent volumes for registry. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#storage) for more details | `filesystem` | -| `persistence.imageChartStorage.gcs.existingSecret` | An existing secret containing the gcs service account json key. The key must be gcs-key.json. | `""` | -| `persistence.imageChartStorage.gcs.useWorkloadIdentity` | A boolean to allow the use of workloadidentity in a GKE cluster. To use it, create a kubernetes service account and set the name in the key `serviceAccountName` of each component, then allow automounting the service account. | `false` | -| **General** | | | -| `externalURL` | The external URL for Harbor core service | `https://core.harbor.domain` | -| `caBundleSecretName` | The custom CA bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for core, jobservice, registry, trivy components. | | -| `uaaSecretName` | If using external UAA auth which has a self signed cert, you can provide a pre-created secret containing it under the key `ca.crt`. | | -| `imagePullPolicy` | The image pull policy | | -| `imagePullSecrets` | The imagePullSecrets names for all deployments | | -| `updateStrategy.type` | The update strategy for deployments with persistent volumes(jobservice, registry): `RollingUpdate` or `Recreate`. Set it as `Recreate` when `RWM` for volumes isn't supported | `RollingUpdate` | -| `logLevel` | The log level: `debug`, `info`, `warning`, `error` or `fatal` | `info` | -| `harborAdminPassword` | The initial password of Harbor admin. Change it from portal after launching Harbor | `Harbor12345` | -| `existingSecretAdminPassword` | The name of secret where admin password can be found. | | -| `existingSecretAdminPasswordKey` | The name of the key in the secret where to find harbor admin password Harbor | `HARBOR_ADMIN_PASSWORD` | -| `caSecretName` | The name of the secret which contains key named `ca.crt`. Setting this enables the download link on portal to download the CA certificate when the certificate isn't generated automatically | | -| `secretKey` | The key used for encryption. Must be a string of 16 chars | `not-a-secure-key` | -| `existingSecretSecretKey` | An existing secret containing the encoding secretKey | `""` | -| `proxy.httpProxy` | The URL of the HTTP proxy server | | -| `proxy.httpsProxy` | The URL of the HTTPS proxy server | | -| `proxy.noProxy` | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal | -| `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | -| `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | -| **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | -| `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | -| `nginx.image.tag` | Image tag | `dev` | -| `nginx.replicas` | The replica count | `1` | -| `nginx.revisionHistoryLimit` | The revision history limit | `10` | -| `nginx.resources` | The [resources] to allocate for container | undefined | -| `nginx.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `nginx.nodeSelector` | Node labels for pod assignment | `{}` | -| `nginx.tolerations` | Tolerations for pod assignment | `[]` | -| `nginx.affinity` | Node/Pod affinities | `{}` | -| `nginx.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | -| `nginx.priorityClassName` | The priority class to run the pod as | | -| **Portal** | | | -| `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | -| `portal.image.tag` | Tag for portal image | `dev` | -| `portal.replicas` | The replica count | `1` | -| `portal.revisionHistoryLimit` | The revision history limit | `10` | -| `portal.resources` | The [resources] to allocate for container | undefined | -| `portal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `portal.nodeSelector` | Node labels for pod assignment | `{}` | -| `portal.tolerations` | Tolerations for pod assignment | `[]` | -| `portal.affinity` | Node/Pod affinities | `{}` | -| `portal.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` | -| `portal.priorityClassName` | The priority class to run the pod as | | -| **Core** | | | -| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | -| `core.image.tag` | Tag for Harbor core image | `dev` | -| `core.replicas` | The replica count | `1` | -| `core.revisionHistoryLimit` | The revision history limit | `10` | -| `core.startupProbe.initialDelaySeconds` | The initial delay in seconds for the startup probe | `10` | -| `core.resources` | The [resources] to allocate for container | undefined | -| `core.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `core.nodeSelector` | Node labels for pod assignment | `{}` | -| `core.tolerations` | Tolerations for pod assignment | `[]` | -| `core.affinity` | Node/Pod affinities | `{}` | -| `core.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `core.podAnnotations` | Annotations to add to the core pod | `{}` | -| `core.serviceAnnotations` | Annotations to add to the core service | `{}` | -| `core.configureUserSettings` | A JSON string to set in the environment variable `CONFIG_OVERWRITE_JSON` to configure user settings. See the [official docs](https://goharbor.io/docs/latest/install-config/configure-user-settings-cli/#configure-users-settings-using-an-environment-variable). | | -| `core.quotaUpdateProvider` | The provider for updating project quota(usage), there are 2 options, redis or db. By default it is implemented by db but you can configure it to redis which can improve the performance of high concurrent pushing to the same project, and reduce the database connections spike and occupies. Using redis will bring up some delay for quota usage updation for display, so only suggest switch provider to redis if you were ran into the db connections spike around the scenario of high concurrent pushing to same project, no improvment for other scenes. | `db` | -| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `core.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate and private key for token encryption/decryption. The secret must contain keys named: `tls.crt` - the certificate and `tls.key` - the private key. The default key pair will be used if it isn't set | | -| `core.tokenKey` | PEM-formatted RSA private key used to sign service tokens. Only used if `core.secretName` is unset. If set, `core.tokenCert` MUST also be set. | | -| `core.tokenCert` | PEM-formatted certificate signed by `core.tokenKey` used to validate service tokens. Only used if `core.secretName` is unset. If set, `core.tokenKey` MUST also be set. | | -| `core.xsrfKey` | The XSRF key. Will be generated automatically if it isn't specified | | -| `core.priorityClassName` | The priority class to run the pod as | | -| `core.artifactPullAsyncFlushDuration` | The time duration for async update artifact pull_time and repository pull_count | | -| `core.gdpr.deleteUser` | Enable GDPR compliant user delete | `false` | -| **Jobservice** | | | -| `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | -| `jobservice.image.tag` | Tag for jobservice image | `dev` | -| `jobservice.replicas` | The replica count | `1` | -| `jobservice.revisionHistoryLimit` | The revision history limit | `10` | -| `jobservice.maxJobWorkers` | The max job workers | `10` | -| `jobservice.jobLoggers` | The loggers for jobs: `file`, `database` or `stdout` | `[file]` | -| `jobservice.loggerSweeperDuration` | The jobLogger sweeper duration in days (ignored if `jobLoggers` is set to `stdout`) | `14` | -| `jobservice.notification.webhook_job_max_retry` | The maximum retry of webhook sending notifications | `3` | -| `jobservice.notification.webhook_job_http_client_timeout` | The http client timeout value of webhook sending notifications | `3` | -| `jobservice.reaper.max_update_hours` | the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 | `24` | -| `jobservice.reaper.max_dangling_hours` | the max time for execution in running state without new task created | `168` | -| `jobservice.resources` | The [resources] to allocate for container | undefined | -| `jobservice.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `jobservice.nodeSelector` | Node labels for pod assignment | `{}` | -| `jobservice.tolerations` | Tolerations for pod assignment | `[]` | -| `jobservice.affinity` | Node/Pod affinities | `{}` | -| `jobservice.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` | -| `jobservice.priorityClassName` | The priority class to run the pod as | | -| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| **Registry** | | | -| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | -| `registry.registry.image.tag` | Tag for registry image | `dev` | -| `registry.registry.resources` | The [resources] to allocate for container | undefined | -| `registry.controller.image.repository` | Repository for registry controller image | `goharbor/harbor-registryctl` | -| `registry.controller.image.tag` | Tag for registry controller image | `dev` | -| `registry.controller.resources` | The [resources] to allocate for container | undefined | -| `registry.replicas` | The replica count | `1` | -| `registry.revisionHistoryLimit` | The revision history limit | `10` | -| `registry.nodeSelector` | Node labels for pod assignment | `{}` | -| `registry.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `registry.tolerations` | Tolerations for pod assignment | `[]` | -| `registry.affinity` | Node/Pod affinities | `{}` | -| `registry.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | | -| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` | -| `registry.priorityClassName` | The priority class to run the pod as | | -| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `registry.credentials.username` | The username that harbor core uses internally to access the registry instance. Together with the `registry.credentials.password`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` | -| `registry.credentials.password` | The password that harbor core uses internally to access the registry instance. Together with the `registry.credentials.username`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). It is suggested you update this value before installation. | `harbor_registry_password` | -| `registry.credentials.existingSecret` | An existing secret containing the password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). The key must be `REGISTRY_PASSWD` | `""` | -| `registry.credentials.htpasswdString` | Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. | undefined | -| `registry.relativeurls` | If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. Needed if harbor is behind a reverse proxy | `false` | -| `registry.upload_purging.enabled` | If true, enable purge _upload directories | `true` | -| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` | -| `registry.upload_purging.interval` | The interval of the purge operations | `24h` | -| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` | -| **[Trivy][trivy]** | | | -| `trivy.enabled` | The flag to enable Trivy scanner | `true` | -| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` | -| `trivy.image.tag` | Tag for Trivy adapter image | `dev` | -| `trivy.resources` | The [resources] to allocate for Trivy adapter container | | -| `trivy.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `trivy.replicas` | The number of Pod replicas | `1` | -| `trivy.debugMode` | The flag to enable Trivy debug mode | `false` | -| `trivy.vulnType` | Comma-separated list of vulnerability types. Possible values `os` and `library`. | `os,library` | -| `trivy.severity` | Comma-separated list of severities to be checked | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | -| `trivy.ignoreUnfixed` | The flag to display only fixed vulnerabilities | `false` | -| `trivy.insecure` | The flag to skip verifying registry certificate | `false` | -| `trivy.skipUpdate` | The flag to disable [Trivy DB][trivy-db] downloads from GitHub | `false` | -| `trivy.offlineScan` | The flag prevents Trivy from sending API requests to identify dependencies. | `false` | -| `trivy.securityCheck` | Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. | `vuln` | -| `trivy.timeout` | The duration to wait for scan completion | `5m0s` | -| `trivy.gitHubToken` | The GitHub access token to download [Trivy DB][trivy-db] (see [GitHub rate limiting][trivy-rate-limiting]) | | -| `trivy.priorityClassName` | The priority class to run the pod as | | -| `trivy.topologySpreadConstraints` | The priority class to run the pod as | | -| **Database** | | | -| `database.type` | If external database is used, set it to `external` | `internal` | -| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` | -| `database.internal.image.tag` | Tag for database image | `dev` | -| `database.internal.password` | The password for database | `changeit` | -| `database.internal.shmSizeLimit` | The limit for the size of shared memory for internal PostgreSQL, conventionally it's around 50% of the memory limit of the container | `512Mi` | -| `database.internal.resources` | The [resources] to allocate for container | undefined | -| `database.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `database.internal.initContainer.migrator.resources` | The [resources] to allocate for the database migrator initContainer | undefined | -| `database.internal.initContainer.permissions.resources` | The [resources] to allocate for the database permissions initContainer | undefined | -| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `database.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `database.internal.affinity` | Node/Pod affinities | `{}` | -| `database.internal.priorityClassName` | The priority class to run the pod as | | -| `database.internal.livenessProbe.timeoutSeconds` | The timeout used in liveness probe; 1 to 5 seconds | 1 | -| `database.internal.readinessProbe.timeoutSeconds` | The timeout used in readiness probe; 1 to 5 seconds | 1 | -| `database.external.host` | The hostname of external database | `192.168.0.1` | -| `database.external.port` | The port of external database | `5432` | -| `database.external.username` | The username of external database | `user` | -| `database.external.password` | The password of external database | `password` | -| `database.external.coreDatabase` | The database used by core service | `registry` | -| `database.external.existingSecret` | An existing password containing the database password. the key must be `password`. | `""` | -| `database.external.sslmode` | Connection method of external database (require, verify-full, verify-ca, disable) | `disable` | -| `database.maxIdleConns` | The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained. | `50` | -| `database.maxOpenConns` | The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections. | `100` | -| `database.podAnnotations` | Annotations to add to the database pod | `{}` | -| **Redis** | | | -| `redis.type` | If external redis is used, set it to `external` | `internal` | -| `redis.internal.image.repository` | Repository for redis image | `goharbor/redis-photon` | -| `redis.internal.image.tag` | Tag for redis image | `dev` | -| `redis.internal.resources` | The [resources] to allocate for container | undefined | -| `redis.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `redis.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `redis.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `redis.internal.affinity` | Node/Pod affinities | `{}` | -| `redis.internal.priorityClassName` | The priority class to run the pod as | | -| `redis.internal.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.internal.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.internal.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.internal.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.internal.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.addr` | The addr of external Redis: :. When using sentinel, it should be :,:,: | `192.168.0.2:6379` | -| `redis.external.sentinelMasterSet` | The name of the set of Redis instances to monitor | | -| `redis.external.coreDatabaseIndex` | The database index for core | `0` | -| `redis.external.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.external.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.external.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.external.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.external.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.username` | The username of external Redis | | -| `redis.external.password` | The password of external Redis | | -| `redis.external.existingSecret` | Use an existing secret to connect to redis. The key must be `REDIS_PASSWORD`. | `""` | -| `redis.podAnnotations` | Annotations to add to the redis pod | `{}` | -| **Exporter** | | | -| `exporter.replicas` | The replica count | `1` | -| `exporter.revisionHistoryLimit` | The revision history limit | `10` | -| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` | -| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` | -| `exporter.image.tag` | Tag for exporter image | `dev` | -| `exporter.nodeSelector` | Node labels for pod assignment | `{}` | -| `exporter.tolerations` | Tolerations for pod assignment | `[]` | -| `exporter.affinity` | Node/Pod affinities | `{}` | -| `exporter.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `exporter.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `exporter.cacheDuration` | the cache duration for information that exporter collected from Harbor | `30` | -| `exporter.cacheCleanInterval` | cache clean interval for information that exporter collected from Harbor | `14400` | -| `exporter.priorityClassName` | The priority class to run the pod as | | -| **Metrics** | | | -| `metrics.enabled` | if enable harbor metrics | `false` | -| `metrics.core.path` | the url path for core metrics | `/metrics` | -| `metrics.core.port` | the port for core metrics | `8001` | -| `metrics.registry.path` | the url path for registry metrics | `/metrics` | -| `metrics.registry.port` | the port for registry metrics | `8001` | -| `metrics.exporter.path` | the url path for exporter metrics | `/metrics` | -| `metrics.exporter.port` | the port for exporter metrics | `8001` | -| `metrics.serviceMonitor.enabled` | create prometheus serviceMonitor. Requires prometheus CRD's | `false` | -| `metrics.serviceMonitor.additionalLabels` | additional labels to upsert to the manifest | `""` | -| `metrics.serviceMonitor.interval` | scrape period for harbor metrics | `""` | -| `metrics.serviceMonitor.metricRelabelings` | metrics relabel to add/mod/del before ingestion | `[]` | -| `metrics.serviceMonitor.relabelings` | relabels to add/mod/del to sample before scrape | `[]` | -| **Trace** | | | -| `trace.enabled` | Enable tracing or not | `false` | -| `trace.provider` | The tracing provider: `jaeger` or `otel`. `jaeger` should be 1.26+ | `jaeger` | -| `trace.sample_rate` | Set `sample_rate` to 1 if you want sampling 100% of trace data; set 0.5 if you want sampling 50% of trace data, and so forth | `1` | -| `trace.namespace` | Namespace used to differentiate different harbor services | | -| `trace.attributes` | `attributes` is a key value dict contains user defined attributes used to initialize trace provider | | -| `trace.jaeger.endpoint` | The endpoint of jaeger | `http://hostname:14268/api/traces` | -| `trace.jaeger.username` | The username of jaeger | | -| `trace.jaeger.password` | The password of jaeger | | -| `trace.jaeger.agent_host` | The agent host of jaeger | | -| `trace.jaeger.agent_port` | The agent port of jaeger | `6831` | -| `trace.otel.endpoint` | The endpoint of otel | `hostname:4318` | -| `trace.otel.url_path` | The URL path of otel | `/v1/traces` | -| `trace.otel.compression` | Whether enable compression or not for otel | `false` | -| `trace.otel.insecure` | Whether establish insecure connection or not for otel | `true` | -| `trace.otel.timeout` | The timeout in seconds of otel | `10` | -| **Cache** | | | -| `cache.enabled` | Enable cache layer or not | `false` | -| `cache.expireHours` | The expire hours of cache layer | `24` | - -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[trivy]: https://github.com/aquasecurity/trivy -[trivy-db]: https://github.com/aquasecurity/trivy-db -[trivy-rate-limiting]: https://github.com/aquasecurity/trivy#github-rate-limiting diff --git a/charts/harbor/harbor/1.13.0/templates/NOTES.txt b/charts/harbor/harbor/1.13.0/templates/NOTES.txt deleted file mode 100644 index 0980c08a35..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }} -For more details, please visit https://github.com/goharbor/harbor diff --git a/charts/harbor/harbor/1.13.0/templates/_helpers.tpl b/charts/harbor/harbor/1.13.0/templates/_helpers.tpl deleted file mode 100644 index 95a28a6c5e..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/_helpers.tpl +++ /dev/null @@ -1,540 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "harbor.name" -}} -{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "harbor.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "harbor" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Helm required labels */}} -{{- define "harbor.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* matchLabels */}} -{{- define "harbor.matchLabels" -}} -release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{- define "harbor.autoGenCert" -}} - {{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForIngress" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (eq .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForNginx" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (ne .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.host" -}} - {{- if eq .Values.database.type "internal" -}} - {{- template "harbor.database" . }} - {{- else -}} - {{- .Values.database.external.host -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.port" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "5432" -}} - {{- else -}} - {{- .Values.database.external.port -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.username" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "postgres" -}} - {{- else -}} - {{- .Values.database.external.username -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.rawPassword" -}} - {{- if eq .Values.database.type "internal" -}} - {{- .Values.database.internal.password -}} - {{- else -}} - {{- .Values.database.external.password -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.escapedRawPassword" -}} - {{- include "harbor.database.rawPassword" . | urlquery | replace "+" "%20" -}} -{{- end -}} - -{{- define "harbor.database.encryptedPassword" -}} - {{- include "harbor.database.rawPassword" . | b64enc | quote -}} -{{- end -}} - -{{- define "harbor.database.coreDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "registry" -}} - {{- else -}} - {{- .Values.database.external.coreDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.sslmode" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "disable" -}} - {{- else -}} - {{- .Values.database.external.sslmode -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.redis.scheme" -}} - {{- with .Values.redis }} - {{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }} - {{- end }} -{{- end -}} - -/*host:port*/ -{{- define "harbor.redis.addr" -}} - {{- with .Values.redis }} - {{- ternary (printf "%s:6379" (include "harbor.redis" $ )) .external.addr (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.masterSet" -}} - {{- with .Values.redis }} - {{- ternary .external.sentinelMasterSet "" (eq "redis+sentinel" (include "harbor.redis.scheme" $)) }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.password" -}} - {{- with .Values.redis }} - {{- ternary "" .external.password (eq .type "internal") }} - {{- end }} -{{- end -}} - -/*scheme://[:password@]host:port[/master_set]*/ -{{- define "harbor.redis.url" -}} - {{- with .Values.redis }} - {{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }} - {{- $cred := ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }} - {{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) $cred (include "harbor.redis.addr" $) $path -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCore" -}} - {{- with .Values.redis }} - {{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index*/ -{{- define "harbor.redis.urlForJobservice" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.jobserviceDatabaseIndex .external.jobserviceDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForRegistry" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForTrivy" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.trivyAdapterIndex .external.trivyAdapterIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForHarbor" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.harborDatabaseIndex .external.harborDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCache" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.cacheLayerDatabaseIndex .external.cacheLayerDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.dbForRegistry" -}} - {{- with .Values.redis }} - {{- ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.noProxy" -}} - {{- printf "%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}} -{{- end -}} - -{{- define "harbor.caBundleVolume" -}} -- name: ca-bundle-certs - secret: - secretName: {{ .Values.caBundleSecretName }} -{{- end -}} - -{{- define "harbor.caBundleVolumeMount" -}} -- name: ca-bundle-certs - mountPath: /harbor_cust_cert/custom-ca.crt - subPath: ca.crt -{{- end -}} - -{{/* scheme for all components because it only support http mode */}} -{{- define "harbor.component.scheme" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "https" -}} - {{- else -}} - {{- printf "http" -}} - {{- end -}} -{{- end -}} - -{{/* core component container port */}} -{{- define "harbor.core.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* core component service port */}} -{{- define "harbor.core.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component container port */}} -{{- define "harbor.jobservice.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component service port */}} -{{- define "harbor.jobservice.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* portal component container port */}} -{{- define "harbor.portal.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* portal component service port */}} -{{- define "harbor.portal.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* registry component container port */}} -{{- define "harbor.registry.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registry component service port */}} -{{- define "harbor.registry.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component container port */}} -{{- define "harbor.registryctl.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component service port */}} -{{- define "harbor.registryctl.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component container port */}} -{{- define "harbor.trivy.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component service port */}} -{{- define "harbor.trivy.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* CORE_URL */}} -{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}} -{{- define "harbor.coreURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}} -{{- end -}} - -{{/* JOBSERVICE_URL */}} -{{- define "harbor.jobserviceURL" -}} - {{- printf "%s://%s-jobservice" (include "harbor.component.scheme" .) (include "harbor.fullname" .) -}} -{{- end -}} - -{{/* PORTAL_URL */}} -{{- define "harbor.portalURL" -}} - {{- printf "%s://%s" (include "harbor.component.scheme" .) (include "harbor.portal" .) -}} -{{- end -}} - -{{/* REGISTRY_URL */}} -{{- define "harbor.registryURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registry.servicePort" .) -}} -{{- end -}} - -{{/* REGISTRY_CONTROLLER_URL */}} -{{- define "harbor.registryControllerURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registryctl.servicePort" .) -}} -{{- end -}} - -{{/* TOKEN_SERVICE_URL */}} -{{- define "harbor.tokenServiceURL" -}} - {{- printf "%s/service/token" (include "harbor.coreURL" .) -}} -{{- end -}} - -{{/* TRIVY_ADAPTER_URL */}} -{{- define "harbor.trivyAdapterURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}} -{{- end -}} - -{{- define "harbor.internalTLS.core.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.core.secretName -}} - {{- else -}} - {{- printf "%s-core-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.jobservice.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.jobservice.secretName -}} - {{- else -}} - {{- printf "%s-jobservice-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.portal.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.portal.secretName -}} - {{- else -}} - {{- printf "%s-portal-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.registry.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.registry.secretName -}} - {{- else -}} - {{- printf "%s-registry-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.trivy.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.trivy.secretName -}} - {{- else -}} - {{- printf "%s-trivy-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsCoreSecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsSecretForNginx" -}} - {{- if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.nginx" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.metricsPortName" -}} - {{- if .Values.internalTLS.enabled }} - {{- printf "https-metrics" -}} - {{- else -}} - {{- printf "http-metrics" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.traceEnvs" -}} - TRACE_ENABLED: "{{ .Values.trace.enabled }}" - TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}" - TRACE_NAMESPACE: "{{ .Values.trace.namespace }}" - {{- if .Values.trace.attributes }} - TRACE_ATTRIBUTES: {{ .Values.trace.attributes | toJson | squote }} - {{- end }} - {{- if eq .Values.trace.provider "jaeger" }} - TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}" - TRACE_JAEGER_USERNAME: "{{ .Values.trace.jaeger.username }}" - TRACE_JAEGER_AGENT_HOSTNAME: "{{ .Values.trace.jaeger.agent_host }}" - TRACE_JAEGER_AGENT_PORT: "{{ .Values.trace.jaeger.agent_port }}" - {{- else }} - TRACE_OTEL_ENDPOINT: "{{ .Values.trace.otel.endpoint }}" - TRACE_OTEL_URL_PATH: "{{ .Values.trace.otel.url_path }}" - TRACE_OTEL_COMPRESSION: "{{ .Values.trace.otel.compression }}" - TRACE_OTEL_INSECURE: "{{ .Values.trace.otel.insecure }}" - TRACE_OTEL_TIMEOUT: "{{ .Values.trace.otel.timeout }}" - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForCore" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-core" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForJobservice" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-jobservice" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForRegistryCtl" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-registryctl" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceJaegerPassword" -}} - {{- if and .Values.trace.enabled (eq .Values.trace.provider "jaeger") }} - TRACE_JAEGER_PASSWORD: "{{ .Values.trace.jaeger.password | default "" | b64enc }}" - {{- end }} -{{- end -}} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "harbor.ingress.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/core/core-cm.yaml b/charts/harbor/harbor/1.13.0/templates/core/core-cm.yaml deleted file mode 100644 index 7d284c899d..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/core/core-cm.yaml +++ /dev/null @@ -1,87 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - app.conf: |+ - appname = Harbor - runmode = prod - enablegzip = true - - [prod] - httpport = {{ ternary "8443" "8080" .Values.internalTLS.enabled }} - PORT: "{{ ternary "8443" "8080" .Values.internalTLS.enabled }}" - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "{{ template "harbor.database.host" . }}" - POSTGRESQL_PORT: "{{ template "harbor.database.port" . }}" - POSTGRESQL_USERNAME: "{{ template "harbor.database.username" . }}" - POSTGRESQL_DATABASE: "{{ template "harbor.database.coreDatabase" . }}" - POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" - EXT_ENDPOINT: "{{ .Values.externalURL }}" - CORE_URL: "{{ template "harbor.coreURL" . }}" - JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - CORE_LOCAL_URL: "{{ ternary "https://127.0.0.1:8443" "http://127.0.0.1:8080" .Values.internalTLS.enabled }}" - WITH_TRIVY: {{ .Values.trivy.enabled | quote }} - TRIVY_ADAPTER_URL: "{{ template "harbor.trivyAdapterURL" . }}" - REGISTRY_STORAGE_PROVIDER_NAME: "{{ .Values.persistence.imageChartStorage.type }}" - LOG_LEVEL: "{{ .Values.logLevel }}" - CONFIG_PATH: "/etc/core/app.conf" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}" - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.harborDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.harborDatabaseIndex) }} - _REDIS_URL_HARBOR: "{{ template "harbor.redis.urlForHarbor" . }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} - PORTAL_URL: "{{ template "harbor.portalURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - {{- if .Values.uaaSecretName }} - UAA_CA_ROOT: "/etc/core/auth-ca/auth-ca.crt" - {{- end }} - {{- if has "core" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE: "docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory" - {{- if .Values.metrics.enabled}} - METRIC_ENABLE: "true" - METRIC_PATH: "{{ .Values.metrics.core.path }}" - METRIC_PORT: "{{ .Values.metrics.core.port }}" - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: core - {{- end }} - - {{- if hasKey .Values.core "gcTimeWindowHours" }} - #make the GC time window configurable for testing - GC_TIME_WINDOW_HOURS: "{{ .Values.core.gcTimeWindowHours }}" - {{- end }} - {{- template "harbor.traceEnvsForCore" . }} - - {{- if .Values.core.artifactPullAsyncFlushDuration | quote }} - ARTIFACT_PULL_ASYNC_FLUSH_DURATION: {{ .Values.core.artifactPullAsyncFlushDuration }} - {{- end }} - - {{- if .Values.core.gdpr}} - {{- if .Values.core.gdpr.deleteUser}} - GDPR_DELETE_USER: "true" - {{- end }} - {{- end }} - - {{- if .Values.cache.enabled }} - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - - {{- if .Values.core.quotaUpdateProvider }} - QUOTA_UPDATE_PROVIDER: "{{ .Values.core.quotaUpdateProvider }}" - {{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/core/core-dpl.yaml b/charts/harbor/harbor/1.13.0/templates/core/core-dpl.yaml deleted file mode 100644 index 8d202498db..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/core/core-dpl.yaml +++ /dev/null @@ -1,237 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: core -spec: - replicas: {{ .Values.core.replicas }} - revisionHistoryLimit: {{ .Values.core.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: core - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: core -{{- if .Values.core.podLabels }} -{{ toYaml .Values.core.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.core.podAnnotations }} -{{ toYaml .Values.core.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.core.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: core -{{- end }} -{{- end }} - containers: - - name: core - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if .Values.core.startupProbe.enabled }} - startupProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 360 - initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} - periodSeconds: 10 - {{- end }} - livenessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: "{{ template "harbor.jobservice" . }}" - key: JOBSERVICE_SECRET - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/core/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/core/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/core/ca.crt - {{- end }} - {{- if .Values.database.external.existingSecret }} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} -{{- with .Values.core.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - {{- if .Values.expose.tls.enabled }} - - name: ca-download - mountPath: /etc/core/ca - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - mountPath: /etc/core/auth-ca/auth-ca.crt - subPath: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - {{- end }} - - name: psc - mountPath: /etc/core/token - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} -{{- if .Values.core.resources }} - resources: -{{ toYaml .Values.core.resources | indent 10 }} -{{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - - name: secret-key - secret: - {{- if .Values.existingSecretSecretKey }} - secretName: {{ .Values.existingSecretSecretKey }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - items: - - key: secretKey - path: key - - name: token-service-private-key - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: ca-download - secret: - {{- if .Values.caSecretName }} - secretName: {{ .Values.caSecretName }} - {{- else if eq (include "harbor.autoGenCertForIngress" .) "true" }} - secretName: "{{ template "harbor.ingress" . }}" - {{- else if eq (include "harbor.autoGenCertForNginx" .) "true" }} - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - secret: - secretName: {{ .Values.uaaSecretName }} - items: - - key: ca.crt - path: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - - name: psc - emptyDir: {} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.core.priorityClassName }} - priorityClassName: {{ .Values.core.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/core/core-pre-upgrade-job.yaml b/charts/harbor/harbor/1.13.0/templates/core/core-pre-upgrade-job.yaml deleted file mode 100644 index 43c9d3596d..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/core/core-pre-upgrade-job.yaml +++ /dev/null @@ -1,74 +0,0 @@ -{{- if .Values.enableMigrateHelmHook }} -apiVersion: batch/v1 -kind: Job -metadata: - name: migration-job - labels: -{{ include "harbor.labels" . | indent 4 }} - component: migrator - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-5" -spec: - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: migrator - spec: - restartPolicy: Never - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 120 - containers: - - name: core-job - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/harbor/harbor_core", "-mode=migrate"] - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - {{- if .Values.database.external.existingSecret }} - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/core/core-secret.yaml b/charts/harbor/harbor/1.13.0/templates/core/core-secret.yaml deleted file mode 100644 index 23b352b475..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/core/core-secret.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.existingSecretSecretKey }} - secretKey: {{ .Values.secretKey | b64enc | quote }} - {{- end }} - secret: {{ .Values.core.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.core.secretName }} - {{- $ca := genCA "harbor-token-ca" 365 }} - tls.key: {{ .Values.core.tokenKey | default $ca.Key | b64enc | quote }} - tls.crt: {{ .Values.core.tokenCert | default $ca.Cert | b64enc | quote }} - {{- end }} - {{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} - {{- end }} - {{- if not .Values.database.external.existingSecret }} - POSTGRESQL_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - CSRF_KEY: {{ .Values.core.xsrfKey | default (randAlphaNum 32) | b64enc | quote }} -{{- if .Values.core.configureUserSettings }} - CONFIG_OVERWRITE_JSON: {{ .Values.core.configureUserSettings | b64enc | quote }} -{{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.13.0/templates/core/core-svc.yaml b/charts/harbor/harbor/1.13.0/templates/core/core-svc.yaml deleted file mode 100644 index 0d2cfb2915..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/core/core-svc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.core.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - name: {{ ternary "https-web" "http-web" .Values.internalTLS.enabled }} - port: {{ template "harbor.core.servicePort" . }} - targetPort: {{ template "harbor.core.containerPort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.core.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: core diff --git a/charts/harbor/harbor/1.13.0/templates/core/core-tls.yaml b/charts/harbor/harbor/1.13.0/templates/core/core-tls.yaml deleted file mode 100644 index c52148f0d9..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/core/core-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.core.crt\" is required!" .Values.internalTLS.core.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.core.key\" is required!" .Values.internalTLS.core.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/database/database-secret.yaml b/charts/harbor/harbor/1.13.0/templates/database/database-secret.yaml deleted file mode 100644 index 864aff4a18..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/database/database-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - POSTGRES_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end -}} diff --git a/charts/harbor/harbor/1.13.0/templates/database/database-ss.yaml b/charts/harbor/harbor/1.13.0/templates/database/database-ss.yaml deleted file mode 100644 index 3b08b07ef1..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/database/database-ss.yaml +++ /dev/null @@ -1,168 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -{{- $database := .Values.persistence.persistentVolumeClaim.database -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: database -spec: - replicas: 1 - serviceName: "{{ template "harbor.database" . }}" - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: database - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: database -{{- if .Values.database.podLabels }} -{{ toYaml .Values.database.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} -{{- if .Values.database.podAnnotations }} -{{ toYaml .Values.database.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.database.internal.serviceAccountName }} - serviceAccountName: {{ .Values.database.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.database.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - # as we change the data directory to a sub folder to support psp, the init container here - # is used to migrate the existing data. See https://github.com/goharbor/harbor-helm/issues/756 - # for more detail. - # we may remove it after several releases - - name: "data-migrator" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "[ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true"] -{{- if .Values.database.internal.initContainer.migrator.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.migrator.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - # with "fsGroup" set, each time a volume is mounted, Kubernetes must recursively chown() and chmod() all the files and directories inside the volume - # this causes the postgresql reports the "data directory /var/lib/postgresql/data/pgdata has group or world access" issue when using some CSIs e.g. Ceph - # use this init container to correct the permission - # as "fsGroup" applied before the init container running, the container has enough permission to execute the command - - name: "data-permissions-ensurer" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"] -{{- if .Values.database.internal.initContainer.permissions.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.permissions.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - containers: - - name: database - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.livenessProbe.timeoutSeconds }} - readinessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 1 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.readinessProbe.timeoutSeconds }} -{{- if .Values.database.internal.resources }} - resources: -{{ toYaml .Values.database.internal.resources | indent 10 }} -{{- end }} - envFrom: - - secretRef: - name: "{{ template "harbor.database" . }}" - env: - # put the data into a sub directory to avoid the permission issue in k8s with restricted psp enabled - # more detail refer to https://github.com/goharbor/harbor-helm/issues/756 - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" -{{- with .Values.database.internal.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - - name: shm-volume - mountPath: /dev/shm - volumes: - - name: shm-volume - emptyDir: - medium: Memory - sizeLimit: {{ .Values.database.internal.shmSizeLimit }} - {{- if not .Values.persistence.enabled }} - - name: "database-data" - emptyDir: {} - {{- else if $database.existingClaim }} - - name: "database-data" - persistentVolumeClaim: - claimName: {{ $database.existingClaim }} - {{- end -}} - {{- with .Values.database.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.database.internal.priorityClassName }} - priorityClassName: {{ .Values.database.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $database.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $database.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $database.accessMode | quote }}] - {{- if $database.storageClass }} - {{- if (eq "-" $database.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $database.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $database.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.13.0/templates/database/database-svc.yaml b/charts/harbor/harbor/1.13.0/templates/database/database-svc.yaml deleted file mode 100644 index 6475048cd9..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/database/database-svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 5432 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: database -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/exporter/exporter-cm-env.yaml b/charts/harbor/harbor/1.13.0/templates/exporter/exporter-cm-env.yaml deleted file mode 100644 index 0bf4e7d905..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/exporter/exporter-cm-env.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.exporter" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - LOG_LEVEL: "{{ .Values.logLevel }}" - HARBOR_EXPORTER_PORT: "{{ .Values.metrics.exporter.port }}" - HARBOR_EXPORTER_METRICS_PATH: "{{ .Values.metrics.exporter.path }}" - HARBOR_EXPORTER_METRICS_ENABLED: "{{ .Values.metrics.enabled }}" - HARBOR_EXPORTER_CACHE_TIME: "{{ .Values.exporter.cacheDuration }}" - HARBOR_EXPORTER_CACHE_CLEAN_INTERVAL: "{{ .Values.exporter.cacheCleanInterval }}" - HARBOR_METRIC_NAMESPACE: harbor - HARBOR_METRIC_SUBSYSTEM: exporter - HARBOR_REDIS_URL: "{{ template "harbor.redis.urlForJobservice" . }}" - HARBOR_REDIS_NAMESPACE: harbor_job_service_namespace - HARBOR_REDIS_TIMEOUT: "3600" - HARBOR_SERVICE_SCHEME: "{{ template "harbor.component.scheme" . }}" - HARBOR_SERVICE_HOST: "{{ template "harbor.core" . }}" - HARBOR_SERVICE_PORT: "{{ template "harbor.core.servicePort" . }}" - HARBOR_DATABASE_HOST: "{{ template "harbor.database.host" . }}" - HARBOR_DATABASE_PORT: "{{ template "harbor.database.port" . }}" - HARBOR_DATABASE_USERNAME: "{{ template "harbor.database.username" . }}" - HARBOR_DATABASE_DBNAME: "{{ template "harbor.database.coreDatabase" . }}" - HARBOR_DATABASE_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - HARBOR_DATABASE_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - HARBOR_DATABASE_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" -{{- end}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/exporter/exporter-dpl.yaml b/charts/harbor/harbor/1.13.0/templates/exporter/exporter-dpl.yaml deleted file mode 100644 index 6d2e1f53ac..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/exporter/exporter-dpl.yaml +++ /dev/null @@ -1,139 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: exporter -spec: - replicas: {{ .Values.exporter.replicas }} - revisionHistoryLimit: {{ .Values.exporter.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: exporter - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: exporter -{{- if .Values.exporter.podLabels }} -{{ toYaml .Values.exporter.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.exporter.podAnnotations }} -{{ toYaml .Values.exporter.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.exporter.serviceAccountName }} - serviceAccountName: {{ .Values.exporter.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.exporter.automountServiceAccountToken | default false }} -{{- with .Values.exporter.topologySpreadConstraints }} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: exporter -{{- end }} -{{- end }} - containers: - - name: exporter - image: {{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 30 - periodSeconds: 10 - args: ["-log-level", "{{ .Values.logLevel }}"] - envFrom: - - configMapRef: - name: "{{ template "harbor.exporter" . }}-env" - - secretRef: - name: "{{ template "harbor.exporter" . }}" - env: - {{- if .Values.database.external.existingSecret }} - - name: HARBOR_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} -{{- if .Values.exporter.resources }} - resources: -{{ toYaml .Values.exporter.resources | indent 10 }} -{{- end }} -{{- with .Values.exporter.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - # There are some metric data are collectd from harbor core. - # When internal TLS is enabled, the Exporter need the CA file to collect these data. - {{- end }} - volumes: - - name: config - secret: - secretName: "{{ template "harbor.exporter" . }}" - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.exporter.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.exporter.priorityClassName }} - priorityClassName: {{ .Values.exporter.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.13.0/templates/exporter/exporter-secret.yaml b/charts/harbor/harbor/1.13.0/templates/exporter/exporter-secret.yaml deleted file mode 100644 index 434a1bf689..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/exporter/exporter-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: -{{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} -{{- end }} -{{- if not .Values.database.external.existingSecret }} - HARBOR_DATABASE_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/exporter/exporter-svc.yaml b/charts/harbor/harbor/1.13.0/templates/exporter/exporter-svc.yaml deleted file mode 100644 index 4a6f3fdec6..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/exporter/exporter-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.exporter" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.exporter.port }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: exporter -{{ end }} diff --git a/charts/harbor/harbor/1.13.0/templates/ingress/ingress.yaml b/charts/harbor/harbor/1.13.0/templates/ingress/ingress.yaml deleted file mode 100644 index e4c06939c6..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/ingress/ingress.yaml +++ /dev/null @@ -1,145 +0,0 @@ -{{- if eq .Values.expose.type "ingress" }} -{{- $ingress := .Values.expose.ingress -}} -{{- $tls := .Values.expose.tls -}} -{{- if eq .Values.expose.ingress.controller "gce" }} - {{- $_ := set . "portal_path" "/*" -}} - {{- $_ := set . "api_path" "/api/*" -}} - {{- $_ := set . "service_path" "/service/*" -}} - {{- $_ := set . "v2_path" "/v2/*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/*" -}} - {{- $_ := set . "controller_path" "/c/*" -}} -{{- else if eq .Values.expose.ingress.controller "ncp" }} - {{- $_ := set . "portal_path" "/.*" -}} - {{- $_ := set . "api_path" "/api/.*" -}} - {{- $_ := set . "service_path" "/service/.*" -}} - {{- $_ := set . "v2_path" "/v2/.*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}} - {{- $_ := set . "controller_path" "/c/.*" -}} -{{- else }} - {{- $_ := set . "portal_path" "/" -}} - {{- $_ := set . "api_path" "/api/" -}} - {{- $_ := set . "service_path" "/service/" -}} - {{- $_ := set . "v2_path" "/v2/" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/" -}} - {{- $_ := set . "controller_path" "/c/" -}} -{{- end }} - ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.harbor.labels }} -{{ toYaml $ingress.harbor.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if .Values.internalTLS.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" -{{- end }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -{{- if $ingress.harbor.annotations }} -{{ toYaml $ingress.harbor.annotations | indent 4 }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsCoreSecretForIngress" . }} - {{- if $ingress.hosts.core }} - hosts: - - {{ $ingress.hosts.core }} - {{- end }} - {{- end }} - rules: - - http: - paths: -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - - path: {{ .api_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - backend: - serviceName: {{ template "harbor.portal" . }} - servicePort: {{ template "harbor.portal.servicePort" . }} -{{- else }} - - path: {{ .api_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.portal" . }} - port: - number: {{ template "harbor.portal.servicePort" . }} -{{- end }} - {{- if $ingress.hosts.core }} - host: {{ $ingress.hosts.core }} - {{- end }} - -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/ingress/secret.yaml b/charts/harbor/harbor/1.13.0/templates/ingress/secret.yaml deleted file mode 100644 index 41507b3dd9..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/ingress/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForIngress" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cert := genSignedCert .Values.expose.ingress.hosts.core nil (list .Values.expose.ingress.hosts.core) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/internal/auto-tls.yaml b/charts/harbor/harbor/1.13.0/templates/internal/auto-tls.yaml deleted file mode 100644 index da5f5e2c7b..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/internal/auto-tls.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} -{{- $ca := genCA "harbor-internal-ca" 365 }} -{{- $coreCN := (include "harbor.core" .) }} -{{- $coreCrt := genSignedCert $coreCN (list "127.0.0.1") (list "localhost" $coreCN) 365 $ca }} -{{- $jsCN := (include "harbor.jobservice" .) }} -{{- $jsCrt := genSignedCert $jsCN nil (list $jsCN) 365 $ca }} -{{- $regCN := (include "harbor.registry" .) }} -{{- $regCrt := genSignedCert $regCN nil (list $regCN) 365 $ca }} -{{- $portalCN := (include "harbor.portal" .) }} -{{- $portalCrt := genSignedCert $portalCN nil (list $portalCN) 365 $ca }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $coreCrt.Cert | b64enc | quote }} - tls.key: {{ $coreCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $jsCrt.Cert | b64enc | quote }} - tls.key: {{ $jsCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $regCrt.Cert | b64enc | quote }} - tls.key: {{ $regCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $portalCrt.Cert | b64enc | quote }} - tls.key: {{ $portalCrt.Key | b64enc | quote }} - -{{- if and .Values.trivy.enabled}} ---- -{{- $trivyCN := (include "harbor.trivy" .) }} -{{- $trivyCrt := genSignedCert $trivyCN nil (list $trivyCN) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $trivyCrt.Cert | b64enc | quote }} - tls.key: {{ $trivyCrt.Key | b64enc | quote }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-cm-env.yaml b/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-cm-env.yaml deleted file mode 100644 index 8411c7a47c..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-cm-env.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - CORE_URL: "{{ template "harbor.coreURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - - JOBSERVICE_WEBHOOK_JOB_MAX_RETRY: "{{ .Values.jobservice.notification.webhook_job_max_retry }}" - JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT: "{{ .Values.jobservice.notification.webhook_job_http_client_timeout }}" - - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.metrics.enabled}} - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: jobservice - {{- end }} - {{- template "harbor.traceEnvsForJobservice" . }} - {{- if .Values.cache.enabled }} - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-cm.yaml b/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-cm.yaml deleted file mode 100644 index 8211c62209..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-cm.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - #Server listening port - protocol: "{{ template "harbor.component.scheme" . }}" - port: {{ template "harbor.jobservice.containerPort". }} - {{- if .Values.internalTLS.enabled }} - https_config: - cert: "/etc/harbor/ssl/jobservice/tls.crt" - key: "/etc/harbor/ssl/jobservice/tls.key" - {{- end }} - worker_pool: - workers: {{ .Values.jobservice.maxJobWorkers }} - backend: "redis" - redis_pool: - redis_url: "{{ template "harbor.redis.urlForJobservice" . }}" - namespace: "harbor_job_service_namespace" - idle_timeout_second: 3600 - job_loggers: - {{- if has "file" .Values.jobservice.jobLoggers }} - - name: "FILE" - level: {{ .Values.logLevel | upper }} - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - {{- end }} - {{- if has "database" .Values.jobservice.jobLoggers }} - - name: "DB" - level: {{ .Values.logLevel | upper }} - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - {{- end }} - {{- if has "stdout" .Values.jobservice.jobLoggers }} - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - {{- end }} - metric: - enabled: {{ .Values.metrics.enabled }} - path: {{ .Values.metrics.jobservice.path }} - port: {{ .Values.metrics.jobservice.port }} - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: {{ .Values.jobservice.reaper.max_update_hours }} - # the max time for execution in running state without new task created - max_dangling_hours: {{ .Values.jobservice.reaper.max_dangling_hours }} diff --git a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-dpl.yaml b/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-dpl.yaml deleted file mode 100644 index 32df97db76..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-dpl.yaml +++ /dev/null @@ -1,166 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - replicas: {{ .Values.jobservice.replicas }} - revisionHistoryLimit: {{ .Values.jobservice.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: jobservice -{{- if .Values.jobservice.podLabels }} -{{ toYaml .Values.jobservice.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} - checksum/configmap-env: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/jobservice/jobservice-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.jobservice.podAnnotations }} -{{ toYaml .Values.jobservice.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.jobservice.serviceAccountName }} - serviceAccountName: {{ .Values.jobservice.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.jobservice.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: jobservice -{{- end }} -{{- end }} - containers: - - name: jobservice - image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.jobservice.resources }} - resources: -{{ toYaml .Values.jobservice.resources | indent 10 }} -{{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/jobservice/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/jobservice/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/jobservice/ca.crt - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} -{{- with .Values.jobservice.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.jobservice" . }}-env" - - secretRef: - name: "{{ template "harbor.jobservice" . }}" - ports: - - containerPort: {{ template "harbor.jobservice.containerPort" . }} - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.subPath }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - mountPath: /etc/harbor/ssl/jobservice - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: jobservice-config - configMap: - name: "{{ template "harbor.jobservice" . }}" - - name: job-logs - {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLoggers) }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim | default (include "harbor.jobservice" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.jobservice.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.jobservice.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.jobservice.priorityClassName }} - priorityClassName: {{ .Values.jobservice.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-pvc.yaml b/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-pvc.yaml deleted file mode 100644 index a6b8b8bd38..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-pvc.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- $jobLog := .Values.persistence.persistentVolumeClaim.jobservice.jobLog -}} -{{- if and .Values.persistence.enabled (not $jobLog.existingClaim) (has "file" .Values.jobservice.jobLoggers) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.jobservice" . }} - annotations: - {{- range $key, $value := $jobLog.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - accessModes: - - {{ $jobLog.accessMode }} - resources: - requests: - storage: {{ $jobLog.size }} - {{- if $jobLog.storageClass }} - {{- if eq "-" $jobLog.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $jobLog.storageClass }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-secrets.yaml b/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-secrets.yaml deleted file mode 100644 index 3dfa6bd5e6..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-secrets.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - JOBSERVICE_SECRET: {{ .Values.jobservice.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-svc.yaml b/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-svc.yaml deleted file mode 100644 index d2b7a47fd4..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-svc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }} - port: {{ template "harbor.jobservice.servicePort" . }} - targetPort: {{ template "harbor.jobservice.containerPort" . }} -{{- if .Values.metrics.enabled }} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.jobservice.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice diff --git a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-tls.yaml b/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-tls.yaml deleted file mode 100644 index 234cb39995..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/jobservice/jobservice-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.jobservice.crt\" is required!" .Values.internalTLS.jobservice.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.jobservice.key\" is required!" .Values.internalTLS.jobservice.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/metrics/metrics-svcmon.yaml b/charts/harbor/harbor/1.13.0/templates/metrics/metrics-svcmon.yaml deleted file mode 100644 index 1122ef01ef..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/metrics/metrics-svcmon.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "harbor.fullname" . }} - labels: {{ include "harbor.labels" . | nindent 4 }} -{{- if .Values.metrics.serviceMonitor.additionalLabels }} -{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} -{{- end }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: {{ template "harbor.metricsPortName" . }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - honorLabels: true -{{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.metrics.serviceMonitor.relabelings | indent 4 }} -{{- end }} - selector: - matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/nginx/configmap-http.yaml b/charts/harbor/harbor/1.13.0/templates/nginx/configmap-http.yaml deleted file mode 100644 index c4b8354d06..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/nginx/configmap-http.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server {{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled}} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end }} - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - proxy_send_timeout 900; - proxy_read_timeout 900; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/nginx/configmap-https.yaml b/charts/harbor/harbor/1.13.0/templates/nginx/configmap-https.yaml deleted file mode 100644 index 56c943a619..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/nginx/configmap-https.yaml +++ /dev/null @@ -1,187 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server "{{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}"; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8443 ssl; - {{- end }} - # server_name harbordomain.com; - server_tokens off; - # SSL - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - # Add extra headers - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; HttpOnly; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end}} - #server_name harbordomain.com; - return 301 https://$host$request_uri; - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/nginx/deployment.yaml b/charts/harbor/harbor/1.13.0/templates/nginx/deployment.yaml deleted file mode 100644 index 8290d497b6..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/nginx/deployment.yaml +++ /dev/null @@ -1,126 +0,0 @@ -{{- if ne .Values.expose.type "ingress" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: nginx -spec: - replicas: {{ .Values.nginx.replicas }} - revisionHistoryLimit: {{ .Values.nginx.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: nginx - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: nginx -{{- if .Values.nginx.podLabels }} -{{ toYaml .Values.nginx.podLabels | indent 8 }} -{{- end }} - annotations: - {{- if not .Values.expose.tls.enabled }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} - {{- else }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-https.yaml") . | sha256sum }} - {{- end }} - {{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} - checksum/secret: {{ include (print $.Template.BasePath "/nginx/secret.yaml") . | sha256sum }} - {{- end }} -{{- if .Values.nginx.podAnnotations }} -{{ toYaml .Values.nginx.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- if .Values.nginx.serviceAccountName }} - serviceAccountName: {{ .Values.nginx.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.nginx.automountServiceAccountToken | default false }} -{{- with .Values.nginx.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: nginx -{{- end }} -{{- end }} - containers: - - name: nginx - image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - {{- $_ := set . "scheme" "HTTP" -}} - {{- $_ := set . "port" "8080" -}} - {{- if .Values.expose.tls.enabled }} - {{- $_ := set . "scheme" "HTTPS" -}} - {{- $_ := set . "port" "8443" -}} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.nginx.resources }} - resources: -{{ toYaml .Values.nginx.resources | indent 10 }} -{{- end }} -{{- with .Values.nginx.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: 8080 - - containerPort: 8443 - - containerPort: 4443 - volumeMounts: - - name: config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.expose.tls.enabled }} - - name: certificate - mountPath: /etc/nginx/cert - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.nginx" . }} - {{- if .Values.expose.tls.enabled }} - - name: certificate - secret: - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- with .Values.nginx.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nginx.priorityClassName }} - priorityClassName: {{ .Values.nginx.priorityClassName }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/nginx/secret.yaml b/charts/harbor/harbor/1.13.0/templates/nginx/secret.yaml deleted file mode 100644 index c819c556d9..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/nginx/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cn := (required "The \"expose.tls.auto.commonName\" is required!" .Values.expose.tls.auto.commonName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if regexMatch `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` $cn }} - {{- $cert := genSignedCert $cn (list $cn) nil 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- else }} - {{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/nginx/service.yaml b/charts/harbor/harbor/1.13.0/templates/nginx/service.yaml deleted file mode 100644 index 12021bfd1a..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/nginx/service.yaml +++ /dev/null @@ -1,78 +0,0 @@ -{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }} -apiVersion: v1 -kind: Service -metadata: -{{- if eq .Values.expose.type "clusterIP" }} -{{- $clusterIP := .Values.expose.clusterIP }} - name: {{ $clusterIP.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $clusterIP.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: ClusterIP - ports: - - name: http - port: {{ $clusterIP.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $clusterIP.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- else if eq .Values.expose.type "nodePort" }} -{{- $nodePort := .Values.expose.nodePort }} - name: {{ $nodePort.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - type: NodePort - ports: - - name: http - port: {{ $nodePort.ports.http.port }} - targetPort: 8080 - {{- if $nodePort.ports.http.nodePort }} - nodePort: {{ $nodePort.ports.http.nodePort }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $nodePort.ports.https.port }} - targetPort: 8443 - {{- if $nodePort.ports.https.nodePort }} - nodePort: {{ $nodePort.ports.https.nodePort }} - {{- end }} - {{- end }} -{{- else if eq .Values.expose.type "loadBalancer" }} -{{- $loadBalancer := .Values.expose.loadBalancer }} - name: {{ $loadBalancer.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $loadBalancer.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: LoadBalancer - {{- with $loadBalancer.sourceRanges }} - loadBalancerSourceRanges: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $loadBalancer.IP }} - loadBalancerIP: {{ $loadBalancer.IP }} - {{- end }} - ports: - - name: http - port: {{ $loadBalancer.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $loadBalancer.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: nginx -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/portal/configmap.yaml b/charts/harbor/harbor/1.13.0/templates/portal/configmap.yaml deleted file mode 100644 index 7b2118e721..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/portal/configmap.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - events { - worker_connections 1024; - } - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - {{- if .Values.internalTLS.enabled }} - {{- if .Values.ipFamily.ipv4.enabled}} - listen {{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - # SSL - ssl_certificate /etc/harbor/ssl/portal/tls.crt; - ssl_certificate_key /etc/harbor/ssl/portal/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - {{- else }} - {{- if .Values.ipFamily.ipv4.enabled }} - listen {{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- end }} - server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location /devcenter-api-2.0 { - try_files $uri $uri/ /swagger-ui-index.html; - } - location / { - try_files $uri $uri/ /index.html; - } - location = /index.html { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - } - } diff --git a/charts/harbor/harbor/1.13.0/templates/portal/deployment.yaml b/charts/harbor/harbor/1.13.0/templates/portal/deployment.yaml deleted file mode 100644 index 959a3fd7b5..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/portal/deployment.yaml +++ /dev/null @@ -1,114 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: portal -spec: - replicas: {{ .Values.portal.replicas }} - revisionHistoryLimit: {{ .Values.portal.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: portal - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: portal -{{- if .Values.portal.podLabels }} -{{ toYaml .Values.portal.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} -{{- end }} - checksum/configmap: {{ include (print $.Template.BasePath "/portal/configmap.yaml") . | sha256sum }} -{{- if .Values.portal.podAnnotations }} -{{ toYaml .Values.portal.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- if .Values.portal.serviceAccountName }} - serviceAccountName: {{ .Values.portal.serviceAccountName }} -{{- end }} - automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }} -{{- with .Values.portal.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: portal -{{- end }} -{{- end }} - containers: - - name: portal - image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} -{{- if .Values.portal.resources }} - resources: -{{ toYaml .Values.portal.resources | indent 10 }} -{{- end }} -{{- with .Values.portal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: {{ template "harbor.portal.containerPort" . }} - volumeMounts: - - name: portal-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - mountPath: /etc/harbor/ssl/portal - {{- end }} - volumes: - - name: portal-config - configMap: - name: "{{ template "harbor.portal" . }}" - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.portal.secretName" . }} - {{- end }} - {{- with .Values.portal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.portal.priorityClassName }} - priorityClassName: {{ .Values.portal.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/portal/service.yaml b/charts/harbor/harbor/1.13.0/templates/portal/service.yaml deleted file mode 100644 index ff4eda435b..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/portal/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: {{ template "harbor.portal.servicePort" . }} - targetPort: {{ template "harbor.portal.containerPort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: portal diff --git a/charts/harbor/harbor/1.13.0/templates/portal/tls.yaml b/charts/harbor/harbor/1.13.0/templates/portal/tls.yaml deleted file mode 100644 index de63f4e813..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/portal/tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.portal.crt\" is required!" .Values.internalTLS.portal.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.portal.key\" is required!" .Values.internalTLS.portal.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/redis/service.yaml b/charts/harbor/harbor/1.13.0/templates/redis/service.yaml deleted file mode 100644 index 79c95c3e05..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/redis/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 6379 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: redis -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/redis/statefulset.yaml b/charts/harbor/harbor/1.13.0/templates/redis/statefulset.yaml deleted file mode 100644 index 371b0fd5aa..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/redis/statefulset.yaml +++ /dev/null @@ -1,116 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -{{- $redis := .Values.persistence.persistentVolumeClaim.redis -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: redis -spec: - replicas: 1 - serviceName: {{ template "harbor.redis" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: redis - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: redis -{{- if .Values.redis.podLabels }} -{{ toYaml .Values.redis.podLabels | indent 8 }} -{{- end }} -{{- if .Values.redis.podAnnotations }} - annotations: -{{ toYaml .Values.redis.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.redis.internal.serviceAccountName }} - serviceAccountName: {{ .Values.redis.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.redis.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: redis - image: {{ .Values.redis.internal.image.repository }}:{{ .Values.redis.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.redis.internal.resources }} - resources: -{{ toYaml .Values.redis.internal.resources | indent 10 }} -{{- end }} -{{- with .Values.redis.internal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: {{ $redis.subPath }} - {{- if not .Values.persistence.enabled }} - volumes: - - name: data - emptyDir: {} - {{- else if $redis.existingClaim }} - volumes: - - name: data - persistentVolumeClaim: - claimName: {{ $redis.existingClaim }} - {{- end -}} - {{- with .Values.redis.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.redis.internal.priorityClassName }} - priorityClassName: {{ .Values.redis.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $redis.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $redis.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $redis.accessMode | quote }}] - {{- if $redis.storageClass }} - {{- if (eq "-" $redis.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $redis.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $redis.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.13.0/templates/registry/registry-cm.yaml b/charts/harbor/harbor/1.13.0/templates/registry/registry-cm.yaml deleted file mode 100644 index 4f7056c384..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/registry/registry-cm.yaml +++ /dev/null @@ -1,246 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - version: 0.1 - log: - {{- if eq .Values.logLevel "warning" }} - level: warn - {{- else if eq .Values.logLevel "fatal" }} - level: error - {{- else }} - level: {{ .Values.logLevel }} - {{- end }} - fields: - service: registry - storage: - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if eq $type "filesystem" }} - filesystem: - rootdirectory: {{ $storage.filesystem.rootdirectory }} - {{- if $storage.filesystem.maxthreads }} - maxthreads: {{ $storage.filesystem.maxthreads }} - {{- end }} - {{- else if eq $type "azure" }} - azure: - accountname: {{ $storage.azure.accountname }} - container: {{ $storage.azure.container }} - {{- if $storage.azure.realm }} - realm: {{ $storage.azure.realm }} - {{- end }} - {{- else if eq $type "gcs" }} - gcs: - bucket: {{ $storage.gcs.bucket }} - {{- if not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity }} - keyfile: /etc/registry/gcs-key.json - {{- end }} - {{- if $storage.gcs.rootdirectory }} - rootdirectory: {{ $storage.gcs.rootdirectory }} - {{- end }} - {{- if $storage.gcs.chunksize }} - chunksize: {{ $storage.gcs.chunksize }} - {{- end }} - {{- else if eq $type "s3" }} - s3: - region: {{ $storage.s3.region }} - bucket: {{ $storage.s3.bucket }} - {{- if $storage.s3.regionendpoint }} - regionendpoint: {{ $storage.s3.regionendpoint }} - {{- end }} - {{- if $storage.s3.encrypt }} - encrypt: {{ $storage.s3.encrypt }} - {{- end }} - {{- if $storage.s3.keyid }} - keyid: {{ $storage.s3.keyid }} - {{- end }} - {{- if $storage.s3.secure }} - secure: {{ $storage.s3.secure }} - {{- end }} - {{- if and $storage.s3.secure $storage.s3.skipverify }} - skipverify: {{ $storage.s3.skipverify }} - {{- end }} - {{- if $storage.s3.v4auth }} - v4auth: {{ $storage.s3.v4auth }} - {{- end }} - {{- if $storage.s3.chunksize }} - chunksize: {{ $storage.s3.chunksize }} - {{- end }} - {{- if $storage.s3.rootdirectory }} - rootdirectory: {{ $storage.s3.rootdirectory }} - {{- end }} - {{- if $storage.s3.storageclass }} - storageclass: {{ $storage.s3.storageclass }} - {{- end }} - {{- if $storage.s3.multipartcopychunksize }} - multipartcopychunksize: {{ $storage.s3.multipartcopychunksize }} - {{- end }} - {{- if $storage.s3.multipartcopymaxconcurrency }} - multipartcopymaxconcurrency: {{ $storage.s3.multipartcopymaxconcurrency }} - {{- end }} - {{- if $storage.s3.multipartcopythresholdsize }} - multipartcopythresholdsize: {{ $storage.s3.multipartcopythresholdsize }} - {{- end }} - {{- else if eq $type "swift" }} - swift: - authurl: {{ $storage.swift.authurl }} - username: {{ $storage.swift.username }} - container: {{ $storage.swift.container }} - {{- if $storage.swift.region }} - region: {{ $storage.swift.region }} - {{- end }} - {{- if $storage.swift.tenant }} - tenant: {{ $storage.swift.tenant }} - {{- end }} - {{- if $storage.swift.tenantid }} - tenantid: {{ $storage.swift.tenantid }} - {{- end }} - {{- if $storage.swift.domain }} - domain: {{ $storage.swift.domain }} - {{- end }} - {{- if $storage.swift.domainid }} - domainid: {{ $storage.swift.domainid }} - {{- end }} - {{- if $storage.swift.trustid }} - trustid: {{ $storage.swift.trustid }} - {{- end }} - {{- if $storage.swift.insecureskipverify }} - insecureskipverify: {{ $storage.swift.insecureskipverify }} - {{- end }} - {{- if $storage.swift.chunksize }} - chunksize: {{ $storage.swift.chunksize }} - {{- end }} - {{- if $storage.swift.prefix }} - prefix: {{ $storage.swift.prefix }} - {{- end }} - {{- if $storage.swift.authversion }} - authversion: {{ $storage.swift.authversion }} - {{- end }} - {{- if $storage.swift.endpointtype }} - endpointtype: {{ $storage.swift.endpointtype }} - {{- end }} - {{- if $storage.swift.tempurlcontainerkey }} - tempurlcontainerkey: {{ $storage.swift.tempurlcontainerkey }} - {{- end }} - {{- if $storage.swift.tempurlmethods }} - tempurlmethods: {{ $storage.swift.tempurlmethods }} - {{- end }} - {{- else if eq $type "oss" }} - oss: - accesskeyid: {{ $storage.oss.accesskeyid }} - region: {{ $storage.oss.region }} - bucket: {{ $storage.oss.bucket }} - {{- if $storage.oss.endpoint }} - endpoint: {{ $storage.oss.bucket }}.{{ $storage.oss.endpoint }} - {{- end }} - {{- if $storage.oss.internal }} - internal: {{ $storage.oss.internal }} - {{- end }} - {{- if $storage.oss.encrypt }} - encrypt: {{ $storage.oss.encrypt }} - {{- end }} - {{- if $storage.oss.secure }} - secure: {{ $storage.oss.secure }} - {{- end }} - {{- if $storage.oss.chunksize }} - chunksize: {{ $storage.oss.chunksize }} - {{- end }} - {{- if $storage.oss.rootdirectory }} - rootdirectory: {{ $storage.oss.rootdirectory }} - {{- end }} - {{- end }} - cache: - layerinfo: redis - maintenance: - uploadpurging: - {{- if .Values.registry.upload_purging.enabled }} - enabled: true - age: {{ .Values.registry.upload_purging.age }} - interval: {{ .Values.registry.upload_purging.interval }} - dryrun: {{ .Values.registry.upload_purging.dryrun }} - {{- else }} - enabled: false - {{- end }} - delete: - enabled: true - redirect: - disable: {{ $storage.disableredirect }} - redis: - addr: {{ template "harbor.redis.addr" . }} - {{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }} - sentinelMasterSet: {{ template "harbor.redis.masterSet" . }} - {{- end }} - db: {{ template "harbor.redis.dbForRegistry" . }} - {{- if not (eq (include "harbor.redis.password" .) "") }} - password: {{ template "harbor.redis.password" . }} - {{- end }} - readtimeout: 10s - writetimeout: 10s - dialtimeout: 10s - pool: - maxidle: 100 - maxactive: 500 - idletimeout: 60s - http: - addr: :{{ template "harbor.registry.containerPort" . }} - relativeurls: {{ .Values.registry.relativeurls }} - {{- if .Values.internalTLS.enabled }} - tls: - certificate: /etc/harbor/ssl/registry/tls.crt - key: /etc/harbor/ssl/registry/tls.key - minimumtls: tls1.2 - {{- end }} - # set via environment variable - # secret: placeholder - debug: - {{- if .Values.metrics.enabled}} - addr: :{{ .Values.metrics.registry.port }} - prometheus: - enabled: true - path: {{ .Values.metrics.registry.path }} - {{- else }} - addr: localhost:5001 - {{- end }} - auth: - htpasswd: - realm: harbor-registry-basic-realm - path: /etc/registry/passwd - validation: - disabled: true - compatibility: - schema1: - enabled: true - - {{- if .Values.registry.middleware.enabled }} - {{- $middleware := .Values.registry.middleware }} - {{- $middlewareType := $middleware.type }} - {{- if eq $middlewareType "cloudFront" }} - middleware: - storage: - - name: cloudfront - options: - baseurl: {{ $middleware.cloudFront.baseurl }} - privatekey: /etc/registry/pk.pem - keypairid: {{ $middleware.cloudFront.keypairid }} - duration: {{ $middleware.cloudFront.duration }} - ipfilteredby: {{ $middleware.cloudFront.ipfilteredby }} - {{- end }} - {{- end }} - ctl-config.yml: |+ - --- - {{- if .Values.internalTLS.enabled }} - protocol: "https" - port: 8443 - https_config: - cert: "/etc/harbor/ssl/registry/tls.crt" - key: "/etc/harbor/ssl/registry/tls.key" - {{- else }} - protocol: "http" - port: 8080 - {{- end }} - log_level: {{ .Values.logLevel }} - registry_config: "/etc/registry/config.yml" diff --git a/charts/harbor/harbor/1.13.0/templates/registry/registry-dpl.yaml b/charts/harbor/harbor/1.13.0/templates/registry/registry-dpl.yaml deleted file mode 100644 index fddba9fa8b..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/registry/registry-dpl.yaml +++ /dev/null @@ -1,340 +0,0 @@ -{{- $storage := .Values.persistence.imageChartStorage }} -{{- $type := $storage.type }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - replicas: {{ .Values.registry.replicas }} - revisionHistoryLimit: {{ .Values.registry.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: registry - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: registry -{{- if .Values.registry.podLabels }} -{{ toYaml .Values.registry.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/registry/registry-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.registry.podAnnotations }} -{{ toYaml .Values.registry.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - fsGroupChangePolicy: OnRootMismatch -{{- if .Values.registry.serviceAccountName }} - serviceAccountName: {{ .Values.registry.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.registry.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: registry -{{- end }} -{{- end }} - containers: - - name: registry - image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.registry.resources }} - resources: -{{ toYaml .Values.registry.registry.resources | indent 10 }} -{{- end }} - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: "{{ template "harbor.registry" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} -{{- with .Values.registry.registry.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registry.containerPort" . }} - - containerPort: 5001 - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-htpasswd - mountPath: /etc/registry/passwd - subPath: passwd - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - mountPath: /etc/registry/pk.pem - subPath: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - - name: registryctl - image: {{ .Values.registry.controller.image.repository }}:{{ .Values.registry.controller.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.controller.resources }} - resources: -{{ toYaml .Values.registry.controller.resources | indent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.registryCtl" . }}" - - secretRef: - name: "{{ template "harbor.registry" . }}" - - secretRef: - name: "{{ template "harbor.registryCtl" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.jobservice" . }} - key: JOBSERVICE_SECRET - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} -{{- with .Values.registry.controller.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registryctl.containerPort" . }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: registry-htpasswd - secret: - {{- if not .Values.registry.credentials.existingSecret }} - secretName: {{ template "harbor.registry" . }}-htpasswd - {{ else }} - secretName: {{ .Values.registry.credentials.existingSecret }} - {{- end }} - items: - - key: REGISTRY_HTPASSWD - path: passwd - - name: registry-config - configMap: - name: "{{ template "harbor.registry" . }}" - - name: registry-data - {{- if and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "filesystem") }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.registry.existingClaim | default (include "harbor.registry" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.registry.secretName" . }} - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - secret: - {{- if and (eq $type "gcs") $storage.gcs.existingSecret }} - secretName: {{ $storage.gcs.existingSecret }} - {{- else }} - secretName: {{ template "harbor.registry" . }} - {{- end }} - items: - - key: GCS_KEY_DATA - path: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - secret: - secretName: {{ .Values.persistence.imageChartStorage.caBundleSecretName }} - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - secret: - secretName: {{ .Values.registry.middleware.cloudFront.privateKeySecret }} - items: - - key: CLOUDFRONT_KEY_DATA - path: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.registry.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.registry.priorityClassName }} - priorityClassName: {{ .Values.registry.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/registry/registry-pvc.yaml b/charts/harbor/harbor/1.13.0/templates/registry/registry-pvc.yaml deleted file mode 100644 index 2112e22877..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/registry/registry-pvc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.persistence.enabled }} -{{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} -{{- if and (not $registry.existingClaim) (eq .Values.persistence.imageChartStorage.type "filesystem") }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.registry" . }} - annotations: - {{- range $key, $value := $registry.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - accessModes: - - {{ $registry.accessMode }} - resources: - requests: - storage: {{ $registry.size }} - {{- if $registry.storageClass }} - {{- if eq "-" $registry.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $registry.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/registry/registry-secret.yaml b/charts/harbor/harbor/1.13.0/templates/registry/registry-secret.yaml deleted file mode 100644 index 529462906e..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/registry/registry-secret.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.redis.external.existingSecret }} - REGISTRY_REDIS_PASSWORD: {{ include "harbor.redis.password" . | b64enc | quote }} - {{- end }} - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if and (eq $type "azure") (not $storage.azure.existingSecret) }} - REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }} - {{- else if and (and (eq $type "gcs") (not $storage.gcs.existingSecret)) (not $storage.gcs.useWorkloadIdentity) }} - GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }} - {{- else if eq $type "s3" }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.accesskey) }} - REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }} - {{- end }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.secretkey) }} - REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }} - {{- end }} - {{- else if eq $type "swift" }} - REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }} - {{- if $storage.swift.secretkey }} - REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }} - {{- end }} - {{- if $storage.swift.accesskey }} - REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }} - {{- end }} - {{- else if eq $type "oss" }} - REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }} - {{- end }} -{{- if not .Values.registry.credentials.existingSecret }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}-htpasswd" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if .Values.registry.credentials.htpasswdString }} - REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswdString | b64enc | quote }} - {{- else }} - REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/registry/registry-svc.yaml b/charts/harbor/harbor/1.13.0/templates/registry/registry-svc.yaml deleted file mode 100644 index 749690ea03..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/registry/registry-svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }} - port: {{ template "harbor.registry.servicePort" . }} - - - name: {{ ternary "https-controller" "http-controller" .Values.internalTLS.enabled }} - port: {{ template "harbor.registryctl.servicePort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.registry.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/registry/registry-tls.yaml b/charts/harbor/harbor/1.13.0/templates/registry/registry-tls.yaml deleted file mode 100644 index 9d1862c417..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/registry/registry-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.registry.crt\" is required!" .Values.internalTLS.registry.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.registry.key\" is required!" .Values.internalTLS.registry.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/registry/registryctl-cm.yaml b/charts/harbor/harbor/1.13.0/templates/registry/registryctl-cm.yaml deleted file mode 100644 index 87aa5ffe24..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/registry/registryctl-cm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- template "harbor.traceEnvsForRegistryCtl" . }} diff --git a/charts/harbor/harbor/1.13.0/templates/registry/registryctl-secret.yaml b/charts/harbor/harbor/1.13.0/templates/registry/registryctl-secret.yaml deleted file mode 100644 index 70097703e9..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/registry/registryctl-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- template "harbor.traceJaegerPassword" . }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.0/templates/trivy/trivy-secret.yaml b/charts/harbor/harbor/1.13.0/templates/trivy/trivy-secret.yaml deleted file mode 100644 index 84652c7498..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/trivy/trivy-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.trivy.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - redisURL: {{ include "harbor.redis.urlForTrivy" . | b64enc }} - gitHubToken: {{ .Values.trivy.gitHubToken | default "" | b64enc | quote }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/trivy/trivy-sts.yaml b/charts/harbor/harbor/1.13.0/templates/trivy/trivy-sts.yaml deleted file mode 100644 index aba23c9e8a..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/trivy/trivy-sts.yaml +++ /dev/null @@ -1,222 +0,0 @@ -{{- if .Values.trivy.enabled }} -{{- $trivy := .Values.persistence.persistentVolumeClaim.trivy }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: trivy -spec: - replicas: {{ .Values.trivy.replicas }} - serviceName: {{ template "harbor.trivy" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: trivy - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: trivy -{{- if .Values.trivy.podLabels }} -{{ toYaml .Values.trivy.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/trivy/trivy-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/trivy/trivy-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.trivy.podAnnotations }} -{{ toYaml .Values.trivy.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} -{{- end }} -{{- if .Values.trivy.serviceAccountName }} - serviceAccountName: {{ .Values.trivy.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }} -{{- with .Values.trivy.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: trivy -{{- end }} -{{- end }} - containers: - - name: trivy - image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - securityContext: - privileged: false - allowPrivilegeEscalation: false - env: - {{- if has "trivy" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - - name: "SCANNER_LOG_LEVEL" - value: {{ .Values.logLevel | quote }} - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: {{ .Values.trivy.debugMode | quote }} - - name: "SCANNER_TRIVY_VULN_TYPE" - value: {{ .Values.trivy.vulnType | quote }} - - name: "SCANNER_TRIVY_TIMEOUT" - value: {{ .Values.trivy.timeout | quote }} - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: {{ .Values.trivy.severity | quote }} - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: {{ .Values.trivy.ignoreUnfixed | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: {{ .Values.trivy.skipUpdate | default false | quote }} - - name: "SCANNER_TRIVY_OFFLINE_SCAN" - value: {{ .Values.trivy.offlineScan | default false | quote }} - - name: "SCANNER_TRIVY_SECURITY_CHECKS" - value: {{ .Values.trivy.securityCheck | quote }} - - name: "SCANNER_TRIVY_INSECURE" - value: {{ .Values.trivy.insecure | default false | quote }} - - name: SCANNER_API_SERVER_ADDR - value: ":{{ template "harbor.trivy.containerPort" . }}" - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: SCANNER_API_SERVER_TLS_KEY - value: /etc/harbor/ssl/trivy/tls.key - - name: SCANNER_API_SERVER_TLS_CERTIFICATE - value: /etc/harbor/ssl/trivy/tls.crt - {{- end }} - - name: "SCANNER_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL -{{- with .Values.trivy.extraEnvVars }} -{{- toYaml . | nindent 12 }} -{{- end }} - ports: - - name: api-server - containerPort: {{ template "harbor.trivy.containerPort" . }} - volumeMounts: - - name: data - mountPath: /home/scanner/.cache - subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} - readOnly: false - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - mountPath: /etc/harbor/ssl/trivy - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 10 }} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: -{{ toYaml .Values.trivy.resources | indent 12 }} - {{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }} - volumes: - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.trivy.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- if not .Values.persistence.enabled }} - - name: "data" - emptyDir: {} - {{- else if $trivy.existingClaim }} - - name: "data" - persistentVolumeClaim: - claimName: {{ $trivy.existingClaim }} - {{- end }} - {{- end }} - {{- with .Values.trivy.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.trivy.priorityClassName }} - priorityClassName: {{ .Values.trivy.priorityClassName }} - {{- end }} -{{- if and .Values.persistence.enabled (not $trivy.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $trivy.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $trivy.accessMode | quote }}] - {{- if $trivy.storageClass }} - {{- if (eq "-" $trivy.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $trivy.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $trivy.size | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/templates/trivy/trivy-svc.yaml b/charts/harbor/harbor/1.13.0/templates/trivy/trivy-svc.yaml deleted file mode 100644 index 24daf094e8..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/trivy/trivy-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{ if .Values.trivy.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.trivy" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-trivy" "http-trivy" .Values.internalTLS.enabled }} - protocol: TCP - port: {{ template "harbor.trivy.servicePort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: trivy -{{ end }} diff --git a/charts/harbor/harbor/1.13.0/templates/trivy/trivy-tls.yaml b/charts/harbor/harbor/1.13.0/templates/trivy/trivy-tls.yaml deleted file mode 100644 index a9c8330c37..0000000000 --- a/charts/harbor/harbor/1.13.0/templates/trivy/trivy-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.trivy.enabled .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.trivy.crt\" is required!" .Values.internalTLS.trivy.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.trivy.key\" is required!" .Values.internalTLS.trivy.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.0/values.yaml b/charts/harbor/harbor/1.13.0/values.yaml deleted file mode 100644 index 1160c94ebe..0000000000 --- a/charts/harbor/harbor/1.13.0/values.yaml +++ /dev/null @@ -1,962 +0,0 @@ -expose: - # Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" - # and fill the information in the corresponding section - type: ingress - tls: - # Enable TLS or not. - # Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" - # Note: if the "expose.type" is "ingress" and TLS is disabled, - # the port must be included in the command when pulling/pushing images. - # Refer to https://github.com/goharbor/harbor/issues/5291 for details. - enabled: true - # The source of the tls certificate. Set as "auto", "secret" - # or "none" and fill the information in the corresponding section - # 1) auto: generate the tls certificate automatically - # 2) secret: read the tls certificate from the specified secret. - # The tls certificate can be generated manually or by cert manager - # 3) none: configure no tls certificate for the ingress. If the default - # tls certificate is configured in the ingress controller, choose this option - certSource: auto - auto: - # The common name used to generate the certificate, it's necessary - # when the type isn't "ingress" - commonName: "" - secret: - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - secretName: "" - ingress: - hosts: - core: core.harbor.domain - # set to the type of ingress controller if it has specific requirements. - # leave as `default` for most ingress controllers. - # set to `gce` if using the GCE ingress controller - # set to `ncp` if using the NCP (NSX-T Container Plugin) ingress controller - # set to `alb` if using the ALB ingress controller - # set to `f5-bigip` if using the F5 BIG-IP ingress controller - controller: default - ## Allow .Capabilities.KubeVersion.Version to be overridden while creating ingress - kubeVersionOverride: "" - className: "" - annotations: - # note different ingress controllers may require a different ssl-redirect annotation - # for Envoy, use ingress.kubernetes.io/force-ssl-redirect: "true" and remove the nginx lines below - ingress.kubernetes.io/ssl-redirect: "true" - ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - harbor: - # harbor ingress-specific annotations - annotations: {} - # harbor ingress-specific labels - labels: {} - clusterIP: - # The name of ClusterIP service - name: harbor - # Annotations on the ClusterIP service - annotations: {} - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - nodePort: - # The name of NodePort service - name: harbor - ports: - http: - # The service port Harbor listens on when serving HTTP - port: 80 - # The node port Harbor listens on when serving HTTP - nodePort: 30002 - https: - # The service port Harbor listens on when serving HTTPS - port: 443 - # The node port Harbor listens on when serving HTTPS - nodePort: 30003 - loadBalancer: - # The name of LoadBalancer service - name: harbor - # Set the IP if the LoadBalancer supports assigning IP - IP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - annotations: {} - sourceRanges: [] - -# The external URL for Harbor core service. It is used to -# 1) populate the docker/helm commands showed on portal -# 2) populate the token service URL returned to docker client -# -# Format: protocol://domain[:port]. Usually: -# 1) if "expose.type" is "ingress", the "domain" should be -# the value of "expose.ingress.hosts.core" -# 2) if "expose.type" is "clusterIP", the "domain" should be -# the value of "expose.clusterIP.name" -# 3) if "expose.type" is "nodePort", the "domain" should be -# the IP address of k8s node -# -# If Harbor is deployed behind the proxy, set it as the URL of proxy -externalURL: https://core.harbor.domain - -# The internal TLS used for harbor components secure communicating. In order to enable https -# in each component tls cert files need to provided in advance. -internalTLS: - # If internal TLS enabled - enabled: false - # enable strong ssl ciphers (default: false) - strong_ssl_ciphers: false - # There are three ways to provide tls - # 1) "auto" will generate cert automatically - # 2) "manual" need provide cert file manually in following value - # 3) "secret" internal certificates from secret - certSource: "auto" - # The content of trust ca, only available when `certSource` is "manual" - trustCa: "" - # core related cert configuration - core: - # secret name for core's tls certs - secretName: "" - # Content of core's TLS cert file, only available when `certSource` is "manual" - crt: "" - # Content of core's TLS key file, only available when `certSource` is "manual" - key: "" - # jobservice related cert configuration - jobservice: - # secret name for jobservice's tls certs - secretName: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - key: "" - # registry related cert configuration - registry: - # secret name for registry's tls certs - secretName: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - key: "" - # portal related cert configuration - portal: - # secret name for portal's tls certs - secretName: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - key: "" - # trivy related cert configuration - trivy: - # secret name for trivy's tls certs - secretName: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - key: "" - -ipFamily: - # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component - ipv6: - enabled: true - # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component - ipv4: - enabled: true - -# The persistence is enabled by default and a default StorageClass -# is needed in the k8s cluster to provision volumes dynamically. -# Specify another StorageClass in the "storageClass" or set "existingClaim" -# if you already have existing persistent volumes to use -# -# For storing images and charts, you can also use "azure", "gcs", "s3", -# "swift" or "oss". Set it in the "imageChartStorage" section -persistence: - enabled: true - # Setting it to "keep" to avoid removing PVCs during a helm delete - # operation. Leaving it empty will delete PVCs after the chart deleted - # (this does not apply for PVCs that are created for internal database - # and redis components, i.e. they are never deleted automatically) - resourcePolicy: "keep" - persistentVolumeClaim: - registry: - # Use the existing PVC which must be created manually before bound, - # and specify the "subPath" if the PVC is shared with other components - existingClaim: "" - # Specify the "storageClass" used to provision the volume. Or the default - # StorageClass will be used (the default). - # Set it to "-" to disable dynamic provisioning - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - jobservice: - jobLog: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external database is used, the following settings for database will - # be ignored - database: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external Redis is used, the following settings for Redis will - # be ignored - redis: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - trivy: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - # Define which storage backend is used for registry to store - # images and charts. Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#storage - # for the detail. - imageChartStorage: - # Specify whether to disable `redirect` for images and chart storage, for - # backends which not supported it (such as using minio for `s3` storage type), please disable - # it. To disable redirects, simply set `disableredirect` to `true` instead. - # Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#redirect - # for the detail. - disableredirect: false - # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate. - # The secret must contain keys named "ca.crt" which will be injected into the trust store - # of registry's containers. - # caBundleSecretName: - - # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift", - # "oss" and fill the information needed in the corresponding section. The type - # must be "filesystem" if you want to use persistent volumes for registry - type: filesystem - filesystem: - rootdirectory: /storage - #maxthreads: 100 - azure: - accountname: accountname - accountkey: base64encodedaccountkey - container: containername - #realm: core.windows.net - # To use existing secret, the key must be AZURE_STORAGE_ACCESS_KEY - existingSecret: "" - gcs: - bucket: bucketname - # The base64 encoded json file which contains the key - encodedkey: base64-encoded-json-key-file - #rootdirectory: /gcs/object/name/prefix - #chunksize: "5242880" - # To use existing secret, the key must be GCS_KEY_DATA - existingSecret: "" - useWorkloadIdentity: false - s3: - # Set an existing secret for S3 accesskey and secretkey - # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry - #existingSecret: "" - region: us-west-1 - bucket: bucketname - #accesskey: awsaccesskey - #secretkey: awssecretkey - #regionendpoint: http://myobjects.local - #encrypt: false - #keyid: mykeyid - #secure: true - #skipverify: false - #v4auth: true - #chunksize: "5242880" - #rootdirectory: /s3/object/name/prefix - #storageclass: STANDARD - #multipartcopychunksize: "33554432" - #multipartcopymaxconcurrency: 100 - #multipartcopythresholdsize: "33554432" - swift: - authurl: https://storage.myprovider.com/v3/auth - username: username - password: password - container: containername - #region: fr - #tenant: tenantname - #tenantid: tenantid - #domain: domainname - #domainid: domainid - #trustid: trustid - #insecureskipverify: false - #chunksize: 5M - #prefix: - #secretkey: secretkey - #accesskey: accesskey - #authversion: 3 - #endpointtype: public - #tempurlcontainerkey: false - #tempurlmethods: - oss: - accesskeyid: accesskeyid - accesskeysecret: accesskeysecret - region: regionname - bucket: bucketname - #endpoint: endpoint - #internal: false - #encrypt: false - #secure: true - #chunksize: 10M - #rootdirectory: rootdirectory - -imagePullPolicy: IfNotPresent - -# Use this set to assign a list of default pullSecrets -imagePullSecrets: -# - name: docker-registry-secret -# - name: internal-registry-secret - -# The update strategy for deployments with persistent volumes(jobservice, registry): "RollingUpdate" or "Recreate" -# Set it as "Recreate" when "RWM" for volumes isn't supported -updateStrategy: - type: RollingUpdate - -# debug, info, warning, error or fatal -logLevel: info - -# The initial password of Harbor admin. Change it from portal after launching Harbor -# or give an existing secret for it -# key in secret is given via (default to HARBOR_ADMIN_PASSWORD) -# existingSecretAdminPassword: -existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD -harborAdminPassword: "Harbor12345" - -# The name of the secret which contains key named "ca.crt". Setting this enables the -# download link on portal to download the CA certificate when the certificate isn't -# generated automatically -caSecretName: "" - -# The secret key used for encryption. Must be a string of 16 chars. -secretKey: "not-a-secure-key" -# If using existingSecretSecretKey, the key must be secretKey -existingSecretSecretKey: "" - -# The proxy settings for updating trivy vulnerabilities from the Internet and replicating -# artifacts from/to the registries that cannot be reached directly -proxy: - httpProxy: - httpsProxy: - noProxy: 127.0.0.1,localhost,.local,.internal - components: - - core - - jobservice - - trivy - -# Run the migration job via helm hook -enableMigrateHelmHook: false - -# The custom ca bundle secret, the secret must contain key named "ca.crt" -# which will be injected into the trust store for core, jobservice, registry, trivy components -# caBundleSecretName: "" - -## UAA Authentication Options -# If you're using UAA for authentication behind a self-signed -# certificate you will need to provide the CA Cert. -# Set uaaSecretName below to provide a pre-created secret that -# contains a base64 encoded CA Certificate named `ca.crt`. -# uaaSecretName: - -# If service exposed via "ingress", the Nginx will not be used -nginx: - image: - repository: goharbor/nginx-photon - tag: v2.9.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -portal: - image: - repository: goharbor/harbor-portal - tag: v2.9.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -core: - image: - repository: goharbor/harbor-core - tag: v2.9.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - ## Startup probe values - startupProbe: - enabled: true - initialDelaySeconds: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## User settings configuration json string - configureUserSettings: - # The provider for updating project quota(usage), there are 2 options, redis or db. - # By default it is implemented by db but you can configure it to redis which - # can improve the performance of high concurrent pushing to the same project, - # and reduce the database connections spike and occupies. - # Using redis will bring up some delay for quota usage updation for display, so only - # suggest switch provider to redis if you were ran into the db connections spike around - # the scenario of high concurrent pushing to same project, no improvment for other scenes. - quotaUpdateProvider: db # Or redis - # Secret is used when core server communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Fill in the name of a kubernetes secret if you want to use your own - # TLS certificate and private key for token encryption/decryption. - # The secret must contain keys named: - # "tls.key" - the private key - # "tls.crt" - the certificate - secretName: "" - # If not specifying a preexisting secret, a secret can be created from tokenKey and tokenCert and used instead. - # If none of secretName, tokenKey, and tokenCert are specified, an ephemeral key and certificate will be autogenerated. - # tokenKey and tokenCert must BOTH be set or BOTH unset. - # The tokenKey value is formatted as a multiline string containing a PEM-encoded RSA key, indented one more than tokenKey on the following line. - tokenKey: | - # If tokenKey is set, the value of tokenCert must be set as a PEM-encoded certificate signed by tokenKey, and supplied as a multiline string, indented one more than tokenCert on the following line. - tokenCert: | - # The XSRF key. Will be generated automatically if it isn't specified - xsrfKey: "" - ## The priority class to run the pod as - priorityClassName: - # The time duration for async update artifact pull_time and repository - # pull_count, the unit is second. Will be 10 seconds if it isn't set. - # eg. artifactPullAsyncFlushDuration: 10 - artifactPullAsyncFlushDuration: - gdpr: - deleteUser: false - -jobservice: - image: - repository: goharbor/harbor-jobservice - tag: v2.9.0 - replicas: 1 - revisionHistoryLimit: 10 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - maxJobWorkers: 10 - # The logger for jobs: "file", "database" or "stdout" - jobLoggers: - - file - # - database - # - stdout - # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days - notification: - webhook_job_max_retry: 3 - webhook_job_http_client_timeout: 3 # in seconds - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: 24 - # the max time for execution in running state without new task created - max_dangling_hours: 168 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - # Secret is used when job service communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - ## The priority class to run the pod as - priorityClassName: - -registry: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - registry: - image: - repository: goharbor/registry-photon - tag: v2.9.0 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - controller: - image: - repository: goharbor/harbor-registryctl - tag: v2.9.0 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - replicas: 1 - revisionHistoryLimit: 10 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # Secret is used to secure the upload state from client - # and registry storage backend. - # See: https://github.com/distribution/distribution/blob/main/docs/configuration.md#http - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. - relativeurls: false - credentials: - username: "harbor_registry_user" - password: "harbor_registry_password" - # If using existingSecret, the key must be REGISTRY_PASSWD and REGISTRY_HTPASSWD - existingSecret: "" - # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. - # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string - middleware: - enabled: false - type: cloudFront - cloudFront: - baseurl: example.cloudfront.net - keypairid: KEYPAIRID - duration: 3000s - ipfilteredby: none - # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key - # that allows access to CloudFront - privateKeySecret: "my-secret" - # enable purge _upload directories - upload_purging: - enabled: true - # remove files in _upload directories which exist for a period of time, default is one week. - age: 168h - # the interval of the purge operations - interval: 24h - dryrun: false - -trivy: - # enabled the flag to enable Trivy scanner - enabled: true - image: - # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon - # tag the tag for Trivy adapter image - tag: v2.9.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # replicas the number of Pod replicas - replicas: 1 - # debugMode the flag to enable Trivy debug mode with more verbose scanning log - debugMode: false - # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`. - vulnType: "os,library" - # severity a comma-separated list of severities to be checked - severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - # ignoreUnfixed the flag to display only fixed vulnerabilities - ignoreUnfixed: false - # insecure the flag to skip verifying registry certificate - insecure: false - # gitHubToken the GitHub access token to download Trivy DB - # - # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases. - # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached - # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update - # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one. - # Currently, the database is updated every 12 hours and published as a new release to GitHub. - # - # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough - # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000 - # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult - # https://developer.github.com/v3/#rate-limiting - # - # You can create a GitHub token by following the instructions in - # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - gitHubToken: "" - # skipUpdate the flag to disable Trivy DB downloads from GitHub - # - # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues. - # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the - # `/home/scanner/.cache/trivy/db/trivy.db` path. - skipUpdate: false - # The offlineScan option prevents Trivy from sending API requests to identify dependencies. - # - # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it. - # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't - # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode. - # It would work if all the dependencies are in local. - # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment. - offlineScan: false - # Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. Defaults to `vuln`. - securityCheck: "vuln" - # The duration to wait for scan completion - timeout: 5m0s - resources: - requests: - cpu: 200m - memory: 512Mi - limits: - cpu: 1 - memory: 1Gi - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -database: - # if external database is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-db - tag: v2.9.0 - # The initial superuser password for internal database - password: "changeit" - # The size limit for Shared memory, pgSQL use it for shared_buffer - # More details see: - # https://github.com/goharbor/harbor/issues/15034 - shmSizeLimit: 512Mi - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - # The timeout used in livenessProbe; 1 to 5 seconds - livenessProbe: - timeoutSeconds: 1 - # The timeout used in readinessProbe; 1 to 5 seconds - readinessProbe: - timeoutSeconds: 1 - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - initContainer: - migrator: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - permissions: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - external: - host: "192.168.0.1" - port: "5432" - username: "user" - password: "password" - coreDatabase: "registry" - # if using existing secret, the key must be "password" - existingSecret: "" - # "disable" - No SSL - # "require" - Always SSL (skip verification) - # "verify-ca" - Always SSL (verify that the certificate presented by the - # server was signed by a trusted CA) - # "verify-full" - Always SSL (verify that the certification presented by the - # server was signed by a trusted CA and the server host name matches the one - # in the certificate) - sslmode: "disable" - # The maximum number of connections in the idle connection pool per pod (core+exporter). - # If it <=0, no idle connections are retained. - maxIdleConns: 100 - # The maximum number of open connections to the database per pod (core+exporter). - # If it <= 0, then there is no limit on the number of open connections. - # Note: the default number of connections is 1024 for postgre of harbor. - maxOpenConns: 900 - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -redis: - # if external Redis is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/redis-photon - tag: v2.9.0 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # # jobserviceDatabaseIndex defaults to "1" - # # registryDatabaseIndex defaults to "2" - # # trivyAdapterIndex defaults to "5" - # # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - external: - # support redis, redis+sentinel - # addr for redis: : - # addr for redis+sentinel: :,:,: - addr: "192.168.0.2:6379" - # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel - sentinelMasterSet: "" - # The "coreDatabaseIndex" must be "0" as the library Harbor - # used doesn't support configuring it - # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - coreDatabaseIndex: "0" - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - # username field can be an empty string, and it will be authenticated against the default user - username: "" - password: "" - # If using existingSecret, the key must be REDIS_PASSWORD - existingSecret: "" - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -exporter: - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-exporter - tag: v2.9.0 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - cacheDuration: 23 - cacheCleanInterval: 14400 - ## The priority class to run the pod as - priorityClassName: - -metrics: - enabled: false - core: - path: /metrics - port: 8001 - registry: - path: /metrics - port: 8001 - jobservice: - path: /metrics - port: 8001 - exporter: - path: /metrics - port: 8001 - ## Create prometheus serviceMonitor to scrape harbor metrics. - ## This requires the monitoring.coreos.com/v1 CRD. Please see - ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md - ## - serviceMonitor: - enabled: false - additionalLabels: {} - # Scrape interval. If not set, the Prometheus default scrape interval is used. - interval: "" - # Metric relabel configs to apply to samples before ingestion. - metricRelabelings: - [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - # Relabel configs to apply to samples before ingestion. - relabelings: - [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] - # separator: ; - # regex: ^(.*)$ - # targetLabel: nodename - # replacement: $1 - # action: replace - -trace: - enabled: false - # trace provider: jaeger or otel - # jaeger should be 1.26+ - provider: jaeger - # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth - sample_rate: 1 - # namespace used to differentiate different harbor services - # namespace: - # attributes is a key value dict contains user defined attributes used to initialize trace provider - # attributes: - # application: harbor - jaeger: - # jaeger supports two modes: - # collector mode(uncomment endpoint and uncomment username, password if needed) - # agent mode(uncomment agent_host and agent_port) - endpoint: http://hostname:14268/api/traces - # username: - # password: - # agent_host: hostname - # export trace data by jaeger.thrift in compact mode - # agent_port: 6831 - otel: - endpoint: hostname:4318 - url_path: /v1/traces - compression: false - insecure: true - # timeout is in seconds - timeout: 10 - -# cache layer configurations -# if this feature enabled, harbor will cache the resource -# `project/project_metadata/repository/artifact/manifest` in the redis -# which help to improve the performance of high concurrent pulling manifest. -cache: - # default is not enabled. - enabled: false - # default keep cache for one day. - expireHours: 24 diff --git a/charts/harbor/harbor/1.13.1/.helmignore b/charts/harbor/harbor/1.13.1/.helmignore deleted file mode 100644 index b4424fd59b..0000000000 --- a/charts/harbor/harbor/1.13.1/.helmignore +++ /dev/null @@ -1,6 +0,0 @@ -.github/* -docs/* -.git/* -.gitignore -CONTRIBUTING.md -test/* \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/Chart.yaml b/charts/harbor/harbor/1.13.1/Chart.yaml deleted file mode 100644 index 1203998e16..0000000000 --- a/charts/harbor/harbor/1.13.1/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor -apiVersion: v1 -appVersion: 2.9.1 -description: An open source trusted cloud native registry that stores, signs, and - scans content -home: https://goharbor.io -icon: https://raw.githubusercontent.com/goharbor/website/main/static/img/logos/harbor-icon-color.png -keywords: -- docker -- registry -- harbor -maintainers: -- email: yinw@vmware.com - name: Wenkai Yin -- email: hweiwei@vmware.com - name: Weiwei He -- email: yshengwen@vmware.com - name: Shengwen Yu -name: harbor -sources: -- https://github.com/goharbor/harbor -- https://github.com/goharbor/harbor-helm -version: 1.13.1 diff --git a/charts/harbor/harbor/1.13.1/LICENSE b/charts/harbor/harbor/1.13.1/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/charts/harbor/harbor/1.13.1/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/charts/harbor/harbor/1.13.1/README.md b/charts/harbor/harbor/1.13.1/README.md deleted file mode 100644 index f30598cc00..0000000000 --- a/charts/harbor/harbor/1.13.1/README.md +++ /dev/null @@ -1,407 +0,0 @@ -# Helm Chart for Harbor - -**Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be found [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. - -This repository, including the issues, focuses on deploying Harbor chart via helm. For functionality issues or Harbor questions, please open issues on [goharbor/harbor](https://github.com/goharbor/harbor) - -## Introduction - -This [Helm](https://github.com/kubernetes/helm) chart installs [Harbor](https://github.com/goharbor/harbor) in a Kubernetes cluster. Welcome to [contribute](CONTRIBUTING.md) to Helm Chart for Harbor. - -## Prerequisites - -- Kubernetes cluster 1.20+ -- Helm v3.2.0+ - -## Installation - -### Add Helm repository - -```bash -helm repo add harbor https://helm.goharbor.io -``` - -### Configure the chart - -The following items can be set via `--set` flag during installation or configured by editing the `values.yaml` directly (need to download the chart first). - -#### Configure how to expose Harbor service - -- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. - **Notes:** if TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to issue [#5291](https://github.com/goharbor/harbor/issues/5291) for details. -- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. -- **NodePort**: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. -- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. - -#### Configure the external URL - -The external URL for Harbor core service is used to: - -1. populate the docker/helm commands showed on portal -2. populate the token service URL returned to docker client - -Format: `protocol://domain[:port]`. Usually: - -- if service exposed via `Ingress`, the `domain` should be the value of `expose.ingress.hosts.core` -- if service exposed via `ClusterIP`, the `domain` should be the value of `expose.clusterIP.name` -- if service exposed via `NodePort`, the `domain` should be the IP address of one Kubernetes node -- if service exposed via `LoadBalancer`, set the `domain` as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider - -If Harbor is deployed behind the proxy, set it as the URL of proxy. - -#### Configure how to persist data - -- **Disable**: The data does not survive the termination of a pod. -- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you already have existing persistent volumes to use. -- **External Storage(only for images and charts)**: For images and charts, the external storages are supported: `azure`, `gcs`, `s3` `swift` and `oss`. - -#### Configure the other items listed in [configuration](#configuration) section - -### Install the chart - -Install the Harbor helm chart with a release name `my-release`: -```bash -helm install my-release harbor/harbor -``` - -## Uninstallation - -To uninstall/delete the `my-release` deployment: -```bash -helm uninstall my-release -``` - -## Configuration - -The following table lists the configurable parameters of the Harbor chart and the default values. - -| Parameter | Description | Default | -| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| **Expose** | | | -| `expose.type` | How to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` | -| `expose.tls.enabled` | Enable TLS or not. Delete the `ssl-redirect` annotations in `expose.ingress.annotations` when TLS is disabled and `expose.type` is `ingress`. Note: if the `expose.type` is `ingress` and TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to https://github.com/goharbor/harbor/issues/5291 for details. | `true` | -| `expose.tls.certSource` | The source of the TLS certificate. Set as `auto`, `secret` or `none` and fill the information in the corresponding section: 1) auto: generate the TLS certificate automatically 2) secret: read the TLS certificate from the specified secret. The TLS certificate can be generated manually or by cert manager 3) none: configure no TLS certificate for the ingress. If the default TLS certificate is configured in the ingress controller, choose this option | `auto` | -| `expose.tls.auto.commonName` | The common name used to generate the certificate, it's necessary when the type isn't `ingress` | | -| `expose.tls.secret.secretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key | | -| `expose.ingress.hosts.core` | The host of Harbor core service in ingress rule | `core.harbor.domain` | -| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce`, `alb`, `f5-bigip` and `ncp` | `default` | -| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | | -| `expose.ingress.annotations` | The annotations used commonly for ingresses | | -| `expose.ingress.harbor.annotations` | The annotations specific to harbor ingress | {} | -| `expose.ingress.harbor.labels` | The labels specific to harbor ingress | {} | -| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` | -| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} | -| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.clusterIP.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.name` | The name of NodePort service | `harbor` | -| `expose.nodePort.ports.http.port` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.nodePort.ports.http.nodePort` | The node port Harbor listens on when serving HTTP | `30002` | -| `expose.nodePort.ports.https.port` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.ports.https.nodePort` | The node port Harbor listens on when serving HTTPS | `30003` | -| `expose.loadBalancer.name` | The name of service | `harbor` | -| `expose.loadBalancer.IP` | The IP of the loadBalancer. It only works when loadBalancer supports assigning IP | `""` | -| `expose.loadBalancer.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.loadBalancer.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `30002` | -| `expose.loadBalancer.annotations` | The annotations attached to the loadBalancer service | {} | -| `expose.loadBalancer.sourceRanges` | List of IP address ranges to assign to loadBalancerSourceRanges | [] | -| **Internal TLS** | | | -| `internalTLS.enabled` | Enable TLS for the components (core, jobservice, portal, registry, trivy) | `false` | -| `internalTLS.strong_ssl_ciphers` | Enable strong ssl ciphers for nginx and portal | `false` -| `internalTLS.certSource` | Method to provide TLS for the components, options are `auto`, `manual`, `secret`. | `auto` | -| `internalTLS.trustCa` | The content of trust CA, only available when `certSource` is `manual`. **Note**: all the internal certificates of the components must be issued by this CA | | -| `internalTLS.core.secretName` | The secret name for core component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.core.crt` | Content of core's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.core.key` | Content of core's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.secretName` | The secret name for jobservice component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.jobservice.crt` | Content of jobservice's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.key` | Content of jobservice's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.registry.secretName` | The secret name for registry component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.registry.crt` | Content of registry's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.registry.key` | Content of registry's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.portal.secretName` | The secret name for portal component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.portal.crt` | Content of portal's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.portal.key` | Content of portal's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.secretName` | The secret name for trivy component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.trivy.crt` | Content of trivy's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.key` | Content of trivy's TLS key file, only available when `certSource` is `manual` | | -| **IPFamily** | | | -| `ipFamily.ipv4.enabled` | if cluster is ipv4 enabled, all ipv4 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| `ipFamily.ipv6.enabled` | if cluster is ipv6 enabled, all ipv6 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| **Persistence** | | | -| `persistence.enabled` | Enable the data persistence or not | `true` | -| `persistence.resourcePolicy` | Setting it to `keep` to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted. Does not affect PVCs created for internal database and redis components. | `keep` | -| `persistence.persistentVolumeClaim.registry.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.registry.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.registry.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.registry.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.registry.size` | The size of the volume | `5Gi` | -| `persistence.persistentVolumeClaim.registry.annotations` | The annotations of the volume | | -|`persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.database.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.subPath` | The sub path used in the volume. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.accessMode` | The access mode of the volume. If external database is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.database.size` | The size of the volume. If external database is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.database.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.redis.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.subPath` | The sub path used in the volume. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.accessMode` | The access mode of the volume. If external Redis is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.redis.size` | The size of the volume. If external Redis is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.redis.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.trivy.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.trivy.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.trivy.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.trivy.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.trivy.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.trivy.annotations` | The annotations of the volume | | -| `persistence.imageChartStorage.disableredirect` | The configuration for managing redirects from content backends. For backends which not supported it (such as using minio for `s3` storage type), please set it to `true` to disable redirects. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect) for more details | `false` | -| `persistence.imageChartStorage.caBundleSecretName` | Specify the `caBundleSecretName` if the storage service uses a self-signed certificate. The secret must contain keys named `ca.crt` which will be injected into the trust store of registry's and containers. | | -| `persistence.imageChartStorage.type` | The type of storage for images and charts: `filesystem`, `azure`, `gcs`, `s3`, `swift` or `oss`. The type must be `filesystem` if you want to use persistent volumes for registry. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#storage) for more details | `filesystem` | -| `persistence.imageChartStorage.gcs.existingSecret` | An existing secret containing the gcs service account json key. The key must be gcs-key.json. | `""` | -| `persistence.imageChartStorage.gcs.useWorkloadIdentity` | A boolean to allow the use of workloadidentity in a GKE cluster. To use it, create a kubernetes service account and set the name in the key `serviceAccountName` of each component, then allow automounting the service account. | `false` | -| **General** | | | -| `externalURL` | The external URL for Harbor core service | `https://core.harbor.domain` | -| `caBundleSecretName` | The custom CA bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for core, jobservice, registry, trivy components. | | -| `uaaSecretName` | If using external UAA auth which has a self signed cert, you can provide a pre-created secret containing it under the key `ca.crt`. | | -| `imagePullPolicy` | The image pull policy | | -| `imagePullSecrets` | The imagePullSecrets names for all deployments | | -| `updateStrategy.type` | The update strategy for deployments with persistent volumes(jobservice, registry): `RollingUpdate` or `Recreate`. Set it as `Recreate` when `RWM` for volumes isn't supported | `RollingUpdate` | -| `logLevel` | The log level: `debug`, `info`, `warning`, `error` or `fatal` | `info` | -| `harborAdminPassword` | The initial password of Harbor admin. Change it from portal after launching Harbor | `Harbor12345` | -| `existingSecretAdminPassword` | The name of secret where admin password can be found. | | -| `existingSecretAdminPasswordKey` | The name of the key in the secret where to find harbor admin password Harbor | `HARBOR_ADMIN_PASSWORD` | -| `caSecretName` | The name of the secret which contains key named `ca.crt`. Setting this enables the download link on portal to download the CA certificate when the certificate isn't generated automatically | | -| `secretKey` | The key used for encryption. Must be a string of 16 chars | `not-a-secure-key` | -| `existingSecretSecretKey` | An existing secret containing the encoding secretKey | `""` | -| `proxy.httpProxy` | The URL of the HTTP proxy server | | -| `proxy.httpsProxy` | The URL of the HTTPS proxy server | | -| `proxy.noProxy` | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal | -| `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | -| `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | -| **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | -| `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | -| `nginx.image.tag` | Image tag | `dev` | -| `nginx.replicas` | The replica count | `1` | -| `nginx.revisionHistoryLimit` | The revision history limit | `10` | -| `nginx.resources` | The [resources] to allocate for container | undefined | -| `nginx.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `nginx.nodeSelector` | Node labels for pod assignment | `{}` | -| `nginx.tolerations` | Tolerations for pod assignment | `[]` | -| `nginx.affinity` | Node/Pod affinities | `{}` | -| `nginx.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | -| `nginx.priorityClassName` | The priority class to run the pod as | | -| **Portal** | | | -| `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | -| `portal.image.tag` | Tag for portal image | `dev` | -| `portal.replicas` | The replica count | `1` | -| `portal.revisionHistoryLimit` | The revision history limit | `10` | -| `portal.resources` | The [resources] to allocate for container | undefined | -| `portal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `portal.nodeSelector` | Node labels for pod assignment | `{}` | -| `portal.tolerations` | Tolerations for pod assignment | `[]` | -| `portal.affinity` | Node/Pod affinities | `{}` | -| `portal.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` | -| `portal.priorityClassName` | The priority class to run the pod as | | -| **Core** | | | -| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | -| `core.image.tag` | Tag for Harbor core image | `dev` | -| `core.replicas` | The replica count | `1` | -| `core.revisionHistoryLimit` | The revision history limit | `10` | -| `core.startupProbe.initialDelaySeconds` | The initial delay in seconds for the startup probe | `10` | -| `core.resources` | The [resources] to allocate for container | undefined | -| `core.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `core.nodeSelector` | Node labels for pod assignment | `{}` | -| `core.tolerations` | Tolerations for pod assignment | `[]` | -| `core.affinity` | Node/Pod affinities | `{}` | -| `core.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `core.podAnnotations` | Annotations to add to the core pod | `{}` | -| `core.serviceAnnotations` | Annotations to add to the core service | `{}` | -| `core.configureUserSettings` | A JSON string to set in the environment variable `CONFIG_OVERWRITE_JSON` to configure user settings. See the [official docs](https://goharbor.io/docs/latest/install-config/configure-user-settings-cli/#configure-users-settings-using-an-environment-variable). | | -| `core.quotaUpdateProvider` | The provider for updating project quota(usage), there are 2 options, redis or db. By default it is implemented by db but you can configure it to redis which can improve the performance of high concurrent pushing to the same project, and reduce the database connections spike and occupies. Using redis will bring up some delay for quota usage updation for display, so only suggest switch provider to redis if you were ran into the db connections spike around the scenario of high concurrent pushing to same project, no improvment for other scenes. | `db` | -| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `core.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate and private key for token encryption/decryption. The secret must contain keys named: `tls.crt` - the certificate and `tls.key` - the private key. The default key pair will be used if it isn't set | | -| `core.tokenKey` | PEM-formatted RSA private key used to sign service tokens. Only used if `core.secretName` is unset. If set, `core.tokenCert` MUST also be set. | | -| `core.tokenCert` | PEM-formatted certificate signed by `core.tokenKey` used to validate service tokens. Only used if `core.secretName` is unset. If set, `core.tokenKey` MUST also be set. | | -| `core.xsrfKey` | The XSRF key. Will be generated automatically if it isn't specified | | -| `core.priorityClassName` | The priority class to run the pod as | | -| `core.artifactPullAsyncFlushDuration` | The time duration for async update artifact pull_time and repository pull_count | | -| `core.gdpr.deleteUser` | Enable GDPR compliant user delete | `false` | -| **Jobservice** | | | -| `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | -| `jobservice.image.tag` | Tag for jobservice image | `dev` | -| `jobservice.replicas` | The replica count | `1` | -| `jobservice.revisionHistoryLimit` | The revision history limit | `10` | -| `jobservice.maxJobWorkers` | The max job workers | `10` | -| `jobservice.jobLoggers` | The loggers for jobs: `file`, `database` or `stdout` | `[file]` | -| `jobservice.loggerSweeperDuration` | The jobLogger sweeper duration in days (ignored if `jobLoggers` is set to `stdout`) | `14` | -| `jobservice.notification.webhook_job_max_retry` | The maximum retry of webhook sending notifications | `3` | -| `jobservice.notification.webhook_job_http_client_timeout` | The http client timeout value of webhook sending notifications | `3` | -| `jobservice.reaper.max_update_hours` | the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 | `24` | -| `jobservice.reaper.max_dangling_hours` | the max time for execution in running state without new task created | `168` | -| `jobservice.resources` | The [resources] to allocate for container | undefined | -| `jobservice.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `jobservice.nodeSelector` | Node labels for pod assignment | `{}` | -| `jobservice.tolerations` | Tolerations for pod assignment | `[]` | -| `jobservice.affinity` | Node/Pod affinities | `{}` | -| `jobservice.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` | -| `jobservice.priorityClassName` | The priority class to run the pod as | | -| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| **Registry** | | | -| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | -| `registry.registry.image.tag` | Tag for registry image | `dev` | -| `registry.registry.resources` | The [resources] to allocate for container | undefined | -| `registry.controller.image.repository` | Repository for registry controller image | `goharbor/harbor-registryctl` | -| `registry.controller.image.tag` | Tag for registry controller image | `dev` | -| `registry.controller.resources` | The [resources] to allocate for container | undefined | -| `registry.replicas` | The replica count | `1` | -| `registry.revisionHistoryLimit` | The revision history limit | `10` | -| `registry.nodeSelector` | Node labels for pod assignment | `{}` | -| `registry.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `registry.tolerations` | Tolerations for pod assignment | `[]` | -| `registry.affinity` | Node/Pod affinities | `{}` | -| `registry.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | | -| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` | -| `registry.priorityClassName` | The priority class to run the pod as | | -| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `registry.credentials.username` | The username that harbor core uses internally to access the registry instance. Together with the `registry.credentials.password`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` | -| `registry.credentials.password` | The password that harbor core uses internally to access the registry instance. Together with the `registry.credentials.username`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). It is suggested you update this value before installation. | `harbor_registry_password` | -| `registry.credentials.existingSecret` | An existing secret containing the password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). The key must be `REGISTRY_PASSWD` | `""` | -| `registry.credentials.htpasswdString` | Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. | undefined | -| `registry.relativeurls` | If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. Needed if harbor is behind a reverse proxy | `false` | -| `registry.upload_purging.enabled` | If true, enable purge _upload directories | `true` | -| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` | -| `registry.upload_purging.interval` | The interval of the purge operations | `24h` | -| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` | -| **[Trivy][trivy]** | | | -| `trivy.enabled` | The flag to enable Trivy scanner | `true` | -| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` | -| `trivy.image.tag` | Tag for Trivy adapter image | `dev` | -| `trivy.resources` | The [resources] to allocate for Trivy adapter container | | -| `trivy.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `trivy.replicas` | The number of Pod replicas | `1` | -| `trivy.debugMode` | The flag to enable Trivy debug mode | `false` | -| `trivy.vulnType` | Comma-separated list of vulnerability types. Possible values `os` and `library`. | `os,library` | -| `trivy.severity` | Comma-separated list of severities to be checked | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | -| `trivy.ignoreUnfixed` | The flag to display only fixed vulnerabilities | `false` | -| `trivy.insecure` | The flag to skip verifying registry certificate | `false` | -| `trivy.skipUpdate` | The flag to disable [Trivy DB][trivy-db] downloads from GitHub | `false` | -| `trivy.offlineScan` | The flag prevents Trivy from sending API requests to identify dependencies. | `false` | -| `trivy.securityCheck` | Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. | `vuln` | -| `trivy.timeout` | The duration to wait for scan completion | `5m0s` | -| `trivy.gitHubToken` | The GitHub access token to download [Trivy DB][trivy-db] (see [GitHub rate limiting][trivy-rate-limiting]) | | -| `trivy.priorityClassName` | The priority class to run the pod as | | -| `trivy.topologySpreadConstraints` | The priority class to run the pod as | | -| **Database** | | | -| `database.type` | If external database is used, set it to `external` | `internal` | -| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` | -| `database.internal.image.tag` | Tag for database image | `dev` | -| `database.internal.password` | The password for database | `changeit` | -| `database.internal.shmSizeLimit` | The limit for the size of shared memory for internal PostgreSQL, conventionally it's around 50% of the memory limit of the container | `512Mi` | -| `database.internal.resources` | The [resources] to allocate for container | undefined | -| `database.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `database.internal.initContainer.migrator.resources` | The [resources] to allocate for the database migrator initContainer | undefined | -| `database.internal.initContainer.permissions.resources` | The [resources] to allocate for the database permissions initContainer | undefined | -| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `database.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `database.internal.affinity` | Node/Pod affinities | `{}` | -| `database.internal.priorityClassName` | The priority class to run the pod as | | -| `database.internal.livenessProbe.timeoutSeconds` | The timeout used in liveness probe; 1 to 5 seconds | 1 | -| `database.internal.readinessProbe.timeoutSeconds` | The timeout used in readiness probe; 1 to 5 seconds | 1 | -| `database.external.host` | The hostname of external database | `192.168.0.1` | -| `database.external.port` | The port of external database | `5432` | -| `database.external.username` | The username of external database | `user` | -| `database.external.password` | The password of external database | `password` | -| `database.external.coreDatabase` | The database used by core service | `registry` | -| `database.external.existingSecret` | An existing password containing the database password. the key must be `password`. | `""` | -| `database.external.sslmode` | Connection method of external database (require, verify-full, verify-ca, disable) | `disable` | -| `database.maxIdleConns` | The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained. | `50` | -| `database.maxOpenConns` | The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections. | `100` | -| `database.podAnnotations` | Annotations to add to the database pod | `{}` | -| **Redis** | | | -| `redis.type` | If external redis is used, set it to `external` | `internal` | -| `redis.internal.image.repository` | Repository for redis image | `goharbor/redis-photon` | -| `redis.internal.image.tag` | Tag for redis image | `dev` | -| `redis.internal.resources` | The [resources] to allocate for container | undefined | -| `redis.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `redis.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `redis.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `redis.internal.affinity` | Node/Pod affinities | `{}` | -| `redis.internal.priorityClassName` | The priority class to run the pod as | | -| `redis.internal.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.internal.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.internal.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.internal.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.internal.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.addr` | The addr of external Redis: :. When using sentinel, it should be :,:,: | `192.168.0.2:6379` | -| `redis.external.sentinelMasterSet` | The name of the set of Redis instances to monitor | | -| `redis.external.coreDatabaseIndex` | The database index for core | `0` | -| `redis.external.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.external.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.external.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.external.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.external.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.username` | The username of external Redis | | -| `redis.external.password` | The password of external Redis | | -| `redis.external.existingSecret` | Use an existing secret to connect to redis. The key must be `REDIS_PASSWORD`. | `""` | -| `redis.podAnnotations` | Annotations to add to the redis pod | `{}` | -| **Exporter** | | | -| `exporter.replicas` | The replica count | `1` | -| `exporter.revisionHistoryLimit` | The revision history limit | `10` | -| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` | -| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` | -| `exporter.image.tag` | Tag for exporter image | `dev` | -| `exporter.nodeSelector` | Node labels for pod assignment | `{}` | -| `exporter.tolerations` | Tolerations for pod assignment | `[]` | -| `exporter.affinity` | Node/Pod affinities | `{}` | -| `exporter.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `exporter.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `exporter.cacheDuration` | the cache duration for information that exporter collected from Harbor | `30` | -| `exporter.cacheCleanInterval` | cache clean interval for information that exporter collected from Harbor | `14400` | -| `exporter.priorityClassName` | The priority class to run the pod as | | -| **Metrics** | | | -| `metrics.enabled` | if enable harbor metrics | `false` | -| `metrics.core.path` | the url path for core metrics | `/metrics` | -| `metrics.core.port` | the port for core metrics | `8001` | -| `metrics.registry.path` | the url path for registry metrics | `/metrics` | -| `metrics.registry.port` | the port for registry metrics | `8001` | -| `metrics.exporter.path` | the url path for exporter metrics | `/metrics` | -| `metrics.exporter.port` | the port for exporter metrics | `8001` | -| `metrics.serviceMonitor.enabled` | create prometheus serviceMonitor. Requires prometheus CRD's | `false` | -| `metrics.serviceMonitor.additionalLabels` | additional labels to upsert to the manifest | `""` | -| `metrics.serviceMonitor.interval` | scrape period for harbor metrics | `""` | -| `metrics.serviceMonitor.metricRelabelings` | metrics relabel to add/mod/del before ingestion | `[]` | -| `metrics.serviceMonitor.relabelings` | relabels to add/mod/del to sample before scrape | `[]` | -| **Trace** | | | -| `trace.enabled` | Enable tracing or not | `false` | -| `trace.provider` | The tracing provider: `jaeger` or `otel`. `jaeger` should be 1.26+ | `jaeger` | -| `trace.sample_rate` | Set `sample_rate` to 1 if you want sampling 100% of trace data; set 0.5 if you want sampling 50% of trace data, and so forth | `1` | -| `trace.namespace` | Namespace used to differentiate different harbor services | | -| `trace.attributes` | `attributes` is a key value dict contains user defined attributes used to initialize trace provider | | -| `trace.jaeger.endpoint` | The endpoint of jaeger | `http://hostname:14268/api/traces` | -| `trace.jaeger.username` | The username of jaeger | | -| `trace.jaeger.password` | The password of jaeger | | -| `trace.jaeger.agent_host` | The agent host of jaeger | | -| `trace.jaeger.agent_port` | The agent port of jaeger | `6831` | -| `trace.otel.endpoint` | The endpoint of otel | `hostname:4318` | -| `trace.otel.url_path` | The URL path of otel | `/v1/traces` | -| `trace.otel.compression` | Whether enable compression or not for otel | `false` | -| `trace.otel.insecure` | Whether establish insecure connection or not for otel | `true` | -| `trace.otel.timeout` | The timeout in seconds of otel | `10` | -| **Cache** | | | -| `cache.enabled` | Enable cache layer or not | `false` | -| `cache.expireHours` | The expire hours of cache layer | `24` | - -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[trivy]: https://github.com/aquasecurity/trivy -[trivy-db]: https://github.com/aquasecurity/trivy-db -[trivy-rate-limiting]: https://github.com/aquasecurity/trivy#github-rate-limiting diff --git a/charts/harbor/harbor/1.13.1/templates/NOTES.txt b/charts/harbor/harbor/1.13.1/templates/NOTES.txt deleted file mode 100644 index 0980c08a35..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }} -For more details, please visit https://github.com/goharbor/harbor diff --git a/charts/harbor/harbor/1.13.1/templates/_helpers.tpl b/charts/harbor/harbor/1.13.1/templates/_helpers.tpl deleted file mode 100644 index 6ee24fee80..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/_helpers.tpl +++ /dev/null @@ -1,554 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "harbor.name" -}} -{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "harbor.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "harbor" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Helm required labels */}} -{{- define "harbor.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* matchLabels */}} -{{- define "harbor.matchLabels" -}} -release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{- define "harbor.autoGenCert" -}} - {{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForIngress" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (eq .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForNginx" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (ne .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.host" -}} - {{- if eq .Values.database.type "internal" -}} - {{- template "harbor.database" . }} - {{- else -}} - {{- .Values.database.external.host -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.port" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "5432" -}} - {{- else -}} - {{- .Values.database.external.port -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.username" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "postgres" -}} - {{- else -}} - {{- .Values.database.external.username -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.rawPassword" -}} - {{- if eq .Values.database.type "internal" -}} - {{- .Values.database.internal.password -}} - {{- else -}} - {{- .Values.database.external.password -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.escapedRawPassword" -}} - {{- include "harbor.database.rawPassword" . | urlquery | replace "+" "%20" -}} -{{- end -}} - -{{- define "harbor.database.encryptedPassword" -}} - {{- include "harbor.database.rawPassword" . | b64enc | quote -}} -{{- end -}} - -{{- define "harbor.database.coreDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "registry" -}} - {{- else -}} - {{- .Values.database.external.coreDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.sslmode" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "disable" -}} - {{- else -}} - {{- .Values.database.external.sslmode -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.redis.scheme" -}} - {{- with .Values.redis }} - {{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }} - {{- end }} -{{- end -}} - -/*host:port*/ -{{- define "harbor.redis.addr" -}} - {{- with .Values.redis }} - {{- ternary (printf "%s:6379" (include "harbor.redis" $ )) .external.addr (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.masterSet" -}} - {{- with .Values.redis }} - {{- ternary .external.sentinelMasterSet "" (eq "redis+sentinel" (include "harbor.redis.scheme" $)) }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.password" -}} - {{- with .Values.redis }} - {{- ternary "" .external.password (eq .type "internal") }} - {{- end }} -{{- end -}} - - -{{- define "harbor.redis.pwdfromsecret" -}} - {{- (lookup "v1" "Secret" .Release.Namespace (.Values.redis.external.existingSecret)).data.REDIS_PASSWORD | b64dec }} -{{- end -}} - -{{- define "harbor.redis.cred" -}} - {{- with .Values.redis }} - {{- if (and (eq .type "external" ) (.external.existingSecret)) }} - {{- printf ":%s@" (include "harbor.redis.pwdfromsecret" $) }} - {{- else }} - {{- ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }} - {{- end }} - {{- end }} -{{- end -}} - -/*scheme://[:password@]host:port[/master_set]*/ -{{- define "harbor.redis.url" -}} - {{- with .Values.redis }} - {{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }} - {{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) (include "harbor.redis.cred" $) (include "harbor.redis.addr" $) $path -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCore" -}} - {{- with .Values.redis }} - {{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index*/ -{{- define "harbor.redis.urlForJobservice" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.jobserviceDatabaseIndex .external.jobserviceDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForRegistry" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForTrivy" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.trivyAdapterIndex .external.trivyAdapterIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForHarbor" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.harborDatabaseIndex .external.harborDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCache" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.cacheLayerDatabaseIndex .external.cacheLayerDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.dbForRegistry" -}} - {{- with .Values.redis }} - {{- ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.noProxy" -}} - {{- printf "%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}} -{{- end -}} - -{{- define "harbor.caBundleVolume" -}} -- name: ca-bundle-certs - secret: - secretName: {{ .Values.caBundleSecretName }} -{{- end -}} - -{{- define "harbor.caBundleVolumeMount" -}} -- name: ca-bundle-certs - mountPath: /harbor_cust_cert/custom-ca.crt - subPath: ca.crt -{{- end -}} - -{{/* scheme for all components because it only support http mode */}} -{{- define "harbor.component.scheme" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "https" -}} - {{- else -}} - {{- printf "http" -}} - {{- end -}} -{{- end -}} - -{{/* core component container port */}} -{{- define "harbor.core.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* core component service port */}} -{{- define "harbor.core.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component container port */}} -{{- define "harbor.jobservice.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component service port */}} -{{- define "harbor.jobservice.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* portal component container port */}} -{{- define "harbor.portal.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* portal component service port */}} -{{- define "harbor.portal.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* registry component container port */}} -{{- define "harbor.registry.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registry component service port */}} -{{- define "harbor.registry.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component container port */}} -{{- define "harbor.registryctl.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component service port */}} -{{- define "harbor.registryctl.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component container port */}} -{{- define "harbor.trivy.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component service port */}} -{{- define "harbor.trivy.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* CORE_URL */}} -{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}} -{{- define "harbor.coreURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}} -{{- end -}} - -{{/* JOBSERVICE_URL */}} -{{- define "harbor.jobserviceURL" -}} - {{- printf "%s://%s-jobservice" (include "harbor.component.scheme" .) (include "harbor.fullname" .) -}} -{{- end -}} - -{{/* PORTAL_URL */}} -{{- define "harbor.portalURL" -}} - {{- printf "%s://%s" (include "harbor.component.scheme" .) (include "harbor.portal" .) -}} -{{- end -}} - -{{/* REGISTRY_URL */}} -{{- define "harbor.registryURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registry.servicePort" .) -}} -{{- end -}} - -{{/* REGISTRY_CONTROLLER_URL */}} -{{- define "harbor.registryControllerURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registryctl.servicePort" .) -}} -{{- end -}} - -{{/* TOKEN_SERVICE_URL */}} -{{- define "harbor.tokenServiceURL" -}} - {{- printf "%s/service/token" (include "harbor.coreURL" .) -}} -{{- end -}} - -{{/* TRIVY_ADAPTER_URL */}} -{{- define "harbor.trivyAdapterURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}} -{{- end -}} - -{{- define "harbor.internalTLS.core.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.core.secretName -}} - {{- else -}} - {{- printf "%s-core-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.jobservice.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.jobservice.secretName -}} - {{- else -}} - {{- printf "%s-jobservice-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.portal.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.portal.secretName -}} - {{- else -}} - {{- printf "%s-portal-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.registry.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.registry.secretName -}} - {{- else -}} - {{- printf "%s-registry-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.trivy.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.trivy.secretName -}} - {{- else -}} - {{- printf "%s-trivy-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsCoreSecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsSecretForNginx" -}} - {{- if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.nginx" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.metricsPortName" -}} - {{- if .Values.internalTLS.enabled }} - {{- printf "https-metrics" -}} - {{- else -}} - {{- printf "http-metrics" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.traceEnvs" -}} - TRACE_ENABLED: "{{ .Values.trace.enabled }}" - TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}" - TRACE_NAMESPACE: "{{ .Values.trace.namespace }}" - {{- if .Values.trace.attributes }} - TRACE_ATTRIBUTES: {{ .Values.trace.attributes | toJson | squote }} - {{- end }} - {{- if eq .Values.trace.provider "jaeger" }} - TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}" - TRACE_JAEGER_USERNAME: "{{ .Values.trace.jaeger.username }}" - TRACE_JAEGER_AGENT_HOSTNAME: "{{ .Values.trace.jaeger.agent_host }}" - TRACE_JAEGER_AGENT_PORT: "{{ .Values.trace.jaeger.agent_port }}" - {{- else }} - TRACE_OTEL_ENDPOINT: "{{ .Values.trace.otel.endpoint }}" - TRACE_OTEL_URL_PATH: "{{ .Values.trace.otel.url_path }}" - TRACE_OTEL_COMPRESSION: "{{ .Values.trace.otel.compression }}" - TRACE_OTEL_INSECURE: "{{ .Values.trace.otel.insecure }}" - TRACE_OTEL_TIMEOUT: "{{ .Values.trace.otel.timeout }}" - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForCore" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-core" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForJobservice" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-jobservice" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForRegistryCtl" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-registryctl" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceJaegerPassword" -}} - {{- if and .Values.trace.enabled (eq .Values.trace.provider "jaeger") }} - TRACE_JAEGER_PASSWORD: "{{ .Values.trace.jaeger.password | default "" | b64enc }}" - {{- end }} -{{- end -}} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "harbor.ingress.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/core/core-cm.yaml b/charts/harbor/harbor/1.13.1/templates/core/core-cm.yaml deleted file mode 100644 index 7d284c899d..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/core/core-cm.yaml +++ /dev/null @@ -1,87 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - app.conf: |+ - appname = Harbor - runmode = prod - enablegzip = true - - [prod] - httpport = {{ ternary "8443" "8080" .Values.internalTLS.enabled }} - PORT: "{{ ternary "8443" "8080" .Values.internalTLS.enabled }}" - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "{{ template "harbor.database.host" . }}" - POSTGRESQL_PORT: "{{ template "harbor.database.port" . }}" - POSTGRESQL_USERNAME: "{{ template "harbor.database.username" . }}" - POSTGRESQL_DATABASE: "{{ template "harbor.database.coreDatabase" . }}" - POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" - EXT_ENDPOINT: "{{ .Values.externalURL }}" - CORE_URL: "{{ template "harbor.coreURL" . }}" - JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - CORE_LOCAL_URL: "{{ ternary "https://127.0.0.1:8443" "http://127.0.0.1:8080" .Values.internalTLS.enabled }}" - WITH_TRIVY: {{ .Values.trivy.enabled | quote }} - TRIVY_ADAPTER_URL: "{{ template "harbor.trivyAdapterURL" . }}" - REGISTRY_STORAGE_PROVIDER_NAME: "{{ .Values.persistence.imageChartStorage.type }}" - LOG_LEVEL: "{{ .Values.logLevel }}" - CONFIG_PATH: "/etc/core/app.conf" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}" - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.harborDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.harborDatabaseIndex) }} - _REDIS_URL_HARBOR: "{{ template "harbor.redis.urlForHarbor" . }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} - PORTAL_URL: "{{ template "harbor.portalURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - {{- if .Values.uaaSecretName }} - UAA_CA_ROOT: "/etc/core/auth-ca/auth-ca.crt" - {{- end }} - {{- if has "core" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE: "docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory" - {{- if .Values.metrics.enabled}} - METRIC_ENABLE: "true" - METRIC_PATH: "{{ .Values.metrics.core.path }}" - METRIC_PORT: "{{ .Values.metrics.core.port }}" - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: core - {{- end }} - - {{- if hasKey .Values.core "gcTimeWindowHours" }} - #make the GC time window configurable for testing - GC_TIME_WINDOW_HOURS: "{{ .Values.core.gcTimeWindowHours }}" - {{- end }} - {{- template "harbor.traceEnvsForCore" . }} - - {{- if .Values.core.artifactPullAsyncFlushDuration | quote }} - ARTIFACT_PULL_ASYNC_FLUSH_DURATION: {{ .Values.core.artifactPullAsyncFlushDuration }} - {{- end }} - - {{- if .Values.core.gdpr}} - {{- if .Values.core.gdpr.deleteUser}} - GDPR_DELETE_USER: "true" - {{- end }} - {{- end }} - - {{- if .Values.cache.enabled }} - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - - {{- if .Values.core.quotaUpdateProvider }} - QUOTA_UPDATE_PROVIDER: "{{ .Values.core.quotaUpdateProvider }}" - {{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/core/core-dpl.yaml b/charts/harbor/harbor/1.13.1/templates/core/core-dpl.yaml deleted file mode 100644 index 8d202498db..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/core/core-dpl.yaml +++ /dev/null @@ -1,237 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: core -spec: - replicas: {{ .Values.core.replicas }} - revisionHistoryLimit: {{ .Values.core.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: core - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: core -{{- if .Values.core.podLabels }} -{{ toYaml .Values.core.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.core.podAnnotations }} -{{ toYaml .Values.core.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.core.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: core -{{- end }} -{{- end }} - containers: - - name: core - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if .Values.core.startupProbe.enabled }} - startupProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 360 - initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} - periodSeconds: 10 - {{- end }} - livenessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: "{{ template "harbor.jobservice" . }}" - key: JOBSERVICE_SECRET - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/core/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/core/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/core/ca.crt - {{- end }} - {{- if .Values.database.external.existingSecret }} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} -{{- with .Values.core.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - {{- if .Values.expose.tls.enabled }} - - name: ca-download - mountPath: /etc/core/ca - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - mountPath: /etc/core/auth-ca/auth-ca.crt - subPath: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - {{- end }} - - name: psc - mountPath: /etc/core/token - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} -{{- if .Values.core.resources }} - resources: -{{ toYaml .Values.core.resources | indent 10 }} -{{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - - name: secret-key - secret: - {{- if .Values.existingSecretSecretKey }} - secretName: {{ .Values.existingSecretSecretKey }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - items: - - key: secretKey - path: key - - name: token-service-private-key - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: ca-download - secret: - {{- if .Values.caSecretName }} - secretName: {{ .Values.caSecretName }} - {{- else if eq (include "harbor.autoGenCertForIngress" .) "true" }} - secretName: "{{ template "harbor.ingress" . }}" - {{- else if eq (include "harbor.autoGenCertForNginx" .) "true" }} - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - secret: - secretName: {{ .Values.uaaSecretName }} - items: - - key: ca.crt - path: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - - name: psc - emptyDir: {} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.core.priorityClassName }} - priorityClassName: {{ .Values.core.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/core/core-pre-upgrade-job.yaml b/charts/harbor/harbor/1.13.1/templates/core/core-pre-upgrade-job.yaml deleted file mode 100644 index 43c9d3596d..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/core/core-pre-upgrade-job.yaml +++ /dev/null @@ -1,74 +0,0 @@ -{{- if .Values.enableMigrateHelmHook }} -apiVersion: batch/v1 -kind: Job -metadata: - name: migration-job - labels: -{{ include "harbor.labels" . | indent 4 }} - component: migrator - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-5" -spec: - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: migrator - spec: - restartPolicy: Never - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 120 - containers: - - name: core-job - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/harbor/harbor_core", "-mode=migrate"] - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - {{- if .Values.database.external.existingSecret }} - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/core/core-secret.yaml b/charts/harbor/harbor/1.13.1/templates/core/core-secret.yaml deleted file mode 100644 index 23b352b475..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/core/core-secret.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.existingSecretSecretKey }} - secretKey: {{ .Values.secretKey | b64enc | quote }} - {{- end }} - secret: {{ .Values.core.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.core.secretName }} - {{- $ca := genCA "harbor-token-ca" 365 }} - tls.key: {{ .Values.core.tokenKey | default $ca.Key | b64enc | quote }} - tls.crt: {{ .Values.core.tokenCert | default $ca.Cert | b64enc | quote }} - {{- end }} - {{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} - {{- end }} - {{- if not .Values.database.external.existingSecret }} - POSTGRESQL_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - CSRF_KEY: {{ .Values.core.xsrfKey | default (randAlphaNum 32) | b64enc | quote }} -{{- if .Values.core.configureUserSettings }} - CONFIG_OVERWRITE_JSON: {{ .Values.core.configureUserSettings | b64enc | quote }} -{{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.13.1/templates/core/core-svc.yaml b/charts/harbor/harbor/1.13.1/templates/core/core-svc.yaml deleted file mode 100644 index 0d2cfb2915..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/core/core-svc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.core.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - name: {{ ternary "https-web" "http-web" .Values.internalTLS.enabled }} - port: {{ template "harbor.core.servicePort" . }} - targetPort: {{ template "harbor.core.containerPort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.core.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: core diff --git a/charts/harbor/harbor/1.13.1/templates/core/core-tls.yaml b/charts/harbor/harbor/1.13.1/templates/core/core-tls.yaml deleted file mode 100644 index c52148f0d9..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/core/core-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.core.crt\" is required!" .Values.internalTLS.core.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.core.key\" is required!" .Values.internalTLS.core.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/database/database-secret.yaml b/charts/harbor/harbor/1.13.1/templates/database/database-secret.yaml deleted file mode 100644 index 864aff4a18..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/database/database-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - POSTGRES_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end -}} diff --git a/charts/harbor/harbor/1.13.1/templates/database/database-ss.yaml b/charts/harbor/harbor/1.13.1/templates/database/database-ss.yaml deleted file mode 100644 index 3b08b07ef1..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/database/database-ss.yaml +++ /dev/null @@ -1,168 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -{{- $database := .Values.persistence.persistentVolumeClaim.database -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: database -spec: - replicas: 1 - serviceName: "{{ template "harbor.database" . }}" - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: database - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: database -{{- if .Values.database.podLabels }} -{{ toYaml .Values.database.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} -{{- if .Values.database.podAnnotations }} -{{ toYaml .Values.database.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.database.internal.serviceAccountName }} - serviceAccountName: {{ .Values.database.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.database.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - # as we change the data directory to a sub folder to support psp, the init container here - # is used to migrate the existing data. See https://github.com/goharbor/harbor-helm/issues/756 - # for more detail. - # we may remove it after several releases - - name: "data-migrator" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "[ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true"] -{{- if .Values.database.internal.initContainer.migrator.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.migrator.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - # with "fsGroup" set, each time a volume is mounted, Kubernetes must recursively chown() and chmod() all the files and directories inside the volume - # this causes the postgresql reports the "data directory /var/lib/postgresql/data/pgdata has group or world access" issue when using some CSIs e.g. Ceph - # use this init container to correct the permission - # as "fsGroup" applied before the init container running, the container has enough permission to execute the command - - name: "data-permissions-ensurer" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"] -{{- if .Values.database.internal.initContainer.permissions.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.permissions.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - containers: - - name: database - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.livenessProbe.timeoutSeconds }} - readinessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 1 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.readinessProbe.timeoutSeconds }} -{{- if .Values.database.internal.resources }} - resources: -{{ toYaml .Values.database.internal.resources | indent 10 }} -{{- end }} - envFrom: - - secretRef: - name: "{{ template "harbor.database" . }}" - env: - # put the data into a sub directory to avoid the permission issue in k8s with restricted psp enabled - # more detail refer to https://github.com/goharbor/harbor-helm/issues/756 - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" -{{- with .Values.database.internal.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - - name: shm-volume - mountPath: /dev/shm - volumes: - - name: shm-volume - emptyDir: - medium: Memory - sizeLimit: {{ .Values.database.internal.shmSizeLimit }} - {{- if not .Values.persistence.enabled }} - - name: "database-data" - emptyDir: {} - {{- else if $database.existingClaim }} - - name: "database-data" - persistentVolumeClaim: - claimName: {{ $database.existingClaim }} - {{- end -}} - {{- with .Values.database.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.database.internal.priorityClassName }} - priorityClassName: {{ .Values.database.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $database.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $database.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $database.accessMode | quote }}] - {{- if $database.storageClass }} - {{- if (eq "-" $database.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $database.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $database.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.13.1/templates/database/database-svc.yaml b/charts/harbor/harbor/1.13.1/templates/database/database-svc.yaml deleted file mode 100644 index 6475048cd9..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/database/database-svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 5432 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: database -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/exporter/exporter-cm-env.yaml b/charts/harbor/harbor/1.13.1/templates/exporter/exporter-cm-env.yaml deleted file mode 100644 index 0bf4e7d905..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/exporter/exporter-cm-env.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.exporter" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - LOG_LEVEL: "{{ .Values.logLevel }}" - HARBOR_EXPORTER_PORT: "{{ .Values.metrics.exporter.port }}" - HARBOR_EXPORTER_METRICS_PATH: "{{ .Values.metrics.exporter.path }}" - HARBOR_EXPORTER_METRICS_ENABLED: "{{ .Values.metrics.enabled }}" - HARBOR_EXPORTER_CACHE_TIME: "{{ .Values.exporter.cacheDuration }}" - HARBOR_EXPORTER_CACHE_CLEAN_INTERVAL: "{{ .Values.exporter.cacheCleanInterval }}" - HARBOR_METRIC_NAMESPACE: harbor - HARBOR_METRIC_SUBSYSTEM: exporter - HARBOR_REDIS_URL: "{{ template "harbor.redis.urlForJobservice" . }}" - HARBOR_REDIS_NAMESPACE: harbor_job_service_namespace - HARBOR_REDIS_TIMEOUT: "3600" - HARBOR_SERVICE_SCHEME: "{{ template "harbor.component.scheme" . }}" - HARBOR_SERVICE_HOST: "{{ template "harbor.core" . }}" - HARBOR_SERVICE_PORT: "{{ template "harbor.core.servicePort" . }}" - HARBOR_DATABASE_HOST: "{{ template "harbor.database.host" . }}" - HARBOR_DATABASE_PORT: "{{ template "harbor.database.port" . }}" - HARBOR_DATABASE_USERNAME: "{{ template "harbor.database.username" . }}" - HARBOR_DATABASE_DBNAME: "{{ template "harbor.database.coreDatabase" . }}" - HARBOR_DATABASE_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - HARBOR_DATABASE_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - HARBOR_DATABASE_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" -{{- end}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/exporter/exporter-dpl.yaml b/charts/harbor/harbor/1.13.1/templates/exporter/exporter-dpl.yaml deleted file mode 100644 index 6d2e1f53ac..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/exporter/exporter-dpl.yaml +++ /dev/null @@ -1,139 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: exporter -spec: - replicas: {{ .Values.exporter.replicas }} - revisionHistoryLimit: {{ .Values.exporter.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: exporter - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: exporter -{{- if .Values.exporter.podLabels }} -{{ toYaml .Values.exporter.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.exporter.podAnnotations }} -{{ toYaml .Values.exporter.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.exporter.serviceAccountName }} - serviceAccountName: {{ .Values.exporter.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.exporter.automountServiceAccountToken | default false }} -{{- with .Values.exporter.topologySpreadConstraints }} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: exporter -{{- end }} -{{- end }} - containers: - - name: exporter - image: {{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 30 - periodSeconds: 10 - args: ["-log-level", "{{ .Values.logLevel }}"] - envFrom: - - configMapRef: - name: "{{ template "harbor.exporter" . }}-env" - - secretRef: - name: "{{ template "harbor.exporter" . }}" - env: - {{- if .Values.database.external.existingSecret }} - - name: HARBOR_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} -{{- if .Values.exporter.resources }} - resources: -{{ toYaml .Values.exporter.resources | indent 10 }} -{{- end }} -{{- with .Values.exporter.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - # There are some metric data are collectd from harbor core. - # When internal TLS is enabled, the Exporter need the CA file to collect these data. - {{- end }} - volumes: - - name: config - secret: - secretName: "{{ template "harbor.exporter" . }}" - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.exporter.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.exporter.priorityClassName }} - priorityClassName: {{ .Values.exporter.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.13.1/templates/exporter/exporter-secret.yaml b/charts/harbor/harbor/1.13.1/templates/exporter/exporter-secret.yaml deleted file mode 100644 index 434a1bf689..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/exporter/exporter-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: -{{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} -{{- end }} -{{- if not .Values.database.external.existingSecret }} - HARBOR_DATABASE_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/exporter/exporter-svc.yaml b/charts/harbor/harbor/1.13.1/templates/exporter/exporter-svc.yaml deleted file mode 100644 index 4a6f3fdec6..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/exporter/exporter-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.exporter" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.exporter.port }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: exporter -{{ end }} diff --git a/charts/harbor/harbor/1.13.1/templates/ingress/ingress.yaml b/charts/harbor/harbor/1.13.1/templates/ingress/ingress.yaml deleted file mode 100644 index e4c06939c6..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/ingress/ingress.yaml +++ /dev/null @@ -1,145 +0,0 @@ -{{- if eq .Values.expose.type "ingress" }} -{{- $ingress := .Values.expose.ingress -}} -{{- $tls := .Values.expose.tls -}} -{{- if eq .Values.expose.ingress.controller "gce" }} - {{- $_ := set . "portal_path" "/*" -}} - {{- $_ := set . "api_path" "/api/*" -}} - {{- $_ := set . "service_path" "/service/*" -}} - {{- $_ := set . "v2_path" "/v2/*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/*" -}} - {{- $_ := set . "controller_path" "/c/*" -}} -{{- else if eq .Values.expose.ingress.controller "ncp" }} - {{- $_ := set . "portal_path" "/.*" -}} - {{- $_ := set . "api_path" "/api/.*" -}} - {{- $_ := set . "service_path" "/service/.*" -}} - {{- $_ := set . "v2_path" "/v2/.*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}} - {{- $_ := set . "controller_path" "/c/.*" -}} -{{- else }} - {{- $_ := set . "portal_path" "/" -}} - {{- $_ := set . "api_path" "/api/" -}} - {{- $_ := set . "service_path" "/service/" -}} - {{- $_ := set . "v2_path" "/v2/" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/" -}} - {{- $_ := set . "controller_path" "/c/" -}} -{{- end }} - ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.harbor.labels }} -{{ toYaml $ingress.harbor.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if .Values.internalTLS.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" -{{- end }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -{{- if $ingress.harbor.annotations }} -{{ toYaml $ingress.harbor.annotations | indent 4 }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsCoreSecretForIngress" . }} - {{- if $ingress.hosts.core }} - hosts: - - {{ $ingress.hosts.core }} - {{- end }} - {{- end }} - rules: - - http: - paths: -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - - path: {{ .api_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - backend: - serviceName: {{ template "harbor.portal" . }} - servicePort: {{ template "harbor.portal.servicePort" . }} -{{- else }} - - path: {{ .api_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.portal" . }} - port: - number: {{ template "harbor.portal.servicePort" . }} -{{- end }} - {{- if $ingress.hosts.core }} - host: {{ $ingress.hosts.core }} - {{- end }} - -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/ingress/secret.yaml b/charts/harbor/harbor/1.13.1/templates/ingress/secret.yaml deleted file mode 100644 index 41507b3dd9..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/ingress/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForIngress" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cert := genSignedCert .Values.expose.ingress.hosts.core nil (list .Values.expose.ingress.hosts.core) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/internal/auto-tls.yaml b/charts/harbor/harbor/1.13.1/templates/internal/auto-tls.yaml deleted file mode 100644 index da5f5e2c7b..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/internal/auto-tls.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} -{{- $ca := genCA "harbor-internal-ca" 365 }} -{{- $coreCN := (include "harbor.core" .) }} -{{- $coreCrt := genSignedCert $coreCN (list "127.0.0.1") (list "localhost" $coreCN) 365 $ca }} -{{- $jsCN := (include "harbor.jobservice" .) }} -{{- $jsCrt := genSignedCert $jsCN nil (list $jsCN) 365 $ca }} -{{- $regCN := (include "harbor.registry" .) }} -{{- $regCrt := genSignedCert $regCN nil (list $regCN) 365 $ca }} -{{- $portalCN := (include "harbor.portal" .) }} -{{- $portalCrt := genSignedCert $portalCN nil (list $portalCN) 365 $ca }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $coreCrt.Cert | b64enc | quote }} - tls.key: {{ $coreCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $jsCrt.Cert | b64enc | quote }} - tls.key: {{ $jsCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $regCrt.Cert | b64enc | quote }} - tls.key: {{ $regCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $portalCrt.Cert | b64enc | quote }} - tls.key: {{ $portalCrt.Key | b64enc | quote }} - -{{- if and .Values.trivy.enabled}} ---- -{{- $trivyCN := (include "harbor.trivy" .) }} -{{- $trivyCrt := genSignedCert $trivyCN nil (list $trivyCN) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $trivyCrt.Cert | b64enc | quote }} - tls.key: {{ $trivyCrt.Key | b64enc | quote }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-cm-env.yaml b/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-cm-env.yaml deleted file mode 100644 index 8411c7a47c..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-cm-env.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - CORE_URL: "{{ template "harbor.coreURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - - JOBSERVICE_WEBHOOK_JOB_MAX_RETRY: "{{ .Values.jobservice.notification.webhook_job_max_retry }}" - JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT: "{{ .Values.jobservice.notification.webhook_job_http_client_timeout }}" - - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.metrics.enabled}} - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: jobservice - {{- end }} - {{- template "harbor.traceEnvsForJobservice" . }} - {{- if .Values.cache.enabled }} - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-cm.yaml b/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-cm.yaml deleted file mode 100644 index 8211c62209..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-cm.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - #Server listening port - protocol: "{{ template "harbor.component.scheme" . }}" - port: {{ template "harbor.jobservice.containerPort". }} - {{- if .Values.internalTLS.enabled }} - https_config: - cert: "/etc/harbor/ssl/jobservice/tls.crt" - key: "/etc/harbor/ssl/jobservice/tls.key" - {{- end }} - worker_pool: - workers: {{ .Values.jobservice.maxJobWorkers }} - backend: "redis" - redis_pool: - redis_url: "{{ template "harbor.redis.urlForJobservice" . }}" - namespace: "harbor_job_service_namespace" - idle_timeout_second: 3600 - job_loggers: - {{- if has "file" .Values.jobservice.jobLoggers }} - - name: "FILE" - level: {{ .Values.logLevel | upper }} - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - {{- end }} - {{- if has "database" .Values.jobservice.jobLoggers }} - - name: "DB" - level: {{ .Values.logLevel | upper }} - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - {{- end }} - {{- if has "stdout" .Values.jobservice.jobLoggers }} - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - {{- end }} - metric: - enabled: {{ .Values.metrics.enabled }} - path: {{ .Values.metrics.jobservice.path }} - port: {{ .Values.metrics.jobservice.port }} - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: {{ .Values.jobservice.reaper.max_update_hours }} - # the max time for execution in running state without new task created - max_dangling_hours: {{ .Values.jobservice.reaper.max_dangling_hours }} diff --git a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-dpl.yaml b/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-dpl.yaml deleted file mode 100644 index 32df97db76..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-dpl.yaml +++ /dev/null @@ -1,166 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - replicas: {{ .Values.jobservice.replicas }} - revisionHistoryLimit: {{ .Values.jobservice.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: jobservice -{{- if .Values.jobservice.podLabels }} -{{ toYaml .Values.jobservice.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} - checksum/configmap-env: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/jobservice/jobservice-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.jobservice.podAnnotations }} -{{ toYaml .Values.jobservice.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.jobservice.serviceAccountName }} - serviceAccountName: {{ .Values.jobservice.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.jobservice.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: jobservice -{{- end }} -{{- end }} - containers: - - name: jobservice - image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.jobservice.resources }} - resources: -{{ toYaml .Values.jobservice.resources | indent 10 }} -{{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/jobservice/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/jobservice/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/jobservice/ca.crt - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} -{{- with .Values.jobservice.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.jobservice" . }}-env" - - secretRef: - name: "{{ template "harbor.jobservice" . }}" - ports: - - containerPort: {{ template "harbor.jobservice.containerPort" . }} - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.subPath }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - mountPath: /etc/harbor/ssl/jobservice - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: jobservice-config - configMap: - name: "{{ template "harbor.jobservice" . }}" - - name: job-logs - {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLoggers) }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim | default (include "harbor.jobservice" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.jobservice.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.jobservice.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.jobservice.priorityClassName }} - priorityClassName: {{ .Values.jobservice.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-pvc.yaml b/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-pvc.yaml deleted file mode 100644 index a6b8b8bd38..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-pvc.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- $jobLog := .Values.persistence.persistentVolumeClaim.jobservice.jobLog -}} -{{- if and .Values.persistence.enabled (not $jobLog.existingClaim) (has "file" .Values.jobservice.jobLoggers) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.jobservice" . }} - annotations: - {{- range $key, $value := $jobLog.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - accessModes: - - {{ $jobLog.accessMode }} - resources: - requests: - storage: {{ $jobLog.size }} - {{- if $jobLog.storageClass }} - {{- if eq "-" $jobLog.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $jobLog.storageClass }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-secrets.yaml b/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-secrets.yaml deleted file mode 100644 index 3dfa6bd5e6..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-secrets.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - JOBSERVICE_SECRET: {{ .Values.jobservice.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-svc.yaml b/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-svc.yaml deleted file mode 100644 index d2b7a47fd4..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-svc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }} - port: {{ template "harbor.jobservice.servicePort" . }} - targetPort: {{ template "harbor.jobservice.containerPort" . }} -{{- if .Values.metrics.enabled }} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.jobservice.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice diff --git a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-tls.yaml b/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-tls.yaml deleted file mode 100644 index 234cb39995..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/jobservice/jobservice-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.jobservice.crt\" is required!" .Values.internalTLS.jobservice.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.jobservice.key\" is required!" .Values.internalTLS.jobservice.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/metrics/metrics-svcmon.yaml b/charts/harbor/harbor/1.13.1/templates/metrics/metrics-svcmon.yaml deleted file mode 100644 index 1122ef01ef..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/metrics/metrics-svcmon.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "harbor.fullname" . }} - labels: {{ include "harbor.labels" . | nindent 4 }} -{{- if .Values.metrics.serviceMonitor.additionalLabels }} -{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} -{{- end }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: {{ template "harbor.metricsPortName" . }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - honorLabels: true -{{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.metrics.serviceMonitor.relabelings | indent 4 }} -{{- end }} - selector: - matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/nginx/configmap-http.yaml b/charts/harbor/harbor/1.13.1/templates/nginx/configmap-http.yaml deleted file mode 100644 index c4b8354d06..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/nginx/configmap-http.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server {{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled}} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end }} - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - proxy_send_timeout 900; - proxy_read_timeout 900; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/nginx/configmap-https.yaml b/charts/harbor/harbor/1.13.1/templates/nginx/configmap-https.yaml deleted file mode 100644 index 56c943a619..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/nginx/configmap-https.yaml +++ /dev/null @@ -1,187 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server "{{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}"; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8443 ssl; - {{- end }} - # server_name harbordomain.com; - server_tokens off; - # SSL - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - # Add extra headers - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; HttpOnly; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end}} - #server_name harbordomain.com; - return 301 https://$host$request_uri; - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/nginx/deployment.yaml b/charts/harbor/harbor/1.13.1/templates/nginx/deployment.yaml deleted file mode 100644 index 8290d497b6..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/nginx/deployment.yaml +++ /dev/null @@ -1,126 +0,0 @@ -{{- if ne .Values.expose.type "ingress" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: nginx -spec: - replicas: {{ .Values.nginx.replicas }} - revisionHistoryLimit: {{ .Values.nginx.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: nginx - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: nginx -{{- if .Values.nginx.podLabels }} -{{ toYaml .Values.nginx.podLabels | indent 8 }} -{{- end }} - annotations: - {{- if not .Values.expose.tls.enabled }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} - {{- else }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-https.yaml") . | sha256sum }} - {{- end }} - {{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} - checksum/secret: {{ include (print $.Template.BasePath "/nginx/secret.yaml") . | sha256sum }} - {{- end }} -{{- if .Values.nginx.podAnnotations }} -{{ toYaml .Values.nginx.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- if .Values.nginx.serviceAccountName }} - serviceAccountName: {{ .Values.nginx.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.nginx.automountServiceAccountToken | default false }} -{{- with .Values.nginx.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: nginx -{{- end }} -{{- end }} - containers: - - name: nginx - image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - {{- $_ := set . "scheme" "HTTP" -}} - {{- $_ := set . "port" "8080" -}} - {{- if .Values.expose.tls.enabled }} - {{- $_ := set . "scheme" "HTTPS" -}} - {{- $_ := set . "port" "8443" -}} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.nginx.resources }} - resources: -{{ toYaml .Values.nginx.resources | indent 10 }} -{{- end }} -{{- with .Values.nginx.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: 8080 - - containerPort: 8443 - - containerPort: 4443 - volumeMounts: - - name: config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.expose.tls.enabled }} - - name: certificate - mountPath: /etc/nginx/cert - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.nginx" . }} - {{- if .Values.expose.tls.enabled }} - - name: certificate - secret: - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- with .Values.nginx.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nginx.priorityClassName }} - priorityClassName: {{ .Values.nginx.priorityClassName }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/nginx/secret.yaml b/charts/harbor/harbor/1.13.1/templates/nginx/secret.yaml deleted file mode 100644 index c819c556d9..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/nginx/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cn := (required "The \"expose.tls.auto.commonName\" is required!" .Values.expose.tls.auto.commonName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if regexMatch `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` $cn }} - {{- $cert := genSignedCert $cn (list $cn) nil 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- else }} - {{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/nginx/service.yaml b/charts/harbor/harbor/1.13.1/templates/nginx/service.yaml deleted file mode 100644 index 12021bfd1a..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/nginx/service.yaml +++ /dev/null @@ -1,78 +0,0 @@ -{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }} -apiVersion: v1 -kind: Service -metadata: -{{- if eq .Values.expose.type "clusterIP" }} -{{- $clusterIP := .Values.expose.clusterIP }} - name: {{ $clusterIP.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $clusterIP.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: ClusterIP - ports: - - name: http - port: {{ $clusterIP.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $clusterIP.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- else if eq .Values.expose.type "nodePort" }} -{{- $nodePort := .Values.expose.nodePort }} - name: {{ $nodePort.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - type: NodePort - ports: - - name: http - port: {{ $nodePort.ports.http.port }} - targetPort: 8080 - {{- if $nodePort.ports.http.nodePort }} - nodePort: {{ $nodePort.ports.http.nodePort }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $nodePort.ports.https.port }} - targetPort: 8443 - {{- if $nodePort.ports.https.nodePort }} - nodePort: {{ $nodePort.ports.https.nodePort }} - {{- end }} - {{- end }} -{{- else if eq .Values.expose.type "loadBalancer" }} -{{- $loadBalancer := .Values.expose.loadBalancer }} - name: {{ $loadBalancer.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $loadBalancer.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: LoadBalancer - {{- with $loadBalancer.sourceRanges }} - loadBalancerSourceRanges: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $loadBalancer.IP }} - loadBalancerIP: {{ $loadBalancer.IP }} - {{- end }} - ports: - - name: http - port: {{ $loadBalancer.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $loadBalancer.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: nginx -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/portal/configmap.yaml b/charts/harbor/harbor/1.13.1/templates/portal/configmap.yaml deleted file mode 100644 index 7b2118e721..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/portal/configmap.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - events { - worker_connections 1024; - } - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - {{- if .Values.internalTLS.enabled }} - {{- if .Values.ipFamily.ipv4.enabled}} - listen {{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - # SSL - ssl_certificate /etc/harbor/ssl/portal/tls.crt; - ssl_certificate_key /etc/harbor/ssl/portal/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - {{- else }} - {{- if .Values.ipFamily.ipv4.enabled }} - listen {{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- end }} - server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location /devcenter-api-2.0 { - try_files $uri $uri/ /swagger-ui-index.html; - } - location / { - try_files $uri $uri/ /index.html; - } - location = /index.html { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - } - } diff --git a/charts/harbor/harbor/1.13.1/templates/portal/deployment.yaml b/charts/harbor/harbor/1.13.1/templates/portal/deployment.yaml deleted file mode 100644 index 959a3fd7b5..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/portal/deployment.yaml +++ /dev/null @@ -1,114 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: portal -spec: - replicas: {{ .Values.portal.replicas }} - revisionHistoryLimit: {{ .Values.portal.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: portal - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: portal -{{- if .Values.portal.podLabels }} -{{ toYaml .Values.portal.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} -{{- end }} - checksum/configmap: {{ include (print $.Template.BasePath "/portal/configmap.yaml") . | sha256sum }} -{{- if .Values.portal.podAnnotations }} -{{ toYaml .Values.portal.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- if .Values.portal.serviceAccountName }} - serviceAccountName: {{ .Values.portal.serviceAccountName }} -{{- end }} - automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }} -{{- with .Values.portal.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: portal -{{- end }} -{{- end }} - containers: - - name: portal - image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} -{{- if .Values.portal.resources }} - resources: -{{ toYaml .Values.portal.resources | indent 10 }} -{{- end }} -{{- with .Values.portal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: {{ template "harbor.portal.containerPort" . }} - volumeMounts: - - name: portal-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - mountPath: /etc/harbor/ssl/portal - {{- end }} - volumes: - - name: portal-config - configMap: - name: "{{ template "harbor.portal" . }}" - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.portal.secretName" . }} - {{- end }} - {{- with .Values.portal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.portal.priorityClassName }} - priorityClassName: {{ .Values.portal.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/portal/service.yaml b/charts/harbor/harbor/1.13.1/templates/portal/service.yaml deleted file mode 100644 index ff4eda435b..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/portal/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: {{ template "harbor.portal.servicePort" . }} - targetPort: {{ template "harbor.portal.containerPort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: portal diff --git a/charts/harbor/harbor/1.13.1/templates/portal/tls.yaml b/charts/harbor/harbor/1.13.1/templates/portal/tls.yaml deleted file mode 100644 index de63f4e813..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/portal/tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.portal.crt\" is required!" .Values.internalTLS.portal.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.portal.key\" is required!" .Values.internalTLS.portal.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/redis/service.yaml b/charts/harbor/harbor/1.13.1/templates/redis/service.yaml deleted file mode 100644 index 79c95c3e05..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/redis/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 6379 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: redis -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/redis/statefulset.yaml b/charts/harbor/harbor/1.13.1/templates/redis/statefulset.yaml deleted file mode 100644 index 371b0fd5aa..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/redis/statefulset.yaml +++ /dev/null @@ -1,116 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -{{- $redis := .Values.persistence.persistentVolumeClaim.redis -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: redis -spec: - replicas: 1 - serviceName: {{ template "harbor.redis" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: redis - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: redis -{{- if .Values.redis.podLabels }} -{{ toYaml .Values.redis.podLabels | indent 8 }} -{{- end }} -{{- if .Values.redis.podAnnotations }} - annotations: -{{ toYaml .Values.redis.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.redis.internal.serviceAccountName }} - serviceAccountName: {{ .Values.redis.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.redis.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: redis - image: {{ .Values.redis.internal.image.repository }}:{{ .Values.redis.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.redis.internal.resources }} - resources: -{{ toYaml .Values.redis.internal.resources | indent 10 }} -{{- end }} -{{- with .Values.redis.internal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: {{ $redis.subPath }} - {{- if not .Values.persistence.enabled }} - volumes: - - name: data - emptyDir: {} - {{- else if $redis.existingClaim }} - volumes: - - name: data - persistentVolumeClaim: - claimName: {{ $redis.existingClaim }} - {{- end -}} - {{- with .Values.redis.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.redis.internal.priorityClassName }} - priorityClassName: {{ .Values.redis.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $redis.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $redis.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $redis.accessMode | quote }}] - {{- if $redis.storageClass }} - {{- if (eq "-" $redis.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $redis.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $redis.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.13.1/templates/registry/registry-cm.yaml b/charts/harbor/harbor/1.13.1/templates/registry/registry-cm.yaml deleted file mode 100644 index 4f7056c384..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/registry/registry-cm.yaml +++ /dev/null @@ -1,246 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - version: 0.1 - log: - {{- if eq .Values.logLevel "warning" }} - level: warn - {{- else if eq .Values.logLevel "fatal" }} - level: error - {{- else }} - level: {{ .Values.logLevel }} - {{- end }} - fields: - service: registry - storage: - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if eq $type "filesystem" }} - filesystem: - rootdirectory: {{ $storage.filesystem.rootdirectory }} - {{- if $storage.filesystem.maxthreads }} - maxthreads: {{ $storage.filesystem.maxthreads }} - {{- end }} - {{- else if eq $type "azure" }} - azure: - accountname: {{ $storage.azure.accountname }} - container: {{ $storage.azure.container }} - {{- if $storage.azure.realm }} - realm: {{ $storage.azure.realm }} - {{- end }} - {{- else if eq $type "gcs" }} - gcs: - bucket: {{ $storage.gcs.bucket }} - {{- if not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity }} - keyfile: /etc/registry/gcs-key.json - {{- end }} - {{- if $storage.gcs.rootdirectory }} - rootdirectory: {{ $storage.gcs.rootdirectory }} - {{- end }} - {{- if $storage.gcs.chunksize }} - chunksize: {{ $storage.gcs.chunksize }} - {{- end }} - {{- else if eq $type "s3" }} - s3: - region: {{ $storage.s3.region }} - bucket: {{ $storage.s3.bucket }} - {{- if $storage.s3.regionendpoint }} - regionendpoint: {{ $storage.s3.regionendpoint }} - {{- end }} - {{- if $storage.s3.encrypt }} - encrypt: {{ $storage.s3.encrypt }} - {{- end }} - {{- if $storage.s3.keyid }} - keyid: {{ $storage.s3.keyid }} - {{- end }} - {{- if $storage.s3.secure }} - secure: {{ $storage.s3.secure }} - {{- end }} - {{- if and $storage.s3.secure $storage.s3.skipverify }} - skipverify: {{ $storage.s3.skipverify }} - {{- end }} - {{- if $storage.s3.v4auth }} - v4auth: {{ $storage.s3.v4auth }} - {{- end }} - {{- if $storage.s3.chunksize }} - chunksize: {{ $storage.s3.chunksize }} - {{- end }} - {{- if $storage.s3.rootdirectory }} - rootdirectory: {{ $storage.s3.rootdirectory }} - {{- end }} - {{- if $storage.s3.storageclass }} - storageclass: {{ $storage.s3.storageclass }} - {{- end }} - {{- if $storage.s3.multipartcopychunksize }} - multipartcopychunksize: {{ $storage.s3.multipartcopychunksize }} - {{- end }} - {{- if $storage.s3.multipartcopymaxconcurrency }} - multipartcopymaxconcurrency: {{ $storage.s3.multipartcopymaxconcurrency }} - {{- end }} - {{- if $storage.s3.multipartcopythresholdsize }} - multipartcopythresholdsize: {{ $storage.s3.multipartcopythresholdsize }} - {{- end }} - {{- else if eq $type "swift" }} - swift: - authurl: {{ $storage.swift.authurl }} - username: {{ $storage.swift.username }} - container: {{ $storage.swift.container }} - {{- if $storage.swift.region }} - region: {{ $storage.swift.region }} - {{- end }} - {{- if $storage.swift.tenant }} - tenant: {{ $storage.swift.tenant }} - {{- end }} - {{- if $storage.swift.tenantid }} - tenantid: {{ $storage.swift.tenantid }} - {{- end }} - {{- if $storage.swift.domain }} - domain: {{ $storage.swift.domain }} - {{- end }} - {{- if $storage.swift.domainid }} - domainid: {{ $storage.swift.domainid }} - {{- end }} - {{- if $storage.swift.trustid }} - trustid: {{ $storage.swift.trustid }} - {{- end }} - {{- if $storage.swift.insecureskipverify }} - insecureskipverify: {{ $storage.swift.insecureskipverify }} - {{- end }} - {{- if $storage.swift.chunksize }} - chunksize: {{ $storage.swift.chunksize }} - {{- end }} - {{- if $storage.swift.prefix }} - prefix: {{ $storage.swift.prefix }} - {{- end }} - {{- if $storage.swift.authversion }} - authversion: {{ $storage.swift.authversion }} - {{- end }} - {{- if $storage.swift.endpointtype }} - endpointtype: {{ $storage.swift.endpointtype }} - {{- end }} - {{- if $storage.swift.tempurlcontainerkey }} - tempurlcontainerkey: {{ $storage.swift.tempurlcontainerkey }} - {{- end }} - {{- if $storage.swift.tempurlmethods }} - tempurlmethods: {{ $storage.swift.tempurlmethods }} - {{- end }} - {{- else if eq $type "oss" }} - oss: - accesskeyid: {{ $storage.oss.accesskeyid }} - region: {{ $storage.oss.region }} - bucket: {{ $storage.oss.bucket }} - {{- if $storage.oss.endpoint }} - endpoint: {{ $storage.oss.bucket }}.{{ $storage.oss.endpoint }} - {{- end }} - {{- if $storage.oss.internal }} - internal: {{ $storage.oss.internal }} - {{- end }} - {{- if $storage.oss.encrypt }} - encrypt: {{ $storage.oss.encrypt }} - {{- end }} - {{- if $storage.oss.secure }} - secure: {{ $storage.oss.secure }} - {{- end }} - {{- if $storage.oss.chunksize }} - chunksize: {{ $storage.oss.chunksize }} - {{- end }} - {{- if $storage.oss.rootdirectory }} - rootdirectory: {{ $storage.oss.rootdirectory }} - {{- end }} - {{- end }} - cache: - layerinfo: redis - maintenance: - uploadpurging: - {{- if .Values.registry.upload_purging.enabled }} - enabled: true - age: {{ .Values.registry.upload_purging.age }} - interval: {{ .Values.registry.upload_purging.interval }} - dryrun: {{ .Values.registry.upload_purging.dryrun }} - {{- else }} - enabled: false - {{- end }} - delete: - enabled: true - redirect: - disable: {{ $storage.disableredirect }} - redis: - addr: {{ template "harbor.redis.addr" . }} - {{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }} - sentinelMasterSet: {{ template "harbor.redis.masterSet" . }} - {{- end }} - db: {{ template "harbor.redis.dbForRegistry" . }} - {{- if not (eq (include "harbor.redis.password" .) "") }} - password: {{ template "harbor.redis.password" . }} - {{- end }} - readtimeout: 10s - writetimeout: 10s - dialtimeout: 10s - pool: - maxidle: 100 - maxactive: 500 - idletimeout: 60s - http: - addr: :{{ template "harbor.registry.containerPort" . }} - relativeurls: {{ .Values.registry.relativeurls }} - {{- if .Values.internalTLS.enabled }} - tls: - certificate: /etc/harbor/ssl/registry/tls.crt - key: /etc/harbor/ssl/registry/tls.key - minimumtls: tls1.2 - {{- end }} - # set via environment variable - # secret: placeholder - debug: - {{- if .Values.metrics.enabled}} - addr: :{{ .Values.metrics.registry.port }} - prometheus: - enabled: true - path: {{ .Values.metrics.registry.path }} - {{- else }} - addr: localhost:5001 - {{- end }} - auth: - htpasswd: - realm: harbor-registry-basic-realm - path: /etc/registry/passwd - validation: - disabled: true - compatibility: - schema1: - enabled: true - - {{- if .Values.registry.middleware.enabled }} - {{- $middleware := .Values.registry.middleware }} - {{- $middlewareType := $middleware.type }} - {{- if eq $middlewareType "cloudFront" }} - middleware: - storage: - - name: cloudfront - options: - baseurl: {{ $middleware.cloudFront.baseurl }} - privatekey: /etc/registry/pk.pem - keypairid: {{ $middleware.cloudFront.keypairid }} - duration: {{ $middleware.cloudFront.duration }} - ipfilteredby: {{ $middleware.cloudFront.ipfilteredby }} - {{- end }} - {{- end }} - ctl-config.yml: |+ - --- - {{- if .Values.internalTLS.enabled }} - protocol: "https" - port: 8443 - https_config: - cert: "/etc/harbor/ssl/registry/tls.crt" - key: "/etc/harbor/ssl/registry/tls.key" - {{- else }} - protocol: "http" - port: 8080 - {{- end }} - log_level: {{ .Values.logLevel }} - registry_config: "/etc/registry/config.yml" diff --git a/charts/harbor/harbor/1.13.1/templates/registry/registry-dpl.yaml b/charts/harbor/harbor/1.13.1/templates/registry/registry-dpl.yaml deleted file mode 100644 index b9c97ff892..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/registry/registry-dpl.yaml +++ /dev/null @@ -1,347 +0,0 @@ -{{- $storage := .Values.persistence.imageChartStorage }} -{{- $type := $storage.type }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - replicas: {{ .Values.registry.replicas }} - revisionHistoryLimit: {{ .Values.registry.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: registry - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: registry -{{- if .Values.registry.podLabels }} -{{ toYaml .Values.registry.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/registry/registry-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.registry.podAnnotations }} -{{ toYaml .Values.registry.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - fsGroupChangePolicy: OnRootMismatch -{{- if .Values.registry.serviceAccountName }} - serviceAccountName: {{ .Values.registry.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.registry.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: registry -{{- end }} -{{- end }} - containers: - - name: registry - image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.registry.resources }} - resources: -{{ toYaml .Values.registry.registry.resources | indent 10 }} -{{- end }} - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: "{{ template "harbor.registry" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} -{{- with .Values.registry.registry.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registry.containerPort" . }} - - containerPort: 5001 - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-htpasswd - mountPath: /etc/registry/passwd - subPath: passwd - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - mountPath: /etc/registry/pk.pem - subPath: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - - name: registryctl - image: {{ .Values.registry.controller.image.repository }}:{{ .Values.registry.controller.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.controller.resources }} - resources: -{{ toYaml .Values.registry.controller.resources | indent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.registryCtl" . }}" - - secretRef: - name: "{{ template "harbor.registry" . }}" - - secretRef: - name: "{{ template "harbor.registryCtl" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.core" . }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ template "harbor.jobservice" . }} - key: JOBSERVICE_SECRET - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} -{{- with .Values.registry.controller.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registryctl.containerPort" . }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: registry-htpasswd - secret: - {{- if not .Values.registry.credentials.existingSecret }} - secretName: {{ template "harbor.registry" . }}-htpasswd - {{ else }} - secretName: {{ .Values.registry.credentials.existingSecret }} - {{- end }} - items: - - key: REGISTRY_HTPASSWD - path: passwd - - name: registry-config - configMap: - name: "{{ template "harbor.registry" . }}" - - name: registry-data - {{- if and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "filesystem") }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.registry.existingClaim | default (include "harbor.registry" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.registry.secretName" . }} - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - secret: - {{- if and (eq $type "gcs") $storage.gcs.existingSecret }} - secretName: {{ $storage.gcs.existingSecret }} - {{- else }} - secretName: {{ template "harbor.registry" . }} - {{- end }} - items: - - key: GCS_KEY_DATA - path: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - secret: - secretName: {{ .Values.persistence.imageChartStorage.caBundleSecretName }} - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - secret: - secretName: {{ .Values.registry.middleware.cloudFront.privateKeySecret }} - items: - - key: CLOUDFRONT_KEY_DATA - path: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.registry.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.registry.priorityClassName }} - priorityClassName: {{ .Values.registry.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/registry/registry-pvc.yaml b/charts/harbor/harbor/1.13.1/templates/registry/registry-pvc.yaml deleted file mode 100644 index 2112e22877..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/registry/registry-pvc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.persistence.enabled }} -{{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} -{{- if and (not $registry.existingClaim) (eq .Values.persistence.imageChartStorage.type "filesystem") }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.registry" . }} - annotations: - {{- range $key, $value := $registry.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - accessModes: - - {{ $registry.accessMode }} - resources: - requests: - storage: {{ $registry.size }} - {{- if $registry.storageClass }} - {{- if eq "-" $registry.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $registry.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/registry/registry-secret.yaml b/charts/harbor/harbor/1.13.1/templates/registry/registry-secret.yaml deleted file mode 100644 index 529462906e..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/registry/registry-secret.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (randAlphaNum 16) | b64enc | quote }} - {{- if not .Values.redis.external.existingSecret }} - REGISTRY_REDIS_PASSWORD: {{ include "harbor.redis.password" . | b64enc | quote }} - {{- end }} - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if and (eq $type "azure") (not $storage.azure.existingSecret) }} - REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }} - {{- else if and (and (eq $type "gcs") (not $storage.gcs.existingSecret)) (not $storage.gcs.useWorkloadIdentity) }} - GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }} - {{- else if eq $type "s3" }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.accesskey) }} - REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }} - {{- end }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.secretkey) }} - REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }} - {{- end }} - {{- else if eq $type "swift" }} - REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }} - {{- if $storage.swift.secretkey }} - REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }} - {{- end }} - {{- if $storage.swift.accesskey }} - REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }} - {{- end }} - {{- else if eq $type "oss" }} - REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }} - {{- end }} -{{- if not .Values.registry.credentials.existingSecret }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}-htpasswd" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if .Values.registry.credentials.htpasswdString }} - REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswdString | b64enc | quote }} - {{- else }} - REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/registry/registry-svc.yaml b/charts/harbor/harbor/1.13.1/templates/registry/registry-svc.yaml deleted file mode 100644 index 749690ea03..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/registry/registry-svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }} - port: {{ template "harbor.registry.servicePort" . }} - - - name: {{ ternary "https-controller" "http-controller" .Values.internalTLS.enabled }} - port: {{ template "harbor.registryctl.servicePort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.registry.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/registry/registry-tls.yaml b/charts/harbor/harbor/1.13.1/templates/registry/registry-tls.yaml deleted file mode 100644 index 9d1862c417..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/registry/registry-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.registry.crt\" is required!" .Values.internalTLS.registry.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.registry.key\" is required!" .Values.internalTLS.registry.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/registry/registryctl-cm.yaml b/charts/harbor/harbor/1.13.1/templates/registry/registryctl-cm.yaml deleted file mode 100644 index 87aa5ffe24..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/registry/registryctl-cm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- template "harbor.traceEnvsForRegistryCtl" . }} diff --git a/charts/harbor/harbor/1.13.1/templates/registry/registryctl-secret.yaml b/charts/harbor/harbor/1.13.1/templates/registry/registryctl-secret.yaml deleted file mode 100644 index 70097703e9..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/registry/registryctl-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- template "harbor.traceJaegerPassword" . }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.13.1/templates/trivy/trivy-secret.yaml b/charts/harbor/harbor/1.13.1/templates/trivy/trivy-secret.yaml deleted file mode 100644 index 84652c7498..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/trivy/trivy-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.trivy.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - redisURL: {{ include "harbor.redis.urlForTrivy" . | b64enc }} - gitHubToken: {{ .Values.trivy.gitHubToken | default "" | b64enc | quote }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/trivy/trivy-sts.yaml b/charts/harbor/harbor/1.13.1/templates/trivy/trivy-sts.yaml deleted file mode 100644 index aba23c9e8a..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/trivy/trivy-sts.yaml +++ /dev/null @@ -1,222 +0,0 @@ -{{- if .Values.trivy.enabled }} -{{- $trivy := .Values.persistence.persistentVolumeClaim.trivy }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: trivy -spec: - replicas: {{ .Values.trivy.replicas }} - serviceName: {{ template "harbor.trivy" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: trivy - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: trivy -{{- if .Values.trivy.podLabels }} -{{ toYaml .Values.trivy.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/trivy/trivy-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/trivy/trivy-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.trivy.podAnnotations }} -{{ toYaml .Values.trivy.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} -{{- end }} -{{- if .Values.trivy.serviceAccountName }} - serviceAccountName: {{ .Values.trivy.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }} -{{- with .Values.trivy.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: trivy -{{- end }} -{{- end }} - containers: - - name: trivy - image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - securityContext: - privileged: false - allowPrivilegeEscalation: false - env: - {{- if has "trivy" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - - name: "SCANNER_LOG_LEVEL" - value: {{ .Values.logLevel | quote }} - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: {{ .Values.trivy.debugMode | quote }} - - name: "SCANNER_TRIVY_VULN_TYPE" - value: {{ .Values.trivy.vulnType | quote }} - - name: "SCANNER_TRIVY_TIMEOUT" - value: {{ .Values.trivy.timeout | quote }} - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: {{ .Values.trivy.severity | quote }} - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: {{ .Values.trivy.ignoreUnfixed | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: {{ .Values.trivy.skipUpdate | default false | quote }} - - name: "SCANNER_TRIVY_OFFLINE_SCAN" - value: {{ .Values.trivy.offlineScan | default false | quote }} - - name: "SCANNER_TRIVY_SECURITY_CHECKS" - value: {{ .Values.trivy.securityCheck | quote }} - - name: "SCANNER_TRIVY_INSECURE" - value: {{ .Values.trivy.insecure | default false | quote }} - - name: SCANNER_API_SERVER_ADDR - value: ":{{ template "harbor.trivy.containerPort" . }}" - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: SCANNER_API_SERVER_TLS_KEY - value: /etc/harbor/ssl/trivy/tls.key - - name: SCANNER_API_SERVER_TLS_CERTIFICATE - value: /etc/harbor/ssl/trivy/tls.crt - {{- end }} - - name: "SCANNER_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL -{{- with .Values.trivy.extraEnvVars }} -{{- toYaml . | nindent 12 }} -{{- end }} - ports: - - name: api-server - containerPort: {{ template "harbor.trivy.containerPort" . }} - volumeMounts: - - name: data - mountPath: /home/scanner/.cache - subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} - readOnly: false - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - mountPath: /etc/harbor/ssl/trivy - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 10 }} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: -{{ toYaml .Values.trivy.resources | indent 12 }} - {{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }} - volumes: - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.trivy.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- if not .Values.persistence.enabled }} - - name: "data" - emptyDir: {} - {{- else if $trivy.existingClaim }} - - name: "data" - persistentVolumeClaim: - claimName: {{ $trivy.existingClaim }} - {{- end }} - {{- end }} - {{- with .Values.trivy.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.trivy.priorityClassName }} - priorityClassName: {{ .Values.trivy.priorityClassName }} - {{- end }} -{{- if and .Values.persistence.enabled (not $trivy.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $trivy.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $trivy.accessMode | quote }}] - {{- if $trivy.storageClass }} - {{- if (eq "-" $trivy.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $trivy.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $trivy.size | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/templates/trivy/trivy-svc.yaml b/charts/harbor/harbor/1.13.1/templates/trivy/trivy-svc.yaml deleted file mode 100644 index 24daf094e8..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/trivy/trivy-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{ if .Values.trivy.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.trivy" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-trivy" "http-trivy" .Values.internalTLS.enabled }} - protocol: TCP - port: {{ template "harbor.trivy.servicePort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: trivy -{{ end }} diff --git a/charts/harbor/harbor/1.13.1/templates/trivy/trivy-tls.yaml b/charts/harbor/harbor/1.13.1/templates/trivy/trivy-tls.yaml deleted file mode 100644 index a9c8330c37..0000000000 --- a/charts/harbor/harbor/1.13.1/templates/trivy/trivy-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.trivy.enabled .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.trivy.crt\" is required!" .Values.internalTLS.trivy.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.trivy.key\" is required!" .Values.internalTLS.trivy.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.13.1/values.yaml b/charts/harbor/harbor/1.13.1/values.yaml deleted file mode 100644 index 3da298bc49..0000000000 --- a/charts/harbor/harbor/1.13.1/values.yaml +++ /dev/null @@ -1,963 +0,0 @@ -expose: - # Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" - # and fill the information in the corresponding section - type: ingress - tls: - # Enable TLS or not. - # Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" - # Note: if the "expose.type" is "ingress" and TLS is disabled, - # the port must be included in the command when pulling/pushing images. - # Refer to https://github.com/goharbor/harbor/issues/5291 for details. - enabled: true - # The source of the tls certificate. Set as "auto", "secret" - # or "none" and fill the information in the corresponding section - # 1) auto: generate the tls certificate automatically - # 2) secret: read the tls certificate from the specified secret. - # The tls certificate can be generated manually or by cert manager - # 3) none: configure no tls certificate for the ingress. If the default - # tls certificate is configured in the ingress controller, choose this option - certSource: auto - auto: - # The common name used to generate the certificate, it's necessary - # when the type isn't "ingress" - commonName: "" - secret: - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - secretName: "" - ingress: - hosts: - core: core.harbor.domain - # set to the type of ingress controller if it has specific requirements. - # leave as `default` for most ingress controllers. - # set to `gce` if using the GCE ingress controller - # set to `ncp` if using the NCP (NSX-T Container Plugin) ingress controller - # set to `alb` if using the ALB ingress controller - # set to `f5-bigip` if using the F5 BIG-IP ingress controller - controller: default - ## Allow .Capabilities.KubeVersion.Version to be overridden while creating ingress - kubeVersionOverride: "" - className: "" - annotations: - # note different ingress controllers may require a different ssl-redirect annotation - # for Envoy, use ingress.kubernetes.io/force-ssl-redirect: "true" and remove the nginx lines below - ingress.kubernetes.io/ssl-redirect: "true" - ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - harbor: - # harbor ingress-specific annotations - annotations: {} - # harbor ingress-specific labels - labels: {} - clusterIP: - # The name of ClusterIP service - name: harbor - # Annotations on the ClusterIP service - annotations: {} - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - nodePort: - # The name of NodePort service - name: harbor - ports: - http: - # The service port Harbor listens on when serving HTTP - port: 80 - # The node port Harbor listens on when serving HTTP - nodePort: 30002 - https: - # The service port Harbor listens on when serving HTTPS - port: 443 - # The node port Harbor listens on when serving HTTPS - nodePort: 30003 - loadBalancer: - # The name of LoadBalancer service - name: harbor - # Set the IP if the LoadBalancer supports assigning IP - IP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - annotations: {} - sourceRanges: [] - -# The external URL for Harbor core service. It is used to -# 1) populate the docker/helm commands showed on portal -# 2) populate the token service URL returned to docker client -# -# Format: protocol://domain[:port]. Usually: -# 1) if "expose.type" is "ingress", the "domain" should be -# the value of "expose.ingress.hosts.core" -# 2) if "expose.type" is "clusterIP", the "domain" should be -# the value of "expose.clusterIP.name" -# 3) if "expose.type" is "nodePort", the "domain" should be -# the IP address of k8s node -# -# If Harbor is deployed behind the proxy, set it as the URL of proxy -externalURL: https://core.harbor.domain - -# The internal TLS used for harbor components secure communicating. In order to enable https -# in each component tls cert files need to provided in advance. -internalTLS: - # If internal TLS enabled - enabled: false - # enable strong ssl ciphers (default: false) - strong_ssl_ciphers: false - # There are three ways to provide tls - # 1) "auto" will generate cert automatically - # 2) "manual" need provide cert file manually in following value - # 3) "secret" internal certificates from secret - certSource: "auto" - # The content of trust ca, only available when `certSource` is "manual" - trustCa: "" - # core related cert configuration - core: - # secret name for core's tls certs - secretName: "" - # Content of core's TLS cert file, only available when `certSource` is "manual" - crt: "" - # Content of core's TLS key file, only available when `certSource` is "manual" - key: "" - # jobservice related cert configuration - jobservice: - # secret name for jobservice's tls certs - secretName: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - key: "" - # registry related cert configuration - registry: - # secret name for registry's tls certs - secretName: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - key: "" - # portal related cert configuration - portal: - # secret name for portal's tls certs - secretName: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - key: "" - # trivy related cert configuration - trivy: - # secret name for trivy's tls certs - secretName: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - key: "" - -ipFamily: - # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component - ipv6: - enabled: true - # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component - ipv4: - enabled: true - -# The persistence is enabled by default and a default StorageClass -# is needed in the k8s cluster to provision volumes dynamically. -# Specify another StorageClass in the "storageClass" or set "existingClaim" -# if you already have existing persistent volumes to use -# -# For storing images and charts, you can also use "azure", "gcs", "s3", -# "swift" or "oss". Set it in the "imageChartStorage" section -persistence: - enabled: true - # Setting it to "keep" to avoid removing PVCs during a helm delete - # operation. Leaving it empty will delete PVCs after the chart deleted - # (this does not apply for PVCs that are created for internal database - # and redis components, i.e. they are never deleted automatically) - resourcePolicy: "keep" - persistentVolumeClaim: - registry: - # Use the existing PVC which must be created manually before bound, - # and specify the "subPath" if the PVC is shared with other components - existingClaim: "" - # Specify the "storageClass" used to provision the volume. Or the default - # StorageClass will be used (the default). - # Set it to "-" to disable dynamic provisioning - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - jobservice: - jobLog: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external database is used, the following settings for database will - # be ignored - database: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external Redis is used, the following settings for Redis will - # be ignored - redis: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - trivy: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - # Define which storage backend is used for registry to store - # images and charts. Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#storage - # for the detail. - imageChartStorage: - # Specify whether to disable `redirect` for images and chart storage, for - # backends which not supported it (such as using minio for `s3` storage type), please disable - # it. To disable redirects, simply set `disableredirect` to `true` instead. - # Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#redirect - # for the detail. - disableredirect: false - # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate. - # The secret must contain keys named "ca.crt" which will be injected into the trust store - # of registry's containers. - # caBundleSecretName: - - # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift", - # "oss" and fill the information needed in the corresponding section. The type - # must be "filesystem" if you want to use persistent volumes for registry - type: filesystem - filesystem: - rootdirectory: /storage - #maxthreads: 100 - azure: - accountname: accountname - accountkey: base64encodedaccountkey - container: containername - #realm: core.windows.net - # To use existing secret, the key must be AZURE_STORAGE_ACCESS_KEY - existingSecret: "" - gcs: - bucket: bucketname - # The base64 encoded json file which contains the key - encodedkey: base64-encoded-json-key-file - #rootdirectory: /gcs/object/name/prefix - #chunksize: "5242880" - # To use existing secret, the key must be GCS_KEY_DATA - existingSecret: "" - useWorkloadIdentity: false - s3: - # Set an existing secret for S3 accesskey and secretkey - # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry - #existingSecret: "" - region: us-west-1 - bucket: bucketname - #accesskey: awsaccesskey - #secretkey: awssecretkey - #regionendpoint: http://myobjects.local - #encrypt: false - #keyid: mykeyid - #secure: true - #skipverify: false - #v4auth: true - #chunksize: "5242880" - #rootdirectory: /s3/object/name/prefix - #storageclass: STANDARD - #multipartcopychunksize: "33554432" - #multipartcopymaxconcurrency: 100 - #multipartcopythresholdsize: "33554432" - swift: - authurl: https://storage.myprovider.com/v3/auth - username: username - password: password - container: containername - #region: fr - #tenant: tenantname - #tenantid: tenantid - #domain: domainname - #domainid: domainid - #trustid: trustid - #insecureskipverify: false - #chunksize: 5M - #prefix: - #secretkey: secretkey - #accesskey: accesskey - #authversion: 3 - #endpointtype: public - #tempurlcontainerkey: false - #tempurlmethods: - oss: - accesskeyid: accesskeyid - accesskeysecret: accesskeysecret - region: regionname - bucket: bucketname - #endpoint: endpoint - #internal: false - #encrypt: false - #secure: true - #chunksize: 10M - #rootdirectory: rootdirectory - -imagePullPolicy: IfNotPresent - -# Use this set to assign a list of default pullSecrets -imagePullSecrets: -# - name: docker-registry-secret -# - name: internal-registry-secret - -# The update strategy for deployments with persistent volumes(jobservice, registry): "RollingUpdate" or "Recreate" -# Set it as "Recreate" when "RWM" for volumes isn't supported -updateStrategy: - type: RollingUpdate - -# debug, info, warning, error or fatal -logLevel: info - -# The initial password of Harbor admin. Change it from portal after launching Harbor -# or give an existing secret for it -# key in secret is given via (default to HARBOR_ADMIN_PASSWORD) -# existingSecretAdminPassword: -existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD -harborAdminPassword: "Harbor12345" - -# The name of the secret which contains key named "ca.crt". Setting this enables the -# download link on portal to download the CA certificate when the certificate isn't -# generated automatically -caSecretName: "" - -# The secret key used for encryption. Must be a string of 16 chars. -secretKey: "not-a-secure-key" -# If using existingSecretSecretKey, the key must be secretKey -existingSecretSecretKey: "" - -# The proxy settings for updating trivy vulnerabilities from the Internet and replicating -# artifacts from/to the registries that cannot be reached directly -proxy: - httpProxy: - httpsProxy: - noProxy: 127.0.0.1,localhost,.local,.internal - components: - - core - - jobservice - - trivy - -# Run the migration job via helm hook -enableMigrateHelmHook: false - -# The custom ca bundle secret, the secret must contain key named "ca.crt" -# which will be injected into the trust store for core, jobservice, registry, trivy components -# caBundleSecretName: "" - -## UAA Authentication Options -# If you're using UAA for authentication behind a self-signed -# certificate you will need to provide the CA Cert. -# Set uaaSecretName below to provide a pre-created secret that -# contains a base64 encoded CA Certificate named `ca.crt`. -# uaaSecretName: - -# If service exposed via "ingress", the Nginx will not be used -nginx: - image: - repository: goharbor/nginx-photon - tag: v2.9.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -portal: - image: - repository: goharbor/harbor-portal - tag: v2.9.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -core: - image: - repository: goharbor/harbor-core - tag: v2.9.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - ## Startup probe values - startupProbe: - enabled: true - initialDelaySeconds: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## User settings configuration json string - configureUserSettings: - # The provider for updating project quota(usage), there are 2 options, redis or db. - # By default it is implemented by db but you can configure it to redis which - # can improve the performance of high concurrent pushing to the same project, - # and reduce the database connections spike and occupies. - # Using redis will bring up some delay for quota usage updation for display, so only - # suggest switch provider to redis if you were ran into the db connections spike around - # the scenario of high concurrent pushing to same project, no improvment for other scenes. - quotaUpdateProvider: db # Or redis - # Secret is used when core server communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Fill in the name of a kubernetes secret if you want to use your own - # TLS certificate and private key for token encryption/decryption. - # The secret must contain keys named: - # "tls.key" - the private key - # "tls.crt" - the certificate - secretName: "" - # If not specifying a preexisting secret, a secret can be created from tokenKey and tokenCert and used instead. - # If none of secretName, tokenKey, and tokenCert are specified, an ephemeral key and certificate will be autogenerated. - # tokenKey and tokenCert must BOTH be set or BOTH unset. - # The tokenKey value is formatted as a multiline string containing a PEM-encoded RSA key, indented one more than tokenKey on the following line. - tokenKey: | - # If tokenKey is set, the value of tokenCert must be set as a PEM-encoded certificate signed by tokenKey, and supplied as a multiline string, indented one more than tokenCert on the following line. - tokenCert: | - # The XSRF key. Will be generated automatically if it isn't specified - xsrfKey: "" - ## The priority class to run the pod as - priorityClassName: - # The time duration for async update artifact pull_time and repository - # pull_count, the unit is second. Will be 10 seconds if it isn't set. - # eg. artifactPullAsyncFlushDuration: 10 - artifactPullAsyncFlushDuration: - gdpr: - deleteUser: false - -jobservice: - image: - repository: goharbor/harbor-jobservice - tag: v2.9.1 - replicas: 1 - revisionHistoryLimit: 10 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - maxJobWorkers: 10 - # The logger for jobs: "file", "database" or "stdout" - jobLoggers: - - file - # - database - # - stdout - # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days - notification: - webhook_job_max_retry: 3 - webhook_job_http_client_timeout: 3 # in seconds - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: 24 - # the max time for execution in running state without new task created - max_dangling_hours: 168 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - # Secret is used when job service communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - ## The priority class to run the pod as - priorityClassName: - -registry: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - registry: - image: - repository: goharbor/registry-photon - tag: v2.9.1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - controller: - image: - repository: goharbor/harbor-registryctl - tag: v2.9.1 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - replicas: 1 - revisionHistoryLimit: 10 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # Secret is used to secure the upload state from client - # and registry storage backend. - # See: https://github.com/distribution/distribution/blob/main/docs/configuration.md#http - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. - relativeurls: false - credentials: - username: "harbor_registry_user" - password: "harbor_registry_password" - # If using existingSecret, the key must be REGISTRY_PASSWD and REGISTRY_HTPASSWD - existingSecret: "" - # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. - # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string - middleware: - enabled: false - type: cloudFront - cloudFront: - baseurl: example.cloudfront.net - keypairid: KEYPAIRID - duration: 3000s - ipfilteredby: none - # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key - # that allows access to CloudFront - privateKeySecret: "my-secret" - # enable purge _upload directories - upload_purging: - enabled: true - # remove files in _upload directories which exist for a period of time, default is one week. - age: 168h - # the interval of the purge operations - interval: 24h - dryrun: false - -trivy: - # enabled the flag to enable Trivy scanner - enabled: true - image: - # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon - # tag the tag for Trivy adapter image - tag: v2.9.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # replicas the number of Pod replicas - replicas: 1 - # debugMode the flag to enable Trivy debug mode with more verbose scanning log - debugMode: false - # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`. - vulnType: "os,library" - # severity a comma-separated list of severities to be checked - severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - # ignoreUnfixed the flag to display only fixed vulnerabilities - ignoreUnfixed: false - # insecure the flag to skip verifying registry certificate - insecure: false - # gitHubToken the GitHub access token to download Trivy DB - # - # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases. - # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached - # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update - # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one. - # Currently, the database is updated every 12 hours and published as a new release to GitHub. - # - # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough - # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000 - # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult - # https://developer.github.com/v3/#rate-limiting - # - # You can create a GitHub token by following the instructions in - # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - gitHubToken: "" - # skipUpdate the flag to disable Trivy DB downloads from GitHub - # - # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues. - # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the - # `/home/scanner/.cache/trivy/db/trivy.db` path. - skipUpdate: false - # The offlineScan option prevents Trivy from sending API requests to identify dependencies. - # - # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it. - # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't - # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode. - # It would work if all the dependencies are in local. - # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment. - offlineScan: false - # Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. Defaults to `vuln`. - securityCheck: "vuln" - # The duration to wait for scan completion - timeout: 5m0s - resources: - requests: - cpu: 200m - memory: 512Mi - limits: - cpu: 1 - memory: 1Gi - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -database: - # if external database is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-db - tag: v2.9.1 - # The initial superuser password for internal database - password: "changeit" - # The size limit for Shared memory, pgSQL use it for shared_buffer - # More details see: - # https://github.com/goharbor/harbor/issues/15034 - shmSizeLimit: 512Mi - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - # The timeout used in livenessProbe; 1 to 5 seconds - livenessProbe: - timeoutSeconds: 1 - # The timeout used in readinessProbe; 1 to 5 seconds - readinessProbe: - timeoutSeconds: 1 - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - initContainer: - migrator: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - permissions: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - external: - host: "192.168.0.1" - port: "5432" - username: "user" - password: "password" - coreDatabase: "registry" - # if using existing secret, the key must be "password" - existingSecret: "" - # "disable" - No SSL - # "require" - Always SSL (skip verification) - # "verify-ca" - Always SSL (verify that the certificate presented by the - # server was signed by a trusted CA) - # "verify-full" - Always SSL (verify that the certification presented by the - # server was signed by a trusted CA and the server host name matches the one - # in the certificate) - sslmode: "disable" - # The maximum number of connections in the idle connection pool per pod (core+exporter). - # If it <=0, no idle connections are retained. - maxIdleConns: 100 - # The maximum number of open connections to the database per pod (core+exporter). - # If it <= 0, then there is no limit on the number of open connections. - # Note: the default number of connections is 1024 for postgre of harbor. - maxOpenConns: 900 - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -redis: - # if external Redis is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/redis-photon - tag: v2.9.1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # # jobserviceDatabaseIndex defaults to "1" - # # registryDatabaseIndex defaults to "2" - # # trivyAdapterIndex defaults to "5" - # # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - external: - # support redis, redis+sentinel - # addr for redis: : - # addr for redis+sentinel: :,:,: - addr: "192.168.0.2:6379" - # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel - sentinelMasterSet: "" - # The "coreDatabaseIndex" must be "0" as the library Harbor - # used doesn't support configuring it - # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - coreDatabaseIndex: "0" - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - # username field can be an empty string, and it will be authenticated against the default user - username: "" - password: "" - # If using existingSecret, the key must be REDIS_PASSWORD - existingSecret: "" - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -exporter: - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-exporter - tag: v2.9.1 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - cacheDuration: 23 - cacheCleanInterval: 14400 - ## The priority class to run the pod as - priorityClassName: - -metrics: - enabled: false - core: - path: /metrics - port: 8001 - registry: - path: /metrics - port: 8001 - jobservice: - path: /metrics - port: 8001 - exporter: - path: /metrics - port: 8001 - ## Create prometheus serviceMonitor to scrape harbor metrics. - ## This requires the monitoring.coreos.com/v1 CRD. Please see - ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md - ## - serviceMonitor: - enabled: false - additionalLabels: {} - # Scrape interval. If not set, the Prometheus default scrape interval is used. - interval: "" - # Metric relabel configs to apply to samples before ingestion. - metricRelabelings: - [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - # Relabel configs to apply to samples before ingestion. - relabelings: - [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] - # separator: ; - # regex: ^(.*)$ - # targetLabel: nodename - # replacement: $1 - # action: replace - -trace: - enabled: false - # trace provider: jaeger or otel - # jaeger should be 1.26+ - provider: jaeger - # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth - sample_rate: 1 - # namespace used to differentiate different harbor services - # namespace: - # attributes is a key value dict contains user defined attributes used to initialize trace provider - # attributes: - # application: harbor - jaeger: - # jaeger supports two modes: - # collector mode(uncomment endpoint and uncomment username, password if needed) - # agent mode(uncomment agent_host and agent_port) - endpoint: http://hostname:14268/api/traces - # username: - # password: - # agent_host: hostname - # export trace data by jaeger.thrift in compact mode - # agent_port: 6831 - otel: - endpoint: hostname:4318 - url_path: /v1/traces - compression: false - insecure: true - # timeout is in seconds - timeout: 10 - -# cache layer configurations -# if this feature enabled, harbor will cache the resource -# `project/project_metadata/repository/artifact/manifest` in the redis -# which help to improve the performance of high concurrent pulling manifest. -cache: - # default is not enabled. - enabled: false - # default keep cache for one day. - expireHours: 24 diff --git a/charts/harbor/harbor/1.14.0/.helmignore b/charts/harbor/harbor/1.14.0/.helmignore deleted file mode 100644 index b4424fd59b..0000000000 --- a/charts/harbor/harbor/1.14.0/.helmignore +++ /dev/null @@ -1,6 +0,0 @@ -.github/* -docs/* -.git/* -.gitignore -CONTRIBUTING.md -test/* \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/Chart.yaml b/charts/harbor/harbor/1.14.0/Chart.yaml deleted file mode 100644 index c2acd24b28..0000000000 --- a/charts/harbor/harbor/1.14.0/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor -apiVersion: v1 -appVersion: 2.10.0 -description: An open source trusted cloud native registry that stores, signs, and - scans content -home: https://goharbor.io -icon: https://raw.githubusercontent.com/goharbor/website/main/static/img/logos/harbor-icon-color.png -keywords: -- docker -- registry -- harbor -maintainers: -- email: yinw@vmware.com - name: Wenkai Yin -- email: hweiwei@vmware.com - name: Weiwei He -- email: yshengwen@vmware.com - name: Shengwen Yu -name: harbor -sources: -- https://github.com/goharbor/harbor -- https://github.com/goharbor/harbor-helm -version: 1.14.0 diff --git a/charts/harbor/harbor/1.14.0/LICENSE b/charts/harbor/harbor/1.14.0/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/charts/harbor/harbor/1.14.0/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/charts/harbor/harbor/1.14.0/README.md b/charts/harbor/harbor/1.14.0/README.md deleted file mode 100644 index c69f54c035..0000000000 --- a/charts/harbor/harbor/1.14.0/README.md +++ /dev/null @@ -1,408 +0,0 @@ -# Helm Chart for Harbor - -**Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be found [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. - -This repository, including the issues, focuses on deploying Harbor chart via helm. For functionality issues or Harbor questions, please open issues on [goharbor/harbor](https://github.com/goharbor/harbor) - -## Introduction - -This [Helm](https://github.com/kubernetes/helm) chart installs [Harbor](https://github.com/goharbor/harbor) in a Kubernetes cluster. Welcome to [contribute](CONTRIBUTING.md) to Helm Chart for Harbor. - -## Prerequisites - -- Kubernetes cluster 1.20+ -- Helm v3.2.0+ - -## Installation - -### Add Helm repository - -```bash -helm repo add harbor https://helm.goharbor.io -``` - -### Configure the chart - -The following items can be set via `--set` flag during installation or configured by editing the `values.yaml` directly (need to download the chart first). - -#### Configure how to expose Harbor service - -- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. - **Notes:** if TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to issue [#5291](https://github.com/goharbor/harbor/issues/5291) for details. -- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. -- **NodePort**: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. -- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. - -#### Configure the external URL - -The external URL for Harbor core service is used to: - -1. populate the docker/helm commands showed on portal -2. populate the token service URL returned to docker client - -Format: `protocol://domain[:port]`. Usually: - -- if service exposed via `Ingress`, the `domain` should be the value of `expose.ingress.hosts.core` -- if service exposed via `ClusterIP`, the `domain` should be the value of `expose.clusterIP.name` -- if service exposed via `NodePort`, the `domain` should be the IP address of one Kubernetes node -- if service exposed via `LoadBalancer`, set the `domain` as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider - -If Harbor is deployed behind the proxy, set it as the URL of proxy. - -#### Configure how to persist data - -- **Disable**: The data does not survive the termination of a pod. -- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you already have existing persistent volumes to use. -- **External Storage(only for images and charts)**: For images and charts, the external storages are supported: `azure`, `gcs`, `s3` `swift` and `oss`. - -#### Configure the other items listed in [configuration](#configuration) section - -### Install the chart - -Install the Harbor helm chart with a release name `my-release`: -```bash -helm install my-release harbor/harbor -``` - -## Uninstallation - -To uninstall/delete the `my-release` deployment: -```bash -helm uninstall my-release -``` - -## Configuration - -The following table lists the configurable parameters of the Harbor chart and the default values. - -| Parameter | Description | Default | -| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| **Expose** | | | -| `expose.type` | How to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` | -| `expose.tls.enabled` | Enable TLS or not. Delete the `ssl-redirect` annotations in `expose.ingress.annotations` when TLS is disabled and `expose.type` is `ingress`. Note: if the `expose.type` is `ingress` and TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to https://github.com/goharbor/harbor/issues/5291 for details. | `true` | -| `expose.tls.certSource` | The source of the TLS certificate. Set as `auto`, `secret` or `none` and fill the information in the corresponding section: 1) auto: generate the TLS certificate automatically 2) secret: read the TLS certificate from the specified secret. The TLS certificate can be generated manually or by cert manager 3) none: configure no TLS certificate for the ingress. If the default TLS certificate is configured in the ingress controller, choose this option | `auto` | -| `expose.tls.auto.commonName` | The common name used to generate the certificate, it's necessary when the type isn't `ingress` | | -| `expose.tls.secret.secretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key | | -| `expose.ingress.hosts.core` | The host of Harbor core service in ingress rule | `core.harbor.domain` | -| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce`, `alb`, `f5-bigip` and `ncp` | `default` | -| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | | -| `expose.ingress.annotations` | The annotations used commonly for ingresses | | -| `expose.ingress.harbor.annotations` | The annotations specific to harbor ingress | {} | -| `expose.ingress.harbor.labels` | The labels specific to harbor ingress | {} | -| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` | -| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} | -| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.clusterIP.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.name` | The name of NodePort service | `harbor` | -| `expose.nodePort.ports.http.port` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.nodePort.ports.http.nodePort` | The node port Harbor listens on when serving HTTP | `30002` | -| `expose.nodePort.ports.https.port` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.ports.https.nodePort` | The node port Harbor listens on when serving HTTPS | `30003` | -| `expose.loadBalancer.name` | The name of service | `harbor` | -| `expose.loadBalancer.IP` | The IP of the loadBalancer. It only works when loadBalancer supports assigning IP | `""` | -| `expose.loadBalancer.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.loadBalancer.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `30002` | -| `expose.loadBalancer.annotations` | The annotations attached to the loadBalancer service | {} | -| `expose.loadBalancer.sourceRanges` | List of IP address ranges to assign to loadBalancerSourceRanges | [] | -| **Internal TLS** | | | -| `internalTLS.enabled` | Enable TLS for the components (core, jobservice, portal, registry, trivy) | `false` | -| `internalTLS.strong_ssl_ciphers` | Enable strong ssl ciphers for nginx and portal | `false` -| `internalTLS.certSource` | Method to provide TLS for the components, options are `auto`, `manual`, `secret`. | `auto` | -| `internalTLS.trustCa` | The content of trust CA, only available when `certSource` is `manual`. **Note**: all the internal certificates of the components must be issued by this CA | | -| `internalTLS.core.secretName` | The secret name for core component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.core.crt` | Content of core's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.core.key` | Content of core's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.secretName` | The secret name for jobservice component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.jobservice.crt` | Content of jobservice's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.key` | Content of jobservice's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.registry.secretName` | The secret name for registry component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.registry.crt` | Content of registry's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.registry.key` | Content of registry's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.portal.secretName` | The secret name for portal component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.portal.crt` | Content of portal's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.portal.key` | Content of portal's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.secretName` | The secret name for trivy component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.trivy.crt` | Content of trivy's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.key` | Content of trivy's TLS key file, only available when `certSource` is `manual` | | -| **IPFamily** | | | -| `ipFamily.ipv4.enabled` | if cluster is ipv4 enabled, all ipv4 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| `ipFamily.ipv6.enabled` | if cluster is ipv6 enabled, all ipv6 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| **Persistence** | | | -| `persistence.enabled` | Enable the data persistence or not | `true` | -| `persistence.resourcePolicy` | Setting it to `keep` to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted. Does not affect PVCs created for internal database and redis components. | `keep` | -| `persistence.persistentVolumeClaim.registry.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.registry.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.registry.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.registry.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.registry.size` | The size of the volume | `5Gi` | -| `persistence.persistentVolumeClaim.registry.annotations` | The annotations of the volume | | -|`persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.database.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.subPath` | The sub path used in the volume. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.accessMode` | The access mode of the volume. If external database is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.database.size` | The size of the volume. If external database is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.database.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.redis.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.subPath` | The sub path used in the volume. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.accessMode` | The access mode of the volume. If external Redis is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.redis.size` | The size of the volume. If external Redis is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.redis.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.trivy.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.trivy.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.trivy.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.trivy.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.trivy.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.trivy.annotations` | The annotations of the volume | | -| `persistence.imageChartStorage.disableredirect` | The configuration for managing redirects from content backends. For backends which not supported it (such as using minio for `s3` storage type), please set it to `true` to disable redirects. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect) for more details | `false` | -| `persistence.imageChartStorage.caBundleSecretName` | Specify the `caBundleSecretName` if the storage service uses a self-signed certificate. The secret must contain keys named `ca.crt` which will be injected into the trust store of registry's and containers. | | -| `persistence.imageChartStorage.type` | The type of storage for images and charts: `filesystem`, `azure`, `gcs`, `s3`, `swift` or `oss`. The type must be `filesystem` if you want to use persistent volumes for registry. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#storage) for more details | `filesystem` | -| `persistence.imageChartStorage.gcs.existingSecret` | An existing secret containing the gcs service account json key. The key must be gcs-key.json. | `""` | -| `persistence.imageChartStorage.gcs.useWorkloadIdentity` | A boolean to allow the use of workloadidentity in a GKE cluster. To use it, create a kubernetes service account and set the name in the key `serviceAccountName` of each component, then allow automounting the service account. | `false` | -| **General** | | | -| `externalURL` | The external URL for Harbor core service | `https://core.harbor.domain` | -| `caBundleSecretName` | The custom CA bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for core, jobservice, registry, trivy components. | | -| `uaaSecretName` | If using external UAA auth which has a self signed cert, you can provide a pre-created secret containing it under the key `ca.crt`. | | -| `imagePullPolicy` | The image pull policy | | -| `imagePullSecrets` | The imagePullSecrets names for all deployments | | -| `updateStrategy.type` | The update strategy for deployments with persistent volumes(jobservice, registry): `RollingUpdate` or `Recreate`. Set it as `Recreate` when `RWM` for volumes isn't supported | `RollingUpdate` | -| `logLevel` | The log level: `debug`, `info`, `warning`, `error` or `fatal` | `info` | -| `harborAdminPassword` | The initial password of Harbor admin. Change it from portal after launching Harbor | `Harbor12345` | -| `existingSecretAdminPassword` | The name of secret where admin password can be found. | | -| `existingSecretAdminPasswordKey` | The name of the key in the secret where to find harbor admin password Harbor | `HARBOR_ADMIN_PASSWORD` | -| `caSecretName` | The name of the secret which contains key named `ca.crt`. Setting this enables the download link on portal to download the CA certificate when the certificate isn't generated automatically | | -| `secretKey` | The key used for encryption. Must be a string of 16 chars | `not-a-secure-key` | -| `existingSecretSecretKey` | An existing secret containing the encoding secretKey | `""` | -| `proxy.httpProxy` | The URL of the HTTP proxy server | | -| `proxy.httpsProxy` | The URL of the HTTPS proxy server | | -| `proxy.noProxy` | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal | -| `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | -| `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | -| **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | -| `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | -| `nginx.image.tag` | Image tag | `dev` | -| `nginx.replicas` | The replica count | `1` | -| `nginx.revisionHistoryLimit` | The revision history limit | `10` | -| `nginx.resources` | The [resources] to allocate for container | undefined | -| `nginx.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `nginx.nodeSelector` | Node labels for pod assignment | `{}` | -| `nginx.tolerations` | Tolerations for pod assignment | `[]` | -| `nginx.affinity` | Node/Pod affinities | `{}` | -| `nginx.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | -| `nginx.priorityClassName` | The priority class to run the pod as | | -| **Portal** | | | -| `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | -| `portal.image.tag` | Tag for portal image | `dev` | -| `portal.replicas` | The replica count | `1` | -| `portal.revisionHistoryLimit` | The revision history limit | `10` | -| `portal.resources` | The [resources] to allocate for container | undefined | -| `portal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `portal.nodeSelector` | Node labels for pod assignment | `{}` | -| `portal.tolerations` | Tolerations for pod assignment | `[]` | -| `portal.affinity` | Node/Pod affinities | `{}` | -| `portal.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` | -| `portal.serviceAnnotations` | Annotations to add to the portal service | `{}` | -| `portal.priorityClassName` | The priority class to run the pod as | | -| **Core** | | | -| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | -| `core.image.tag` | Tag for Harbor core image | `dev` | -| `core.replicas` | The replica count | `1` | -| `core.revisionHistoryLimit` | The revision history limit | `10` | -| `core.startupProbe.initialDelaySeconds` | The initial delay in seconds for the startup probe | `10` | -| `core.resources` | The [resources] to allocate for container | undefined | -| `core.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `core.nodeSelector` | Node labels for pod assignment | `{}` | -| `core.tolerations` | Tolerations for pod assignment | `[]` | -| `core.affinity` | Node/Pod affinities | `{}` | -| `core.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `core.podAnnotations` | Annotations to add to the core pod | `{}` | -| `core.serviceAnnotations` | Annotations to add to the core service | `{}` | -| `core.configureUserSettings` | A JSON string to set in the environment variable `CONFIG_OVERWRITE_JSON` to configure user settings. See the [official docs](https://goharbor.io/docs/latest/install-config/configure-user-settings-cli/#configure-users-settings-using-an-environment-variable). | | -| `core.quotaUpdateProvider` | The provider for updating project quota(usage), there are 2 options, redis or db. By default it is implemented by db but you can configure it to redis which can improve the performance of high concurrent pushing to the same project, and reduce the database connections spike and occupies. Using redis will bring up some delay for quota usage updation for display, so only suggest switch provider to redis if you were ran into the db connections spike around the scenario of high concurrent pushing to same project, no improvment for other scenes. | `db` | -| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `core.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate and private key for token encryption/decryption. The secret must contain keys named: `tls.crt` - the certificate and `tls.key` - the private key. The default key pair will be used if it isn't set | | -| `core.tokenKey` | PEM-formatted RSA private key used to sign service tokens. Only used if `core.secretName` is unset. If set, `core.tokenCert` MUST also be set. | | -| `core.tokenCert` | PEM-formatted certificate signed by `core.tokenKey` used to validate service tokens. Only used if `core.secretName` is unset. If set, `core.tokenKey` MUST also be set. | | -| `core.xsrfKey` | The XSRF key. Will be generated automatically if it isn't specified | | -| `core.priorityClassName` | The priority class to run the pod as | | -| `core.artifactPullAsyncFlushDuration` | The time duration for async update artifact pull_time and repository pull_count | | -| `core.gdpr.deleteUser` | Enable GDPR compliant user delete | `false` | -| **Jobservice** | | | -| `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | -| `jobservice.image.tag` | Tag for jobservice image | `dev` | -| `jobservice.replicas` | The replica count | `1` | -| `jobservice.revisionHistoryLimit` | The revision history limit | `10` | -| `jobservice.maxJobWorkers` | The max job workers | `10` | -| `jobservice.jobLoggers` | The loggers for jobs: `file`, `database` or `stdout` | `[file]` | -| `jobservice.loggerSweeperDuration` | The jobLogger sweeper duration in days (ignored if `jobLoggers` is set to `stdout`) | `14` | -| `jobservice.notification.webhook_job_max_retry` | The maximum retry of webhook sending notifications | `3` | -| `jobservice.notification.webhook_job_http_client_timeout` | The http client timeout value of webhook sending notifications | `3` | -| `jobservice.reaper.max_update_hours` | the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 | `24` | -| `jobservice.reaper.max_dangling_hours` | the max time for execution in running state without new task created | `168` | -| `jobservice.resources` | The [resources] to allocate for container | undefined | -| `jobservice.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `jobservice.nodeSelector` | Node labels for pod assignment | `{}` | -| `jobservice.tolerations` | Tolerations for pod assignment | `[]` | -| `jobservice.affinity` | Node/Pod affinities | `{}` | -| `jobservice.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` | -| `jobservice.priorityClassName` | The priority class to run the pod as | | -| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| **Registry** | | | -| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | -| `registry.registry.image.tag` | Tag for registry image | `dev` | -| `registry.registry.resources` | The [resources] to allocate for container | undefined | -| `registry.controller.image.repository` | Repository for registry controller image | `goharbor/harbor-registryctl` | -| `registry.controller.image.tag` | Tag for registry controller image | `dev` | -| `registry.controller.resources` | The [resources] to allocate for container | undefined | -| `registry.replicas` | The replica count | `1` | -| `registry.revisionHistoryLimit` | The revision history limit | `10` | -| `registry.nodeSelector` | Node labels for pod assignment | `{}` | -| `registry.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `registry.tolerations` | Tolerations for pod assignment | `[]` | -| `registry.affinity` | Node/Pod affinities | `{}` | -| `registry.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | | -| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` | -| `registry.priorityClassName` | The priority class to run the pod as | | -| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `registry.credentials.username` | The username that harbor core uses internally to access the registry instance. Together with the `registry.credentials.password`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` | -| `registry.credentials.password` | The password that harbor core uses internally to access the registry instance. Together with the `registry.credentials.username`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). It is suggested you update this value before installation. | `harbor_registry_password` | -| `registry.credentials.existingSecret` | An existing secret containing the password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). The key must be `REGISTRY_PASSWD` | `""` | -| `registry.credentials.htpasswdString` | Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. | undefined | -| `registry.relativeurls` | If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. Needed if harbor is behind a reverse proxy | `false` | -| `registry.upload_purging.enabled` | If true, enable purge _upload directories | `true` | -| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` | -| `registry.upload_purging.interval` | The interval of the purge operations | `24h` | -| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` | -| **[Trivy][trivy]** | | | -| `trivy.enabled` | The flag to enable Trivy scanner | `true` | -| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` | -| `trivy.image.tag` | Tag for Trivy adapter image | `dev` | -| `trivy.resources` | The [resources] to allocate for Trivy adapter container | | -| `trivy.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `trivy.replicas` | The number of Pod replicas | `1` | -| `trivy.debugMode` | The flag to enable Trivy debug mode | `false` | -| `trivy.vulnType` | Comma-separated list of vulnerability types. Possible values `os` and `library`. | `os,library` | -| `trivy.severity` | Comma-separated list of severities to be checked | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | -| `trivy.ignoreUnfixed` | The flag to display only fixed vulnerabilities | `false` | -| `trivy.insecure` | The flag to skip verifying registry certificate | `false` | -| `trivy.skipUpdate` | The flag to disable [Trivy DB][trivy-db] downloads from GitHub | `false` | -| `trivy.offlineScan` | The flag prevents Trivy from sending API requests to identify dependencies. | `false` | -| `trivy.securityCheck` | Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. | `vuln` | -| `trivy.timeout` | The duration to wait for scan completion | `5m0s` | -| `trivy.gitHubToken` | The GitHub access token to download [Trivy DB][trivy-db] (see [GitHub rate limiting][trivy-rate-limiting]) | | -| `trivy.priorityClassName` | The priority class to run the pod as | | -| `trivy.topologySpreadConstraints` | The priority class to run the pod as | | -| **Database** | | | -| `database.type` | If external database is used, set it to `external` | `internal` | -| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` | -| `database.internal.image.tag` | Tag for database image | `dev` | -| `database.internal.password` | The password for database | `changeit` | -| `database.internal.shmSizeLimit` | The limit for the size of shared memory for internal PostgreSQL, conventionally it's around 50% of the memory limit of the container | `512Mi` | -| `database.internal.resources` | The [resources] to allocate for container | undefined | -| `database.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `database.internal.initContainer.migrator.resources` | The [resources] to allocate for the database migrator initContainer | undefined | -| `database.internal.initContainer.permissions.resources` | The [resources] to allocate for the database permissions initContainer | undefined | -| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `database.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `database.internal.affinity` | Node/Pod affinities | `{}` | -| `database.internal.priorityClassName` | The priority class to run the pod as | | -| `database.internal.livenessProbe.timeoutSeconds` | The timeout used in liveness probe; 1 to 5 seconds | 1 | -| `database.internal.readinessProbe.timeoutSeconds` | The timeout used in readiness probe; 1 to 5 seconds | 1 | -| `database.external.host` | The hostname of external database | `192.168.0.1` | -| `database.external.port` | The port of external database | `5432` | -| `database.external.username` | The username of external database | `user` | -| `database.external.password` | The password of external database | `password` | -| `database.external.coreDatabase` | The database used by core service | `registry` | -| `database.external.existingSecret` | An existing password containing the database password. the key must be `password`. | `""` | -| `database.external.sslmode` | Connection method of external database (require, verify-full, verify-ca, disable) | `disable` | -| `database.maxIdleConns` | The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained. | `50` | -| `database.maxOpenConns` | The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections. | `100` | -| `database.podAnnotations` | Annotations to add to the database pod | `{}` | -| **Redis** | | | -| `redis.type` | If external redis is used, set it to `external` | `internal` | -| `redis.internal.image.repository` | Repository for redis image | `goharbor/redis-photon` | -| `redis.internal.image.tag` | Tag for redis image | `dev` | -| `redis.internal.resources` | The [resources] to allocate for container | undefined | -| `redis.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `redis.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `redis.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `redis.internal.affinity` | Node/Pod affinities | `{}` | -| `redis.internal.priorityClassName` | The priority class to run the pod as | | -| `redis.internal.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.internal.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.internal.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.internal.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.internal.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.addr` | The addr of external Redis: :. When using sentinel, it should be :,:,: | `192.168.0.2:6379` | -| `redis.external.sentinelMasterSet` | The name of the set of Redis instances to monitor | | -| `redis.external.coreDatabaseIndex` | The database index for core | `0` | -| `redis.external.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.external.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.external.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.external.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.external.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.username` | The username of external Redis | | -| `redis.external.password` | The password of external Redis | | -| `redis.external.existingSecret` | Use an existing secret to connect to redis. The key must be `REDIS_PASSWORD`. | `""` | -| `redis.podAnnotations` | Annotations to add to the redis pod | `{}` | -| **Exporter** | | | -| `exporter.replicas` | The replica count | `1` | -| `exporter.revisionHistoryLimit` | The revision history limit | `10` | -| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` | -| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` | -| `exporter.image.tag` | Tag for exporter image | `dev` | -| `exporter.nodeSelector` | Node labels for pod assignment | `{}` | -| `exporter.tolerations` | Tolerations for pod assignment | `[]` | -| `exporter.affinity` | Node/Pod affinities | `{}` | -| `exporter.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `exporter.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `exporter.cacheDuration` | the cache duration for information that exporter collected from Harbor | `30` | -| `exporter.cacheCleanInterval` | cache clean interval for information that exporter collected from Harbor | `14400` | -| `exporter.priorityClassName` | The priority class to run the pod as | | -| **Metrics** | | | -| `metrics.enabled` | if enable harbor metrics | `false` | -| `metrics.core.path` | the url path for core metrics | `/metrics` | -| `metrics.core.port` | the port for core metrics | `8001` | -| `metrics.registry.path` | the url path for registry metrics | `/metrics` | -| `metrics.registry.port` | the port for registry metrics | `8001` | -| `metrics.exporter.path` | the url path for exporter metrics | `/metrics` | -| `metrics.exporter.port` | the port for exporter metrics | `8001` | -| `metrics.serviceMonitor.enabled` | create prometheus serviceMonitor. Requires prometheus CRD's | `false` | -| `metrics.serviceMonitor.additionalLabels` | additional labels to upsert to the manifest | `""` | -| `metrics.serviceMonitor.interval` | scrape period for harbor metrics | `""` | -| `metrics.serviceMonitor.metricRelabelings` | metrics relabel to add/mod/del before ingestion | `[]` | -| `metrics.serviceMonitor.relabelings` | relabels to add/mod/del to sample before scrape | `[]` | -| **Trace** | | | -| `trace.enabled` | Enable tracing or not | `false` | -| `trace.provider` | The tracing provider: `jaeger` or `otel`. `jaeger` should be 1.26+ | `jaeger` | -| `trace.sample_rate` | Set `sample_rate` to 1 if you want sampling 100% of trace data; set 0.5 if you want sampling 50% of trace data, and so forth | `1` | -| `trace.namespace` | Namespace used to differentiate different harbor services | | -| `trace.attributes` | `attributes` is a key value dict contains user defined attributes used to initialize trace provider | | -| `trace.jaeger.endpoint` | The endpoint of jaeger | `http://hostname:14268/api/traces` | -| `trace.jaeger.username` | The username of jaeger | | -| `trace.jaeger.password` | The password of jaeger | | -| `trace.jaeger.agent_host` | The agent host of jaeger | | -| `trace.jaeger.agent_port` | The agent port of jaeger | `6831` | -| `trace.otel.endpoint` | The endpoint of otel | `hostname:4318` | -| `trace.otel.url_path` | The URL path of otel | `/v1/traces` | -| `trace.otel.compression` | Whether enable compression or not for otel | `false` | -| `trace.otel.insecure` | Whether establish insecure connection or not for otel | `true` | -| `trace.otel.timeout` | The timeout in seconds of otel | `10` | -| **Cache** | | | -| `cache.enabled` | Enable cache layer or not | `false` | -| `cache.expireHours` | The expire hours of cache layer | `24` | - -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[trivy]: https://github.com/aquasecurity/trivy -[trivy-db]: https://github.com/aquasecurity/trivy-db -[trivy-rate-limiting]: https://github.com/aquasecurity/trivy#github-rate-limiting diff --git a/charts/harbor/harbor/1.14.0/templates/NOTES.txt b/charts/harbor/harbor/1.14.0/templates/NOTES.txt deleted file mode 100644 index 0980c08a35..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }} -For more details, please visit https://github.com/goharbor/harbor diff --git a/charts/harbor/harbor/1.14.0/templates/_helpers.tpl b/charts/harbor/harbor/1.14.0/templates/_helpers.tpl deleted file mode 100644 index 8fce623dbc..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/_helpers.tpl +++ /dev/null @@ -1,566 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "harbor.name" -}} -{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "harbor.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "harbor" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Helm required labels */}} -{{- define "harbor.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* matchLabels */}} -{{- define "harbor.matchLabels" -}} -release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* Helper for printing values from existing secrets*/}} -{{- define "harbor.secretKeyHelper" -}} - {{- if and (not (empty .data)) (hasKey .data .key) }} - {{- index .data .key | b64dec -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCert" -}} - {{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForIngress" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (eq .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForNginx" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (ne .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.host" -}} - {{- if eq .Values.database.type "internal" -}} - {{- template "harbor.database" . }} - {{- else -}} - {{- .Values.database.external.host -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.port" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "5432" -}} - {{- else -}} - {{- .Values.database.external.port -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.username" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "postgres" -}} - {{- else -}} - {{- .Values.database.external.username -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.rawPassword" -}} - {{- if eq .Values.database.type "internal" -}} - {{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.database" .) -}} - {{- if and (not (empty $existingSecret)) (hasKey $existingSecret.data "POSTGRES_PASSWORD") -}} - {{- .Values.database.internal.password | default (index $existingSecret.data "POSTGRES_PASSWORD") | b64dec -}} - {{- else -}} - {{- .Values.database.internal.password -}} - {{- end -}} - {{- else -}} - {{- .Values.database.external.password -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.escapedRawPassword" -}} - {{- include "harbor.database.rawPassword" . | urlquery | replace "+" "%20" -}} -{{- end -}} - -{{- define "harbor.database.encryptedPassword" -}} - {{- include "harbor.database.rawPassword" . | b64enc | quote -}} -{{- end -}} - -{{- define "harbor.database.coreDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "registry" -}} - {{- else -}} - {{- .Values.database.external.coreDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.sslmode" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "disable" -}} - {{- else -}} - {{- .Values.database.external.sslmode -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.redis.scheme" -}} - {{- with .Values.redis }} - {{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }} - {{- end }} -{{- end -}} - -/*host:port*/ -{{- define "harbor.redis.addr" -}} - {{- with .Values.redis }} - {{- ternary (printf "%s:6379" (include "harbor.redis" $ )) .external.addr (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.masterSet" -}} - {{- with .Values.redis }} - {{- ternary .external.sentinelMasterSet "" (eq "redis+sentinel" (include "harbor.redis.scheme" $)) }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.password" -}} - {{- with .Values.redis }} - {{- ternary "" .external.password (eq .type "internal") }} - {{- end }} -{{- end -}} - - -{{- define "harbor.redis.pwdfromsecret" -}} - {{- (lookup "v1" "Secret" .Release.Namespace (.Values.redis.external.existingSecret)).data.REDIS_PASSWORD | b64dec }} -{{- end -}} - -{{- define "harbor.redis.cred" -}} - {{- with .Values.redis }} - {{- if (and (eq .type "external" ) (.external.existingSecret)) }} - {{- printf ":%s@" (include "harbor.redis.pwdfromsecret" $) }} - {{- else }} - {{- ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }} - {{- end }} - {{- end }} -{{- end -}} - -/*scheme://[:password@]host:port[/master_set]*/ -{{- define "harbor.redis.url" -}} - {{- with .Values.redis }} - {{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }} - {{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) (include "harbor.redis.cred" $) (include "harbor.redis.addr" $) $path -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCore" -}} - {{- with .Values.redis }} - {{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index*/ -{{- define "harbor.redis.urlForJobservice" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.jobserviceDatabaseIndex .external.jobserviceDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForRegistry" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForTrivy" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.trivyAdapterIndex .external.trivyAdapterIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForHarbor" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.harborDatabaseIndex .external.harborDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCache" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.cacheLayerDatabaseIndex .external.cacheLayerDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.dbForRegistry" -}} - {{- with .Values.redis }} - {{- ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.noProxy" -}} - {{- printf "%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}} -{{- end -}} - -{{- define "harbor.caBundleVolume" -}} -- name: ca-bundle-certs - secret: - secretName: {{ .Values.caBundleSecretName }} -{{- end -}} - -{{- define "harbor.caBundleVolumeMount" -}} -- name: ca-bundle-certs - mountPath: /harbor_cust_cert/custom-ca.crt - subPath: ca.crt -{{- end -}} - -{{/* scheme for all components because it only support http mode */}} -{{- define "harbor.component.scheme" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "https" -}} - {{- else -}} - {{- printf "http" -}} - {{- end -}} -{{- end -}} - -{{/* core component container port */}} -{{- define "harbor.core.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* core component service port */}} -{{- define "harbor.core.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component container port */}} -{{- define "harbor.jobservice.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component service port */}} -{{- define "harbor.jobservice.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* portal component container port */}} -{{- define "harbor.portal.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* portal component service port */}} -{{- define "harbor.portal.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* registry component container port */}} -{{- define "harbor.registry.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registry component service port */}} -{{- define "harbor.registry.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component container port */}} -{{- define "harbor.registryctl.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component service port */}} -{{- define "harbor.registryctl.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component container port */}} -{{- define "harbor.trivy.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component service port */}} -{{- define "harbor.trivy.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* CORE_URL */}} -{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}} -{{- define "harbor.coreURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}} -{{- end -}} - -{{/* JOBSERVICE_URL */}} -{{- define "harbor.jobserviceURL" -}} - {{- printf "%s://%s-jobservice" (include "harbor.component.scheme" .) (include "harbor.fullname" .) -}} -{{- end -}} - -{{/* PORTAL_URL */}} -{{- define "harbor.portalURL" -}} - {{- printf "%s://%s" (include "harbor.component.scheme" .) (include "harbor.portal" .) -}} -{{- end -}} - -{{/* REGISTRY_URL */}} -{{- define "harbor.registryURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registry.servicePort" .) -}} -{{- end -}} - -{{/* REGISTRY_CONTROLLER_URL */}} -{{- define "harbor.registryControllerURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registryctl.servicePort" .) -}} -{{- end -}} - -{{/* TOKEN_SERVICE_URL */}} -{{- define "harbor.tokenServiceURL" -}} - {{- printf "%s/service/token" (include "harbor.coreURL" .) -}} -{{- end -}} - -{{/* TRIVY_ADAPTER_URL */}} -{{- define "harbor.trivyAdapterURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}} -{{- end -}} - -{{- define "harbor.internalTLS.core.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.core.secretName -}} - {{- else -}} - {{- printf "%s-core-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.jobservice.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.jobservice.secretName -}} - {{- else -}} - {{- printf "%s-jobservice-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.portal.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.portal.secretName -}} - {{- else -}} - {{- printf "%s-portal-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.registry.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.registry.secretName -}} - {{- else -}} - {{- printf "%s-registry-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.trivy.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.trivy.secretName -}} - {{- else -}} - {{- printf "%s-trivy-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsCoreSecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsSecretForNginx" -}} - {{- if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.nginx" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.metricsPortName" -}} - {{- if .Values.internalTLS.enabled }} - {{- printf "https-metrics" -}} - {{- else -}} - {{- printf "http-metrics" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.traceEnvs" -}} - TRACE_ENABLED: "{{ .Values.trace.enabled }}" - TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}" - TRACE_NAMESPACE: "{{ .Values.trace.namespace }}" - {{- if .Values.trace.attributes }} - TRACE_ATTRIBUTES: {{ .Values.trace.attributes | toJson | squote }} - {{- end }} - {{- if eq .Values.trace.provider "jaeger" }} - TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}" - TRACE_JAEGER_USERNAME: "{{ .Values.trace.jaeger.username }}" - TRACE_JAEGER_AGENT_HOSTNAME: "{{ .Values.trace.jaeger.agent_host }}" - TRACE_JAEGER_AGENT_PORT: "{{ .Values.trace.jaeger.agent_port }}" - {{- else }} - TRACE_OTEL_ENDPOINT: "{{ .Values.trace.otel.endpoint }}" - TRACE_OTEL_URL_PATH: "{{ .Values.trace.otel.url_path }}" - TRACE_OTEL_COMPRESSION: "{{ .Values.trace.otel.compression }}" - TRACE_OTEL_INSECURE: "{{ .Values.trace.otel.insecure }}" - TRACE_OTEL_TIMEOUT: "{{ .Values.trace.otel.timeout }}" - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForCore" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-core" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForJobservice" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-jobservice" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForRegistryCtl" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-registryctl" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceJaegerPassword" -}} - {{- if and .Values.trace.enabled (eq .Values.trace.provider "jaeger") }} - TRACE_JAEGER_PASSWORD: "{{ .Values.trace.jaeger.password | default "" | b64enc }}" - {{- end }} -{{- end -}} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "harbor.ingress.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/core/core-cm.yaml b/charts/harbor/harbor/1.14.0/templates/core/core-cm.yaml deleted file mode 100644 index 65237eb00a..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/core/core-cm.yaml +++ /dev/null @@ -1,87 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - app.conf: |+ - appname = Harbor - runmode = prod - enablegzip = true - - [prod] - httpport = {{ ternary "8443" "8080" .Values.internalTLS.enabled }} - PORT: "{{ ternary "8443" "8080" .Values.internalTLS.enabled }}" - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "{{ template "harbor.database.host" . }}" - POSTGRESQL_PORT: "{{ template "harbor.database.port" . }}" - POSTGRESQL_USERNAME: "{{ template "harbor.database.username" . }}" - POSTGRESQL_DATABASE: "{{ template "harbor.database.coreDatabase" . }}" - POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" - EXT_ENDPOINT: "{{ .Values.externalURL }}" - CORE_URL: "{{ template "harbor.coreURL" . }}" - JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - CORE_LOCAL_URL: "{{ ternary "https://127.0.0.1:8443" "http://127.0.0.1:8080" .Values.internalTLS.enabled }}" - WITH_TRIVY: {{ .Values.trivy.enabled | quote }} - TRIVY_ADAPTER_URL: "{{ template "harbor.trivyAdapterURL" . }}" - REGISTRY_STORAGE_PROVIDER_NAME: "{{ .Values.persistence.imageChartStorage.type }}" - LOG_LEVEL: "{{ .Values.logLevel }}" - CONFIG_PATH: "/etc/core/app.conf" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}" - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.harborDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.harborDatabaseIndex) }} - _REDIS_URL_HARBOR: "{{ template "harbor.redis.urlForHarbor" . }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} - PORTAL_URL: "{{ template "harbor.portalURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - {{- if .Values.uaaSecretName }} - UAA_CA_ROOT: "/etc/core/auth-ca/auth-ca.crt" - {{- end }} - {{- if has "core" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE: "docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory" - {{- if .Values.metrics.enabled}} - METRIC_ENABLE: "true" - METRIC_PATH: "{{ .Values.metrics.core.path }}" - METRIC_PORT: "{{ .Values.metrics.core.port }}" - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: core - {{- end }} - - {{- if hasKey .Values.core "gcTimeWindowHours" }} - #make the GC time window configurable for testing - GC_TIME_WINDOW_HOURS: "{{ .Values.core.gcTimeWindowHours }}" - {{- end }} - {{- template "harbor.traceEnvsForCore" . }} - - {{- if .Values.core.artifactPullAsyncFlushDuration }} - ARTIFACT_PULL_ASYNC_FLUSH_DURATION: {{ .Values.core.artifactPullAsyncFlushDuration | quote }} - {{- end }} - - {{- if .Values.core.gdpr}} - {{- if .Values.core.gdpr.deleteUser}} - GDPR_DELETE_USER: "true" - {{- end }} - {{- end }} - - {{- if .Values.cache.enabled }} - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - - {{- if .Values.core.quotaUpdateProvider }} - QUOTA_UPDATE_PROVIDER: "{{ .Values.core.quotaUpdateProvider }}" - {{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/core/core-dpl.yaml b/charts/harbor/harbor/1.14.0/templates/core/core-dpl.yaml deleted file mode 100644 index 9a92b45a4f..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/core/core-dpl.yaml +++ /dev/null @@ -1,248 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: core -spec: - replicas: {{ .Values.core.replicas }} - revisionHistoryLimit: {{ .Values.core.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: core - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: core -{{- if .Values.core.podLabels }} -{{ toYaml .Values.core.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.core.podAnnotations }} -{{ toYaml .Values.core.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.core.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: core -{{- end }} -{{- end }} - containers: - - name: core - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if .Values.core.startupProbe.enabled }} - startupProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 360 - initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} - periodSeconds: 10 - {{- end }} - livenessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/core/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/core/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/core/ca.crt - {{- end }} - {{- if .Values.database.external.existingSecret }} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} - {{- if .Values.core.existingXsrfSecret }} - - name: CSRF_KEY - valueFrom: - secretKeyRef: - name: {{ .Values.core.existingXsrfSecret }} - key: {{ .Values.core.existingXsrfSecretKey }} - {{- end }} -{{- with .Values.core.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - {{- if .Values.expose.tls.enabled }} - - name: ca-download - mountPath: /etc/core/ca - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - mountPath: /etc/core/auth-ca/auth-ca.crt - subPath: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - {{- end }} - - name: psc - mountPath: /etc/core/token - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} -{{- if .Values.core.resources }} - resources: -{{ toYaml .Values.core.resources | indent 10 }} -{{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - - name: secret-key - secret: - {{- if .Values.existingSecretSecretKey }} - secretName: {{ .Values.existingSecretSecretKey }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - items: - - key: secretKey - path: key - - name: token-service-private-key - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: ca-download - secret: - {{- if .Values.caSecretName }} - secretName: {{ .Values.caSecretName }} - {{- else if eq (include "harbor.autoGenCertForIngress" .) "true" }} - secretName: "{{ template "harbor.ingress" . }}" - {{- else if eq (include "harbor.autoGenCertForNginx" .) "true" }} - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - secret: - secretName: {{ .Values.uaaSecretName }} - items: - - key: ca.crt - path: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - - name: psc - emptyDir: {} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.core.priorityClassName }} - priorityClassName: {{ .Values.core.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/core/core-pre-upgrade-job.yaml b/charts/harbor/harbor/1.14.0/templates/core/core-pre-upgrade-job.yaml deleted file mode 100644 index 43c9d3596d..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/core/core-pre-upgrade-job.yaml +++ /dev/null @@ -1,74 +0,0 @@ -{{- if .Values.enableMigrateHelmHook }} -apiVersion: batch/v1 -kind: Job -metadata: - name: migration-job - labels: -{{ include "harbor.labels" . | indent 4 }} - component: migrator - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-5" -spec: - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: migrator - spec: - restartPolicy: Never - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 120 - containers: - - name: core-job - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/harbor/harbor_core", "-mode=migrate"] - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - {{- if .Values.database.external.existingSecret }} - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/core/core-secret.yaml b/charts/harbor/harbor/1.14.0/templates/core/core-secret.yaml deleted file mode 100644 index 62a41fce80..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/core/core-secret.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.core" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.existingSecretSecretKey }} - secretKey: {{ .Values.secretKey | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingSecret }} - secret: {{ .Values.core.secret | default (include "harbor.secretKeyHelper" (dict "key" "secret" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.core.secretName }} - {{- $ca := genCA "harbor-token-ca" 365 }} - tls.key: {{ .Values.core.tokenKey | default $ca.Key | b64enc | quote }} - tls.crt: {{ .Values.core.tokenCert | default $ca.Cert | b64enc | quote }} - {{- end }} - {{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} - {{- end }} - {{- if not .Values.database.external.existingSecret }} - POSTGRESQL_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingXsrfSecret }} - CSRF_KEY: {{ .Values.core.xsrfKey | default (include "harbor.secretKeyHelper" (dict "key" "CSRF_KEY" "data" $existingSecret.data)) | default (randAlphaNum 32) | b64enc | quote }} - {{- end }} -{{- if .Values.core.configureUserSettings }} - CONFIG_OVERWRITE_JSON: {{ .Values.core.configureUserSettings | b64enc | quote }} -{{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.14.0/templates/core/core-svc.yaml b/charts/harbor/harbor/1.14.0/templates/core/core-svc.yaml deleted file mode 100644 index 0d2cfb2915..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/core/core-svc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.core.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - name: {{ ternary "https-web" "http-web" .Values.internalTLS.enabled }} - port: {{ template "harbor.core.servicePort" . }} - targetPort: {{ template "harbor.core.containerPort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.core.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: core diff --git a/charts/harbor/harbor/1.14.0/templates/core/core-tls.yaml b/charts/harbor/harbor/1.14.0/templates/core/core-tls.yaml deleted file mode 100644 index c52148f0d9..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/core/core-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.core.crt\" is required!" .Values.internalTLS.core.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.core.key\" is required!" .Values.internalTLS.core.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/database/database-secret.yaml b/charts/harbor/harbor/1.14.0/templates/database/database-secret.yaml deleted file mode 100644 index 864aff4a18..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/database/database-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - POSTGRES_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end -}} diff --git a/charts/harbor/harbor/1.14.0/templates/database/database-ss.yaml b/charts/harbor/harbor/1.14.0/templates/database/database-ss.yaml deleted file mode 100644 index 3b08b07ef1..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/database/database-ss.yaml +++ /dev/null @@ -1,168 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -{{- $database := .Values.persistence.persistentVolumeClaim.database -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: database -spec: - replicas: 1 - serviceName: "{{ template "harbor.database" . }}" - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: database - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: database -{{- if .Values.database.podLabels }} -{{ toYaml .Values.database.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} -{{- if .Values.database.podAnnotations }} -{{ toYaml .Values.database.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.database.internal.serviceAccountName }} - serviceAccountName: {{ .Values.database.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.database.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - # as we change the data directory to a sub folder to support psp, the init container here - # is used to migrate the existing data. See https://github.com/goharbor/harbor-helm/issues/756 - # for more detail. - # we may remove it after several releases - - name: "data-migrator" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "[ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true"] -{{- if .Values.database.internal.initContainer.migrator.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.migrator.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - # with "fsGroup" set, each time a volume is mounted, Kubernetes must recursively chown() and chmod() all the files and directories inside the volume - # this causes the postgresql reports the "data directory /var/lib/postgresql/data/pgdata has group or world access" issue when using some CSIs e.g. Ceph - # use this init container to correct the permission - # as "fsGroup" applied before the init container running, the container has enough permission to execute the command - - name: "data-permissions-ensurer" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"] -{{- if .Values.database.internal.initContainer.permissions.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.permissions.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - containers: - - name: database - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.livenessProbe.timeoutSeconds }} - readinessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 1 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.readinessProbe.timeoutSeconds }} -{{- if .Values.database.internal.resources }} - resources: -{{ toYaml .Values.database.internal.resources | indent 10 }} -{{- end }} - envFrom: - - secretRef: - name: "{{ template "harbor.database" . }}" - env: - # put the data into a sub directory to avoid the permission issue in k8s with restricted psp enabled - # more detail refer to https://github.com/goharbor/harbor-helm/issues/756 - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" -{{- with .Values.database.internal.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - - name: shm-volume - mountPath: /dev/shm - volumes: - - name: shm-volume - emptyDir: - medium: Memory - sizeLimit: {{ .Values.database.internal.shmSizeLimit }} - {{- if not .Values.persistence.enabled }} - - name: "database-data" - emptyDir: {} - {{- else if $database.existingClaim }} - - name: "database-data" - persistentVolumeClaim: - claimName: {{ $database.existingClaim }} - {{- end -}} - {{- with .Values.database.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.database.internal.priorityClassName }} - priorityClassName: {{ .Values.database.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $database.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $database.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $database.accessMode | quote }}] - {{- if $database.storageClass }} - {{- if (eq "-" $database.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $database.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $database.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.14.0/templates/database/database-svc.yaml b/charts/harbor/harbor/1.14.0/templates/database/database-svc.yaml deleted file mode 100644 index 6475048cd9..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/database/database-svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 5432 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: database -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/exporter/exporter-cm-env.yaml b/charts/harbor/harbor/1.14.0/templates/exporter/exporter-cm-env.yaml deleted file mode 100644 index 0bf4e7d905..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/exporter/exporter-cm-env.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.exporter" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - LOG_LEVEL: "{{ .Values.logLevel }}" - HARBOR_EXPORTER_PORT: "{{ .Values.metrics.exporter.port }}" - HARBOR_EXPORTER_METRICS_PATH: "{{ .Values.metrics.exporter.path }}" - HARBOR_EXPORTER_METRICS_ENABLED: "{{ .Values.metrics.enabled }}" - HARBOR_EXPORTER_CACHE_TIME: "{{ .Values.exporter.cacheDuration }}" - HARBOR_EXPORTER_CACHE_CLEAN_INTERVAL: "{{ .Values.exporter.cacheCleanInterval }}" - HARBOR_METRIC_NAMESPACE: harbor - HARBOR_METRIC_SUBSYSTEM: exporter - HARBOR_REDIS_URL: "{{ template "harbor.redis.urlForJobservice" . }}" - HARBOR_REDIS_NAMESPACE: harbor_job_service_namespace - HARBOR_REDIS_TIMEOUT: "3600" - HARBOR_SERVICE_SCHEME: "{{ template "harbor.component.scheme" . }}" - HARBOR_SERVICE_HOST: "{{ template "harbor.core" . }}" - HARBOR_SERVICE_PORT: "{{ template "harbor.core.servicePort" . }}" - HARBOR_DATABASE_HOST: "{{ template "harbor.database.host" . }}" - HARBOR_DATABASE_PORT: "{{ template "harbor.database.port" . }}" - HARBOR_DATABASE_USERNAME: "{{ template "harbor.database.username" . }}" - HARBOR_DATABASE_DBNAME: "{{ template "harbor.database.coreDatabase" . }}" - HARBOR_DATABASE_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - HARBOR_DATABASE_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - HARBOR_DATABASE_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" -{{- end}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/exporter/exporter-dpl.yaml b/charts/harbor/harbor/1.14.0/templates/exporter/exporter-dpl.yaml deleted file mode 100644 index 6d2e1f53ac..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/exporter/exporter-dpl.yaml +++ /dev/null @@ -1,139 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: exporter -spec: - replicas: {{ .Values.exporter.replicas }} - revisionHistoryLimit: {{ .Values.exporter.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: exporter - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: exporter -{{- if .Values.exporter.podLabels }} -{{ toYaml .Values.exporter.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.exporter.podAnnotations }} -{{ toYaml .Values.exporter.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.exporter.serviceAccountName }} - serviceAccountName: {{ .Values.exporter.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.exporter.automountServiceAccountToken | default false }} -{{- with .Values.exporter.topologySpreadConstraints }} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: exporter -{{- end }} -{{- end }} - containers: - - name: exporter - image: {{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 30 - periodSeconds: 10 - args: ["-log-level", "{{ .Values.logLevel }}"] - envFrom: - - configMapRef: - name: "{{ template "harbor.exporter" . }}-env" - - secretRef: - name: "{{ template "harbor.exporter" . }}" - env: - {{- if .Values.database.external.existingSecret }} - - name: HARBOR_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} -{{- if .Values.exporter.resources }} - resources: -{{ toYaml .Values.exporter.resources | indent 10 }} -{{- end }} -{{- with .Values.exporter.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - # There are some metric data are collectd from harbor core. - # When internal TLS is enabled, the Exporter need the CA file to collect these data. - {{- end }} - volumes: - - name: config - secret: - secretName: "{{ template "harbor.exporter" . }}" - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.exporter.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.exporter.priorityClassName }} - priorityClassName: {{ .Values.exporter.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.14.0/templates/exporter/exporter-secret.yaml b/charts/harbor/harbor/1.14.0/templates/exporter/exporter-secret.yaml deleted file mode 100644 index 434a1bf689..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/exporter/exporter-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: -{{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} -{{- end }} -{{- if not .Values.database.external.existingSecret }} - HARBOR_DATABASE_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/exporter/exporter-svc.yaml b/charts/harbor/harbor/1.14.0/templates/exporter/exporter-svc.yaml deleted file mode 100644 index 4a6f3fdec6..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/exporter/exporter-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.exporter" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.exporter.port }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: exporter -{{ end }} diff --git a/charts/harbor/harbor/1.14.0/templates/ingress/ingress.yaml b/charts/harbor/harbor/1.14.0/templates/ingress/ingress.yaml deleted file mode 100644 index e4c06939c6..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/ingress/ingress.yaml +++ /dev/null @@ -1,145 +0,0 @@ -{{- if eq .Values.expose.type "ingress" }} -{{- $ingress := .Values.expose.ingress -}} -{{- $tls := .Values.expose.tls -}} -{{- if eq .Values.expose.ingress.controller "gce" }} - {{- $_ := set . "portal_path" "/*" -}} - {{- $_ := set . "api_path" "/api/*" -}} - {{- $_ := set . "service_path" "/service/*" -}} - {{- $_ := set . "v2_path" "/v2/*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/*" -}} - {{- $_ := set . "controller_path" "/c/*" -}} -{{- else if eq .Values.expose.ingress.controller "ncp" }} - {{- $_ := set . "portal_path" "/.*" -}} - {{- $_ := set . "api_path" "/api/.*" -}} - {{- $_ := set . "service_path" "/service/.*" -}} - {{- $_ := set . "v2_path" "/v2/.*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}} - {{- $_ := set . "controller_path" "/c/.*" -}} -{{- else }} - {{- $_ := set . "portal_path" "/" -}} - {{- $_ := set . "api_path" "/api/" -}} - {{- $_ := set . "service_path" "/service/" -}} - {{- $_ := set . "v2_path" "/v2/" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/" -}} - {{- $_ := set . "controller_path" "/c/" -}} -{{- end }} - ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.harbor.labels }} -{{ toYaml $ingress.harbor.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if .Values.internalTLS.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" -{{- end }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -{{- if $ingress.harbor.annotations }} -{{ toYaml $ingress.harbor.annotations | indent 4 }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsCoreSecretForIngress" . }} - {{- if $ingress.hosts.core }} - hosts: - - {{ $ingress.hosts.core }} - {{- end }} - {{- end }} - rules: - - http: - paths: -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - - path: {{ .api_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - backend: - serviceName: {{ template "harbor.portal" . }} - servicePort: {{ template "harbor.portal.servicePort" . }} -{{- else }} - - path: {{ .api_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.portal" . }} - port: - number: {{ template "harbor.portal.servicePort" . }} -{{- end }} - {{- if $ingress.hosts.core }} - host: {{ $ingress.hosts.core }} - {{- end }} - -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/ingress/secret.yaml b/charts/harbor/harbor/1.14.0/templates/ingress/secret.yaml deleted file mode 100644 index 41507b3dd9..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/ingress/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForIngress" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cert := genSignedCert .Values.expose.ingress.hosts.core nil (list .Values.expose.ingress.hosts.core) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/internal/auto-tls.yaml b/charts/harbor/harbor/1.14.0/templates/internal/auto-tls.yaml deleted file mode 100644 index da5f5e2c7b..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/internal/auto-tls.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} -{{- $ca := genCA "harbor-internal-ca" 365 }} -{{- $coreCN := (include "harbor.core" .) }} -{{- $coreCrt := genSignedCert $coreCN (list "127.0.0.1") (list "localhost" $coreCN) 365 $ca }} -{{- $jsCN := (include "harbor.jobservice" .) }} -{{- $jsCrt := genSignedCert $jsCN nil (list $jsCN) 365 $ca }} -{{- $regCN := (include "harbor.registry" .) }} -{{- $regCrt := genSignedCert $regCN nil (list $regCN) 365 $ca }} -{{- $portalCN := (include "harbor.portal" .) }} -{{- $portalCrt := genSignedCert $portalCN nil (list $portalCN) 365 $ca }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $coreCrt.Cert | b64enc | quote }} - tls.key: {{ $coreCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $jsCrt.Cert | b64enc | quote }} - tls.key: {{ $jsCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $regCrt.Cert | b64enc | quote }} - tls.key: {{ $regCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $portalCrt.Cert | b64enc | quote }} - tls.key: {{ $portalCrt.Key | b64enc | quote }} - -{{- if and .Values.trivy.enabled}} ---- -{{- $trivyCN := (include "harbor.trivy" .) }} -{{- $trivyCrt := genSignedCert $trivyCN nil (list $trivyCN) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $trivyCrt.Cert | b64enc | quote }} - tls.key: {{ $trivyCrt.Key | b64enc | quote }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-cm-env.yaml b/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-cm-env.yaml deleted file mode 100644 index 8411c7a47c..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-cm-env.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - CORE_URL: "{{ template "harbor.coreURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - - JOBSERVICE_WEBHOOK_JOB_MAX_RETRY: "{{ .Values.jobservice.notification.webhook_job_max_retry }}" - JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT: "{{ .Values.jobservice.notification.webhook_job_http_client_timeout }}" - - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.metrics.enabled}} - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: jobservice - {{- end }} - {{- template "harbor.traceEnvsForJobservice" . }} - {{- if .Values.cache.enabled }} - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-cm.yaml b/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-cm.yaml deleted file mode 100644 index 8211c62209..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-cm.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - #Server listening port - protocol: "{{ template "harbor.component.scheme" . }}" - port: {{ template "harbor.jobservice.containerPort". }} - {{- if .Values.internalTLS.enabled }} - https_config: - cert: "/etc/harbor/ssl/jobservice/tls.crt" - key: "/etc/harbor/ssl/jobservice/tls.key" - {{- end }} - worker_pool: - workers: {{ .Values.jobservice.maxJobWorkers }} - backend: "redis" - redis_pool: - redis_url: "{{ template "harbor.redis.urlForJobservice" . }}" - namespace: "harbor_job_service_namespace" - idle_timeout_second: 3600 - job_loggers: - {{- if has "file" .Values.jobservice.jobLoggers }} - - name: "FILE" - level: {{ .Values.logLevel | upper }} - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - {{- end }} - {{- if has "database" .Values.jobservice.jobLoggers }} - - name: "DB" - level: {{ .Values.logLevel | upper }} - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - {{- end }} - {{- if has "stdout" .Values.jobservice.jobLoggers }} - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - {{- end }} - metric: - enabled: {{ .Values.metrics.enabled }} - path: {{ .Values.metrics.jobservice.path }} - port: {{ .Values.metrics.jobservice.port }} - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: {{ .Values.jobservice.reaper.max_update_hours }} - # the max time for execution in running state without new task created - max_dangling_hours: {{ .Values.jobservice.reaper.max_dangling_hours }} diff --git a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-dpl.yaml b/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-dpl.yaml deleted file mode 100644 index e39e77e6ed..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-dpl.yaml +++ /dev/null @@ -1,173 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - replicas: {{ .Values.jobservice.replicas }} - revisionHistoryLimit: {{ .Values.jobservice.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: jobservice -{{- if .Values.jobservice.podLabels }} -{{ toYaml .Values.jobservice.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} - checksum/configmap-env: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/jobservice/jobservice-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.jobservice.podAnnotations }} -{{ toYaml .Values.jobservice.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.jobservice.serviceAccountName }} - serviceAccountName: {{ .Values.jobservice.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.jobservice.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: jobservice -{{- end }} -{{- end }} - containers: - - name: jobservice - image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.jobservice.resources }} - resources: -{{ toYaml .Values.jobservice.resources | indent 10 }} -{{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - {{- if .Values.jobservice.existingSecret }} - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/jobservice/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/jobservice/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/jobservice/ca.crt - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} -{{- with .Values.jobservice.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.jobservice" . }}-env" - - secretRef: - name: "{{ template "harbor.jobservice" . }}" - ports: - - containerPort: {{ template "harbor.jobservice.containerPort" . }} - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.subPath }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - mountPath: /etc/harbor/ssl/jobservice - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: jobservice-config - configMap: - name: "{{ template "harbor.jobservice" . }}" - - name: job-logs - {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLoggers) }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim | default (include "harbor.jobservice" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.jobservice.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.jobservice.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.jobservice.priorityClassName }} - priorityClassName: {{ .Values.jobservice.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-pvc.yaml b/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-pvc.yaml deleted file mode 100644 index a6b8b8bd38..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-pvc.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- $jobLog := .Values.persistence.persistentVolumeClaim.jobservice.jobLog -}} -{{- if and .Values.persistence.enabled (not $jobLog.existingClaim) (has "file" .Values.jobservice.jobLoggers) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.jobservice" . }} - annotations: - {{- range $key, $value := $jobLog.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - accessModes: - - {{ $jobLog.accessMode }} - resources: - requests: - storage: {{ $jobLog.size }} - {{- if $jobLog.storageClass }} - {{- if eq "-" $jobLog.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $jobLog.storageClass }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-secrets.yaml b/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-secrets.yaml deleted file mode 100644 index eeb00bde00..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-secrets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.jobservice" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.jobservice.existingSecret }} - JOBSERVICE_SECRET: {{ .Values.jobservice.secret | default (include "harbor.secretKeyHelper" (dict "key" "JOBSERVICE_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-svc.yaml b/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-svc.yaml deleted file mode 100644 index d2b7a47fd4..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-svc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }} - port: {{ template "harbor.jobservice.servicePort" . }} - targetPort: {{ template "harbor.jobservice.containerPort" . }} -{{- if .Values.metrics.enabled }} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.jobservice.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice diff --git a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-tls.yaml b/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-tls.yaml deleted file mode 100644 index 234cb39995..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/jobservice/jobservice-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.jobservice.crt\" is required!" .Values.internalTLS.jobservice.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.jobservice.key\" is required!" .Values.internalTLS.jobservice.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/metrics/metrics-svcmon.yaml b/charts/harbor/harbor/1.14.0/templates/metrics/metrics-svcmon.yaml deleted file mode 100644 index 1122ef01ef..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/metrics/metrics-svcmon.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "harbor.fullname" . }} - labels: {{ include "harbor.labels" . | nindent 4 }} -{{- if .Values.metrics.serviceMonitor.additionalLabels }} -{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} -{{- end }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: {{ template "harbor.metricsPortName" . }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - honorLabels: true -{{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.metrics.serviceMonitor.relabelings | indent 4 }} -{{- end }} - selector: - matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/nginx/configmap-http.yaml b/charts/harbor/harbor/1.14.0/templates/nginx/configmap-http.yaml deleted file mode 100644 index c4b8354d06..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/nginx/configmap-http.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server {{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled}} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end }} - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - proxy_send_timeout 900; - proxy_read_timeout 900; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/nginx/configmap-https.yaml b/charts/harbor/harbor/1.14.0/templates/nginx/configmap-https.yaml deleted file mode 100644 index 56c943a619..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/nginx/configmap-https.yaml +++ /dev/null @@ -1,187 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server "{{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}"; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8443 ssl; - {{- end }} - # server_name harbordomain.com; - server_tokens off; - # SSL - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - # Add extra headers - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; HttpOnly; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end}} - #server_name harbordomain.com; - return 301 https://$host$request_uri; - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/nginx/deployment.yaml b/charts/harbor/harbor/1.14.0/templates/nginx/deployment.yaml deleted file mode 100644 index 8290d497b6..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/nginx/deployment.yaml +++ /dev/null @@ -1,126 +0,0 @@ -{{- if ne .Values.expose.type "ingress" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: nginx -spec: - replicas: {{ .Values.nginx.replicas }} - revisionHistoryLimit: {{ .Values.nginx.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: nginx - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: nginx -{{- if .Values.nginx.podLabels }} -{{ toYaml .Values.nginx.podLabels | indent 8 }} -{{- end }} - annotations: - {{- if not .Values.expose.tls.enabled }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} - {{- else }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-https.yaml") . | sha256sum }} - {{- end }} - {{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} - checksum/secret: {{ include (print $.Template.BasePath "/nginx/secret.yaml") . | sha256sum }} - {{- end }} -{{- if .Values.nginx.podAnnotations }} -{{ toYaml .Values.nginx.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- if .Values.nginx.serviceAccountName }} - serviceAccountName: {{ .Values.nginx.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.nginx.automountServiceAccountToken | default false }} -{{- with .Values.nginx.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: nginx -{{- end }} -{{- end }} - containers: - - name: nginx - image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - {{- $_ := set . "scheme" "HTTP" -}} - {{- $_ := set . "port" "8080" -}} - {{- if .Values.expose.tls.enabled }} - {{- $_ := set . "scheme" "HTTPS" -}} - {{- $_ := set . "port" "8443" -}} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.nginx.resources }} - resources: -{{ toYaml .Values.nginx.resources | indent 10 }} -{{- end }} -{{- with .Values.nginx.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: 8080 - - containerPort: 8443 - - containerPort: 4443 - volumeMounts: - - name: config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.expose.tls.enabled }} - - name: certificate - mountPath: /etc/nginx/cert - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.nginx" . }} - {{- if .Values.expose.tls.enabled }} - - name: certificate - secret: - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- with .Values.nginx.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nginx.priorityClassName }} - priorityClassName: {{ .Values.nginx.priorityClassName }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/nginx/secret.yaml b/charts/harbor/harbor/1.14.0/templates/nginx/secret.yaml deleted file mode 100644 index c819c556d9..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/nginx/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cn := (required "The \"expose.tls.auto.commonName\" is required!" .Values.expose.tls.auto.commonName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if regexMatch `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` $cn }} - {{- $cert := genSignedCert $cn (list $cn) nil 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- else }} - {{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/nginx/service.yaml b/charts/harbor/harbor/1.14.0/templates/nginx/service.yaml deleted file mode 100644 index 205a805ea4..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/nginx/service.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }} -apiVersion: v1 -kind: Service -metadata: -{{- if eq .Values.expose.type "clusterIP" }} -{{- $clusterIP := .Values.expose.clusterIP }} - name: {{ $clusterIP.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $clusterIP.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: ClusterIP - {{- if .Values.expose.clusterIP.staticClusterIP }} - clusterIP: {{ .Values.expose.clusterIP.staticClusterIP }} - {{- end }} - ports: - - name: http - port: {{ $clusterIP.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $clusterIP.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- else if eq .Values.expose.type "nodePort" }} -{{- $nodePort := .Values.expose.nodePort }} - name: {{ $nodePort.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - type: NodePort - ports: - - name: http - port: {{ $nodePort.ports.http.port }} - targetPort: 8080 - {{- if $nodePort.ports.http.nodePort }} - nodePort: {{ $nodePort.ports.http.nodePort }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $nodePort.ports.https.port }} - targetPort: 8443 - {{- if $nodePort.ports.https.nodePort }} - nodePort: {{ $nodePort.ports.https.nodePort }} - {{- end }} - {{- end }} -{{- else if eq .Values.expose.type "loadBalancer" }} -{{- $loadBalancer := .Values.expose.loadBalancer }} - name: {{ $loadBalancer.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $loadBalancer.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: LoadBalancer - {{- with $loadBalancer.sourceRanges }} - loadBalancerSourceRanges: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $loadBalancer.IP }} - loadBalancerIP: {{ $loadBalancer.IP }} - {{- end }} - ports: - - name: http - port: {{ $loadBalancer.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $loadBalancer.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: nginx -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/portal/configmap.yaml b/charts/harbor/harbor/1.14.0/templates/portal/configmap.yaml deleted file mode 100644 index 7b2118e721..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/portal/configmap.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - events { - worker_connections 1024; - } - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - {{- if .Values.internalTLS.enabled }} - {{- if .Values.ipFamily.ipv4.enabled}} - listen {{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - # SSL - ssl_certificate /etc/harbor/ssl/portal/tls.crt; - ssl_certificate_key /etc/harbor/ssl/portal/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - {{- else }} - {{- if .Values.ipFamily.ipv4.enabled }} - listen {{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- end }} - server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location /devcenter-api-2.0 { - try_files $uri $uri/ /swagger-ui-index.html; - } - location / { - try_files $uri $uri/ /index.html; - } - location = /index.html { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - } - } diff --git a/charts/harbor/harbor/1.14.0/templates/portal/deployment.yaml b/charts/harbor/harbor/1.14.0/templates/portal/deployment.yaml deleted file mode 100644 index 959a3fd7b5..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/portal/deployment.yaml +++ /dev/null @@ -1,114 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: portal -spec: - replicas: {{ .Values.portal.replicas }} - revisionHistoryLimit: {{ .Values.portal.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: portal - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: portal -{{- if .Values.portal.podLabels }} -{{ toYaml .Values.portal.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} -{{- end }} - checksum/configmap: {{ include (print $.Template.BasePath "/portal/configmap.yaml") . | sha256sum }} -{{- if .Values.portal.podAnnotations }} -{{ toYaml .Values.portal.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- if .Values.portal.serviceAccountName }} - serviceAccountName: {{ .Values.portal.serviceAccountName }} -{{- end }} - automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }} -{{- with .Values.portal.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: portal -{{- end }} -{{- end }} - containers: - - name: portal - image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} -{{- if .Values.portal.resources }} - resources: -{{ toYaml .Values.portal.resources | indent 10 }} -{{- end }} -{{- with .Values.portal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: {{ template "harbor.portal.containerPort" . }} - volumeMounts: - - name: portal-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - mountPath: /etc/harbor/ssl/portal - {{- end }} - volumes: - - name: portal-config - configMap: - name: "{{ template "harbor.portal" . }}" - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.portal.secretName" . }} - {{- end }} - {{- with .Values.portal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.portal.priorityClassName }} - priorityClassName: {{ .Values.portal.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/portal/service.yaml b/charts/harbor/harbor/1.14.0/templates/portal/service.yaml deleted file mode 100644 index d00026da46..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/portal/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.portal.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: {{ template "harbor.portal.servicePort" . }} - targetPort: {{ template "harbor.portal.containerPort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: portal diff --git a/charts/harbor/harbor/1.14.0/templates/portal/tls.yaml b/charts/harbor/harbor/1.14.0/templates/portal/tls.yaml deleted file mode 100644 index de63f4e813..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/portal/tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.portal.crt\" is required!" .Values.internalTLS.portal.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.portal.key\" is required!" .Values.internalTLS.portal.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/redis/service.yaml b/charts/harbor/harbor/1.14.0/templates/redis/service.yaml deleted file mode 100644 index 79c95c3e05..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/redis/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 6379 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: redis -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/redis/statefulset.yaml b/charts/harbor/harbor/1.14.0/templates/redis/statefulset.yaml deleted file mode 100644 index 371b0fd5aa..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/redis/statefulset.yaml +++ /dev/null @@ -1,116 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -{{- $redis := .Values.persistence.persistentVolumeClaim.redis -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: redis -spec: - replicas: 1 - serviceName: {{ template "harbor.redis" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: redis - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: redis -{{- if .Values.redis.podLabels }} -{{ toYaml .Values.redis.podLabels | indent 8 }} -{{- end }} -{{- if .Values.redis.podAnnotations }} - annotations: -{{ toYaml .Values.redis.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.redis.internal.serviceAccountName }} - serviceAccountName: {{ .Values.redis.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.redis.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: redis - image: {{ .Values.redis.internal.image.repository }}:{{ .Values.redis.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.redis.internal.resources }} - resources: -{{ toYaml .Values.redis.internal.resources | indent 10 }} -{{- end }} -{{- with .Values.redis.internal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: {{ $redis.subPath }} - {{- if not .Values.persistence.enabled }} - volumes: - - name: data - emptyDir: {} - {{- else if $redis.existingClaim }} - volumes: - - name: data - persistentVolumeClaim: - claimName: {{ $redis.existingClaim }} - {{- end -}} - {{- with .Values.redis.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.redis.internal.priorityClassName }} - priorityClassName: {{ .Values.redis.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $redis.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $redis.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $redis.accessMode | quote }}] - {{- if $redis.storageClass }} - {{- if (eq "-" $redis.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $redis.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $redis.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.14.0/templates/registry/registry-cm.yaml b/charts/harbor/harbor/1.14.0/templates/registry/registry-cm.yaml deleted file mode 100644 index 4f7056c384..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/registry/registry-cm.yaml +++ /dev/null @@ -1,246 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - version: 0.1 - log: - {{- if eq .Values.logLevel "warning" }} - level: warn - {{- else if eq .Values.logLevel "fatal" }} - level: error - {{- else }} - level: {{ .Values.logLevel }} - {{- end }} - fields: - service: registry - storage: - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if eq $type "filesystem" }} - filesystem: - rootdirectory: {{ $storage.filesystem.rootdirectory }} - {{- if $storage.filesystem.maxthreads }} - maxthreads: {{ $storage.filesystem.maxthreads }} - {{- end }} - {{- else if eq $type "azure" }} - azure: - accountname: {{ $storage.azure.accountname }} - container: {{ $storage.azure.container }} - {{- if $storage.azure.realm }} - realm: {{ $storage.azure.realm }} - {{- end }} - {{- else if eq $type "gcs" }} - gcs: - bucket: {{ $storage.gcs.bucket }} - {{- if not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity }} - keyfile: /etc/registry/gcs-key.json - {{- end }} - {{- if $storage.gcs.rootdirectory }} - rootdirectory: {{ $storage.gcs.rootdirectory }} - {{- end }} - {{- if $storage.gcs.chunksize }} - chunksize: {{ $storage.gcs.chunksize }} - {{- end }} - {{- else if eq $type "s3" }} - s3: - region: {{ $storage.s3.region }} - bucket: {{ $storage.s3.bucket }} - {{- if $storage.s3.regionendpoint }} - regionendpoint: {{ $storage.s3.regionendpoint }} - {{- end }} - {{- if $storage.s3.encrypt }} - encrypt: {{ $storage.s3.encrypt }} - {{- end }} - {{- if $storage.s3.keyid }} - keyid: {{ $storage.s3.keyid }} - {{- end }} - {{- if $storage.s3.secure }} - secure: {{ $storage.s3.secure }} - {{- end }} - {{- if and $storage.s3.secure $storage.s3.skipverify }} - skipverify: {{ $storage.s3.skipverify }} - {{- end }} - {{- if $storage.s3.v4auth }} - v4auth: {{ $storage.s3.v4auth }} - {{- end }} - {{- if $storage.s3.chunksize }} - chunksize: {{ $storage.s3.chunksize }} - {{- end }} - {{- if $storage.s3.rootdirectory }} - rootdirectory: {{ $storage.s3.rootdirectory }} - {{- end }} - {{- if $storage.s3.storageclass }} - storageclass: {{ $storage.s3.storageclass }} - {{- end }} - {{- if $storage.s3.multipartcopychunksize }} - multipartcopychunksize: {{ $storage.s3.multipartcopychunksize }} - {{- end }} - {{- if $storage.s3.multipartcopymaxconcurrency }} - multipartcopymaxconcurrency: {{ $storage.s3.multipartcopymaxconcurrency }} - {{- end }} - {{- if $storage.s3.multipartcopythresholdsize }} - multipartcopythresholdsize: {{ $storage.s3.multipartcopythresholdsize }} - {{- end }} - {{- else if eq $type "swift" }} - swift: - authurl: {{ $storage.swift.authurl }} - username: {{ $storage.swift.username }} - container: {{ $storage.swift.container }} - {{- if $storage.swift.region }} - region: {{ $storage.swift.region }} - {{- end }} - {{- if $storage.swift.tenant }} - tenant: {{ $storage.swift.tenant }} - {{- end }} - {{- if $storage.swift.tenantid }} - tenantid: {{ $storage.swift.tenantid }} - {{- end }} - {{- if $storage.swift.domain }} - domain: {{ $storage.swift.domain }} - {{- end }} - {{- if $storage.swift.domainid }} - domainid: {{ $storage.swift.domainid }} - {{- end }} - {{- if $storage.swift.trustid }} - trustid: {{ $storage.swift.trustid }} - {{- end }} - {{- if $storage.swift.insecureskipverify }} - insecureskipverify: {{ $storage.swift.insecureskipverify }} - {{- end }} - {{- if $storage.swift.chunksize }} - chunksize: {{ $storage.swift.chunksize }} - {{- end }} - {{- if $storage.swift.prefix }} - prefix: {{ $storage.swift.prefix }} - {{- end }} - {{- if $storage.swift.authversion }} - authversion: {{ $storage.swift.authversion }} - {{- end }} - {{- if $storage.swift.endpointtype }} - endpointtype: {{ $storage.swift.endpointtype }} - {{- end }} - {{- if $storage.swift.tempurlcontainerkey }} - tempurlcontainerkey: {{ $storage.swift.tempurlcontainerkey }} - {{- end }} - {{- if $storage.swift.tempurlmethods }} - tempurlmethods: {{ $storage.swift.tempurlmethods }} - {{- end }} - {{- else if eq $type "oss" }} - oss: - accesskeyid: {{ $storage.oss.accesskeyid }} - region: {{ $storage.oss.region }} - bucket: {{ $storage.oss.bucket }} - {{- if $storage.oss.endpoint }} - endpoint: {{ $storage.oss.bucket }}.{{ $storage.oss.endpoint }} - {{- end }} - {{- if $storage.oss.internal }} - internal: {{ $storage.oss.internal }} - {{- end }} - {{- if $storage.oss.encrypt }} - encrypt: {{ $storage.oss.encrypt }} - {{- end }} - {{- if $storage.oss.secure }} - secure: {{ $storage.oss.secure }} - {{- end }} - {{- if $storage.oss.chunksize }} - chunksize: {{ $storage.oss.chunksize }} - {{- end }} - {{- if $storage.oss.rootdirectory }} - rootdirectory: {{ $storage.oss.rootdirectory }} - {{- end }} - {{- end }} - cache: - layerinfo: redis - maintenance: - uploadpurging: - {{- if .Values.registry.upload_purging.enabled }} - enabled: true - age: {{ .Values.registry.upload_purging.age }} - interval: {{ .Values.registry.upload_purging.interval }} - dryrun: {{ .Values.registry.upload_purging.dryrun }} - {{- else }} - enabled: false - {{- end }} - delete: - enabled: true - redirect: - disable: {{ $storage.disableredirect }} - redis: - addr: {{ template "harbor.redis.addr" . }} - {{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }} - sentinelMasterSet: {{ template "harbor.redis.masterSet" . }} - {{- end }} - db: {{ template "harbor.redis.dbForRegistry" . }} - {{- if not (eq (include "harbor.redis.password" .) "") }} - password: {{ template "harbor.redis.password" . }} - {{- end }} - readtimeout: 10s - writetimeout: 10s - dialtimeout: 10s - pool: - maxidle: 100 - maxactive: 500 - idletimeout: 60s - http: - addr: :{{ template "harbor.registry.containerPort" . }} - relativeurls: {{ .Values.registry.relativeurls }} - {{- if .Values.internalTLS.enabled }} - tls: - certificate: /etc/harbor/ssl/registry/tls.crt - key: /etc/harbor/ssl/registry/tls.key - minimumtls: tls1.2 - {{- end }} - # set via environment variable - # secret: placeholder - debug: - {{- if .Values.metrics.enabled}} - addr: :{{ .Values.metrics.registry.port }} - prometheus: - enabled: true - path: {{ .Values.metrics.registry.path }} - {{- else }} - addr: localhost:5001 - {{- end }} - auth: - htpasswd: - realm: harbor-registry-basic-realm - path: /etc/registry/passwd - validation: - disabled: true - compatibility: - schema1: - enabled: true - - {{- if .Values.registry.middleware.enabled }} - {{- $middleware := .Values.registry.middleware }} - {{- $middlewareType := $middleware.type }} - {{- if eq $middlewareType "cloudFront" }} - middleware: - storage: - - name: cloudfront - options: - baseurl: {{ $middleware.cloudFront.baseurl }} - privatekey: /etc/registry/pk.pem - keypairid: {{ $middleware.cloudFront.keypairid }} - duration: {{ $middleware.cloudFront.duration }} - ipfilteredby: {{ $middleware.cloudFront.ipfilteredby }} - {{- end }} - {{- end }} - ctl-config.yml: |+ - --- - {{- if .Values.internalTLS.enabled }} - protocol: "https" - port: 8443 - https_config: - cert: "/etc/harbor/ssl/registry/tls.crt" - key: "/etc/harbor/ssl/registry/tls.key" - {{- else }} - protocol: "http" - port: 8080 - {{- end }} - log_level: {{ .Values.logLevel }} - registry_config: "/etc/registry/config.yml" diff --git a/charts/harbor/harbor/1.14.0/templates/registry/registry-dpl.yaml b/charts/harbor/harbor/1.14.0/templates/registry/registry-dpl.yaml deleted file mode 100644 index dc4a833477..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/registry/registry-dpl.yaml +++ /dev/null @@ -1,419 +0,0 @@ -{{- $storage := .Values.persistence.imageChartStorage }} -{{- $type := $storage.type }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - replicas: {{ .Values.registry.replicas }} - revisionHistoryLimit: {{ .Values.registry.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: registry - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: registry -{{- if .Values.registry.podLabels }} -{{ toYaml .Values.registry.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/registry/registry-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.registry.podAnnotations }} -{{ toYaml .Values.registry.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - fsGroupChangePolicy: OnRootMismatch -{{- if .Values.registry.serviceAccountName }} - serviceAccountName: {{ .Values.registry.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.registry.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: registry -{{- end }} -{{- end }} - containers: - - name: registry - image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.registry.resources }} - resources: -{{ toYaml .Values.registry.registry.resources | indent 10 }} -{{- end }} - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: "{{ template "harbor.registry" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.registry.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registry.containerPort" . }} - - containerPort: 5001 - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-htpasswd - mountPath: /etc/registry/passwd - subPath: passwd - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - mountPath: /etc/registry/pk.pem - subPath: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - - name: registryctl - image: {{ .Values.registry.controller.image.repository }}:{{ .Values.registry.controller.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.controller.resources }} - resources: -{{ toYaml .Values.registry.controller.resources | indent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.registryCtl" . }}" - - secretRef: - name: "{{ template "harbor.registry" . }}" - - secretRef: - name: "{{ template "harbor.registryCtl" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.controller.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registryctl.containerPort" . }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: registry-htpasswd - secret: - {{- if not .Values.registry.credentials.existingSecret }} - secretName: {{ template "harbor.registry" . }}-htpasswd - {{ else }} - secretName: {{ .Values.registry.credentials.existingSecret }} - {{- end }} - items: - - key: REGISTRY_HTPASSWD - path: passwd - - name: registry-config - configMap: - name: "{{ template "harbor.registry" . }}" - - name: registry-data - {{- if and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "filesystem") }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.registry.existingClaim | default (include "harbor.registry" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.registry.secretName" . }} - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - secret: - {{- if and (eq $type "gcs") $storage.gcs.existingSecret }} - secretName: {{ $storage.gcs.existingSecret }} - {{- else }} - secretName: {{ template "harbor.registry" . }} - {{- end }} - items: - - key: GCS_KEY_DATA - path: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - secret: - secretName: {{ .Values.persistence.imageChartStorage.caBundleSecretName }} - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - secret: - secretName: {{ .Values.registry.middleware.cloudFront.privateKeySecret }} - items: - - key: CLOUDFRONT_KEY_DATA - path: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.registry.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.registry.priorityClassName }} - priorityClassName: {{ .Values.registry.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/registry/registry-pvc.yaml b/charts/harbor/harbor/1.14.0/templates/registry/registry-pvc.yaml deleted file mode 100644 index 2112e22877..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/registry/registry-pvc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.persistence.enabled }} -{{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} -{{- if and (not $registry.existingClaim) (eq .Values.persistence.imageChartStorage.type "filesystem") }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.registry" . }} - annotations: - {{- range $key, $value := $registry.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - accessModes: - - {{ $registry.accessMode }} - resources: - requests: - storage: {{ $registry.size }} - {{- if $registry.storageClass }} - {{- if eq "-" $registry.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $registry.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/registry/registry-secret.yaml b/charts/harbor/harbor/1.14.0/templates/registry/registry-secret.yaml deleted file mode 100644 index e853a9cbec..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/registry/registry-secret.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.registry" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.registry.existingSecret }} - REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (include "harbor.secretKeyHelper" (dict "key" "REGISTRY_HTTP_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.redis.external.existingSecret }} - REGISTRY_REDIS_PASSWORD: {{ include "harbor.redis.password" . | b64enc | quote }} - {{- end }} - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if and (eq $type "azure") (not $storage.azure.existingSecret) }} - REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }} - {{- else if and (and (eq $type "gcs") (not $storage.gcs.existingSecret)) (not $storage.gcs.useWorkloadIdentity) }} - GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }} - {{- else if eq $type "s3" }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.accesskey) }} - REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }} - {{- end }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.secretkey) }} - REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "swift") (not ($storage.swift.existingSecret)) }} - REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }} - {{- if $storage.swift.secretkey }} - REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }} - {{- end }} - {{- if $storage.swift.accesskey }} - REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "oss") ((not ($storage.oss.existingSecret))) }} - REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }} - {{- end }} -{{- if not .Values.registry.credentials.existingSecret }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}-htpasswd" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if .Values.registry.credentials.htpasswdString }} - REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswdString | b64enc | quote }} - {{- else }} - REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/registry/registry-svc.yaml b/charts/harbor/harbor/1.14.0/templates/registry/registry-svc.yaml deleted file mode 100644 index 749690ea03..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/registry/registry-svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }} - port: {{ template "harbor.registry.servicePort" . }} - - - name: {{ ternary "https-controller" "http-controller" .Values.internalTLS.enabled }} - port: {{ template "harbor.registryctl.servicePort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.registry.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/registry/registry-tls.yaml b/charts/harbor/harbor/1.14.0/templates/registry/registry-tls.yaml deleted file mode 100644 index 9d1862c417..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/registry/registry-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.registry.crt\" is required!" .Values.internalTLS.registry.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.registry.key\" is required!" .Values.internalTLS.registry.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/registry/registryctl-cm.yaml b/charts/harbor/harbor/1.14.0/templates/registry/registryctl-cm.yaml deleted file mode 100644 index 87aa5ffe24..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/registry/registryctl-cm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- template "harbor.traceEnvsForRegistryCtl" . }} diff --git a/charts/harbor/harbor/1.14.0/templates/registry/registryctl-secret.yaml b/charts/harbor/harbor/1.14.0/templates/registry/registryctl-secret.yaml deleted file mode 100644 index 70097703e9..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/registry/registryctl-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- template "harbor.traceJaegerPassword" . }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.0/templates/trivy/trivy-secret.yaml b/charts/harbor/harbor/1.14.0/templates/trivy/trivy-secret.yaml deleted file mode 100644 index 84652c7498..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/trivy/trivy-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.trivy.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - redisURL: {{ include "harbor.redis.urlForTrivy" . | b64enc }} - gitHubToken: {{ .Values.trivy.gitHubToken | default "" | b64enc | quote }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/trivy/trivy-sts.yaml b/charts/harbor/harbor/1.14.0/templates/trivy/trivy-sts.yaml deleted file mode 100644 index aba23c9e8a..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/trivy/trivy-sts.yaml +++ /dev/null @@ -1,222 +0,0 @@ -{{- if .Values.trivy.enabled }} -{{- $trivy := .Values.persistence.persistentVolumeClaim.trivy }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: trivy -spec: - replicas: {{ .Values.trivy.replicas }} - serviceName: {{ template "harbor.trivy" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: trivy - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: trivy -{{- if .Values.trivy.podLabels }} -{{ toYaml .Values.trivy.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/trivy/trivy-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/trivy/trivy-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.trivy.podAnnotations }} -{{ toYaml .Values.trivy.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} -{{- end }} -{{- if .Values.trivy.serviceAccountName }} - serviceAccountName: {{ .Values.trivy.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }} -{{- with .Values.trivy.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: trivy -{{- end }} -{{- end }} - containers: - - name: trivy - image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - securityContext: - privileged: false - allowPrivilegeEscalation: false - env: - {{- if has "trivy" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - - name: "SCANNER_LOG_LEVEL" - value: {{ .Values.logLevel | quote }} - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: {{ .Values.trivy.debugMode | quote }} - - name: "SCANNER_TRIVY_VULN_TYPE" - value: {{ .Values.trivy.vulnType | quote }} - - name: "SCANNER_TRIVY_TIMEOUT" - value: {{ .Values.trivy.timeout | quote }} - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: {{ .Values.trivy.severity | quote }} - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: {{ .Values.trivy.ignoreUnfixed | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: {{ .Values.trivy.skipUpdate | default false | quote }} - - name: "SCANNER_TRIVY_OFFLINE_SCAN" - value: {{ .Values.trivy.offlineScan | default false | quote }} - - name: "SCANNER_TRIVY_SECURITY_CHECKS" - value: {{ .Values.trivy.securityCheck | quote }} - - name: "SCANNER_TRIVY_INSECURE" - value: {{ .Values.trivy.insecure | default false | quote }} - - name: SCANNER_API_SERVER_ADDR - value: ":{{ template "harbor.trivy.containerPort" . }}" - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: SCANNER_API_SERVER_TLS_KEY - value: /etc/harbor/ssl/trivy/tls.key - - name: SCANNER_API_SERVER_TLS_CERTIFICATE - value: /etc/harbor/ssl/trivy/tls.crt - {{- end }} - - name: "SCANNER_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL -{{- with .Values.trivy.extraEnvVars }} -{{- toYaml . | nindent 12 }} -{{- end }} - ports: - - name: api-server - containerPort: {{ template "harbor.trivy.containerPort" . }} - volumeMounts: - - name: data - mountPath: /home/scanner/.cache - subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} - readOnly: false - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - mountPath: /etc/harbor/ssl/trivy - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 10 }} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: -{{ toYaml .Values.trivy.resources | indent 12 }} - {{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }} - volumes: - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.trivy.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- if not .Values.persistence.enabled }} - - name: "data" - emptyDir: {} - {{- else if $trivy.existingClaim }} - - name: "data" - persistentVolumeClaim: - claimName: {{ $trivy.existingClaim }} - {{- end }} - {{- end }} - {{- with .Values.trivy.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.trivy.priorityClassName }} - priorityClassName: {{ .Values.trivy.priorityClassName }} - {{- end }} -{{- if and .Values.persistence.enabled (not $trivy.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $trivy.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $trivy.accessMode | quote }}] - {{- if $trivy.storageClass }} - {{- if (eq "-" $trivy.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $trivy.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $trivy.size | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/templates/trivy/trivy-svc.yaml b/charts/harbor/harbor/1.14.0/templates/trivy/trivy-svc.yaml deleted file mode 100644 index 24daf094e8..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/trivy/trivy-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{ if .Values.trivy.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.trivy" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-trivy" "http-trivy" .Values.internalTLS.enabled }} - protocol: TCP - port: {{ template "harbor.trivy.servicePort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: trivy -{{ end }} diff --git a/charts/harbor/harbor/1.14.0/templates/trivy/trivy-tls.yaml b/charts/harbor/harbor/1.14.0/templates/trivy/trivy-tls.yaml deleted file mode 100644 index a9c8330c37..0000000000 --- a/charts/harbor/harbor/1.14.0/templates/trivy/trivy-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.trivy.enabled .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.trivy.crt\" is required!" .Values.internalTLS.trivy.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.trivy.key\" is required!" .Values.internalTLS.trivy.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.0/values.yaml b/charts/harbor/harbor/1.14.0/values.yaml deleted file mode 100644 index 4edd63fa8c..0000000000 --- a/charts/harbor/harbor/1.14.0/values.yaml +++ /dev/null @@ -1,987 +0,0 @@ -expose: - # Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" - # and fill the information in the corresponding section - type: ingress - tls: - # Enable TLS or not. - # Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" - # Note: if the "expose.type" is "ingress" and TLS is disabled, - # the port must be included in the command when pulling/pushing images. - # Refer to https://github.com/goharbor/harbor/issues/5291 for details. - enabled: true - # The source of the tls certificate. Set as "auto", "secret" - # or "none" and fill the information in the corresponding section - # 1) auto: generate the tls certificate automatically - # 2) secret: read the tls certificate from the specified secret. - # The tls certificate can be generated manually or by cert manager - # 3) none: configure no tls certificate for the ingress. If the default - # tls certificate is configured in the ingress controller, choose this option - certSource: auto - auto: - # The common name used to generate the certificate, it's necessary - # when the type isn't "ingress" - commonName: "" - secret: - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - secretName: "" - ingress: - hosts: - core: core.harbor.domain - # set to the type of ingress controller if it has specific requirements. - # leave as `default` for most ingress controllers. - # set to `gce` if using the GCE ingress controller - # set to `ncp` if using the NCP (NSX-T Container Plugin) ingress controller - # set to `alb` if using the ALB ingress controller - # set to `f5-bigip` if using the F5 BIG-IP ingress controller - controller: default - ## Allow .Capabilities.KubeVersion.Version to be overridden while creating ingress - kubeVersionOverride: "" - className: "" - annotations: - # note different ingress controllers may require a different ssl-redirect annotation - # for Envoy, use ingress.kubernetes.io/force-ssl-redirect: "true" and remove the nginx lines below - ingress.kubernetes.io/ssl-redirect: "true" - ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - harbor: - # harbor ingress-specific annotations - annotations: {} - # harbor ingress-specific labels - labels: {} - clusterIP: - # The name of ClusterIP service - name: harbor - # The ip address of the ClusterIP service (leave empty for acquiring dynamic ip) - staticClusterIP: "" - # Annotations on the ClusterIP service - annotations: {} - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - nodePort: - # The name of NodePort service - name: harbor - ports: - http: - # The service port Harbor listens on when serving HTTP - port: 80 - # The node port Harbor listens on when serving HTTP - nodePort: 30002 - https: - # The service port Harbor listens on when serving HTTPS - port: 443 - # The node port Harbor listens on when serving HTTPS - nodePort: 30003 - loadBalancer: - # The name of LoadBalancer service - name: harbor - # Set the IP if the LoadBalancer supports assigning IP - IP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - annotations: {} - sourceRanges: [] - -# The external URL for Harbor core service. It is used to -# 1) populate the docker/helm commands showed on portal -# 2) populate the token service URL returned to docker client -# -# Format: protocol://domain[:port]. Usually: -# 1) if "expose.type" is "ingress", the "domain" should be -# the value of "expose.ingress.hosts.core" -# 2) if "expose.type" is "clusterIP", the "domain" should be -# the value of "expose.clusterIP.name" -# 3) if "expose.type" is "nodePort", the "domain" should be -# the IP address of k8s node -# -# If Harbor is deployed behind the proxy, set it as the URL of proxy -externalURL: https://core.harbor.domain - -# The internal TLS used for harbor components secure communicating. In order to enable https -# in each component tls cert files need to provided in advance. -internalTLS: - # If internal TLS enabled - enabled: false - # enable strong ssl ciphers (default: false) - strong_ssl_ciphers: false - # There are three ways to provide tls - # 1) "auto" will generate cert automatically - # 2) "manual" need provide cert file manually in following value - # 3) "secret" internal certificates from secret - certSource: "auto" - # The content of trust ca, only available when `certSource` is "manual" - trustCa: "" - # core related cert configuration - core: - # secret name for core's tls certs - secretName: "" - # Content of core's TLS cert file, only available when `certSource` is "manual" - crt: "" - # Content of core's TLS key file, only available when `certSource` is "manual" - key: "" - # jobservice related cert configuration - jobservice: - # secret name for jobservice's tls certs - secretName: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - key: "" - # registry related cert configuration - registry: - # secret name for registry's tls certs - secretName: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - key: "" - # portal related cert configuration - portal: - # secret name for portal's tls certs - secretName: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - key: "" - # trivy related cert configuration - trivy: - # secret name for trivy's tls certs - secretName: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - key: "" - -ipFamily: - # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component - ipv6: - enabled: true - # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component - ipv4: - enabled: true - -# The persistence is enabled by default and a default StorageClass -# is needed in the k8s cluster to provision volumes dynamically. -# Specify another StorageClass in the "storageClass" or set "existingClaim" -# if you already have existing persistent volumes to use -# -# For storing images and charts, you can also use "azure", "gcs", "s3", -# "swift" or "oss". Set it in the "imageChartStorage" section -persistence: - enabled: true - # Setting it to "keep" to avoid removing PVCs during a helm delete - # operation. Leaving it empty will delete PVCs after the chart deleted - # (this does not apply for PVCs that are created for internal database - # and redis components, i.e. they are never deleted automatically) - resourcePolicy: "keep" - persistentVolumeClaim: - registry: - # Use the existing PVC which must be created manually before bound, - # and specify the "subPath" if the PVC is shared with other components - existingClaim: "" - # Specify the "storageClass" used to provision the volume. Or the default - # StorageClass will be used (the default). - # Set it to "-" to disable dynamic provisioning - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - jobservice: - jobLog: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external database is used, the following settings for database will - # be ignored - database: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external Redis is used, the following settings for Redis will - # be ignored - redis: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - trivy: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - # Define which storage backend is used for registry to store - # images and charts. Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#storage - # for the detail. - imageChartStorage: - # Specify whether to disable `redirect` for images and chart storage, for - # backends which not supported it (such as using minio for `s3` storage type), please disable - # it. To disable redirects, simply set `disableredirect` to `true` instead. - # Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#redirect - # for the detail. - disableredirect: false - # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate. - # The secret must contain keys named "ca.crt" which will be injected into the trust store - # of registry's containers. - # caBundleSecretName: - - # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift", - # "oss" and fill the information needed in the corresponding section. The type - # must be "filesystem" if you want to use persistent volumes for registry - type: filesystem - filesystem: - rootdirectory: /storage - #maxthreads: 100 - azure: - accountname: accountname - accountkey: base64encodedaccountkey - container: containername - #realm: core.windows.net - # To use existing secret, the key must be AZURE_STORAGE_ACCESS_KEY - existingSecret: "" - gcs: - bucket: bucketname - # The base64 encoded json file which contains the key - encodedkey: base64-encoded-json-key-file - #rootdirectory: /gcs/object/name/prefix - #chunksize: "5242880" - # To use existing secret, the key must be GCS_KEY_DATA - existingSecret: "" - useWorkloadIdentity: false - s3: - # Set an existing secret for S3 accesskey and secretkey - # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry - #existingSecret: "" - region: us-west-1 - bucket: bucketname - #accesskey: awsaccesskey - #secretkey: awssecretkey - #regionendpoint: http://myobjects.local - #encrypt: false - #keyid: mykeyid - #secure: true - #skipverify: false - #v4auth: true - #chunksize: "5242880" - #rootdirectory: /s3/object/name/prefix - #storageclass: STANDARD - #multipartcopychunksize: "33554432" - #multipartcopymaxconcurrency: 100 - #multipartcopythresholdsize: "33554432" - swift: - authurl: https://storage.myprovider.com/v3/auth - username: username - password: password - container: containername - # keys in existing secret must be REGISTRY_STORAGE_SWIFT_PASSWORD, REGISTRY_STORAGE_SWIFT_SECRETKEY, REGISTRY_STORAGE_SWIFT_ACCESSKEY - existingSecret: "" - #region: fr - #tenant: tenantname - #tenantid: tenantid - #domain: domainname - #domainid: domainid - #trustid: trustid - #insecureskipverify: false - #chunksize: 5M - #prefix: - #secretkey: secretkey - #accesskey: accesskey - #authversion: 3 - #endpointtype: public - #tempurlcontainerkey: false - #tempurlmethods: - oss: - accesskeyid: accesskeyid - accesskeysecret: accesskeysecret - region: regionname - bucket: bucketname - # key in existingSecret must be REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - existingSecret: "" - #endpoint: endpoint - #internal: false - #encrypt: false - #secure: true - #chunksize: 10M - #rootdirectory: rootdirectory - -imagePullPolicy: IfNotPresent - -# Use this set to assign a list of default pullSecrets -imagePullSecrets: -# - name: docker-registry-secret -# - name: internal-registry-secret - -# The update strategy for deployments with persistent volumes(jobservice, registry): "RollingUpdate" or "Recreate" -# Set it as "Recreate" when "RWM" for volumes isn't supported -updateStrategy: - type: RollingUpdate - -# debug, info, warning, error or fatal -logLevel: info - -# The initial password of Harbor admin. Change it from portal after launching Harbor -# or give an existing secret for it -# key in secret is given via (default to HARBOR_ADMIN_PASSWORD) -# existingSecretAdminPassword: -existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD -harborAdminPassword: "Harbor12345" - -# The name of the secret which contains key named "ca.crt". Setting this enables the -# download link on portal to download the CA certificate when the certificate isn't -# generated automatically -caSecretName: "" - -# The secret key used for encryption. Must be a string of 16 chars. -secretKey: "not-a-secure-key" -# If using existingSecretSecretKey, the key must be secretKey -existingSecretSecretKey: "" - -# The proxy settings for updating trivy vulnerabilities from the Internet and replicating -# artifacts from/to the registries that cannot be reached directly -proxy: - httpProxy: - httpsProxy: - noProxy: 127.0.0.1,localhost,.local,.internal - components: - - core - - jobservice - - trivy - -# Run the migration job via helm hook -enableMigrateHelmHook: false - -# The custom ca bundle secret, the secret must contain key named "ca.crt" -# which will be injected into the trust store for core, jobservice, registry, trivy components -# caBundleSecretName: "" - -## UAA Authentication Options -# If you're using UAA for authentication behind a self-signed -# certificate you will need to provide the CA Cert. -# Set uaaSecretName below to provide a pre-created secret that -# contains a base64 encoded CA Certificate named `ca.crt`. -# uaaSecretName: - -# If service exposed via "ingress", the Nginx will not be used -nginx: - image: - repository: goharbor/nginx-photon - tag: v2.10.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -portal: - image: - repository: goharbor/harbor-portal - tag: v2.10.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - -core: - image: - repository: goharbor/harbor-core - tag: v2.10.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - ## Startup probe values - startupProbe: - enabled: true - initialDelaySeconds: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## User settings configuration json string - configureUserSettings: - # The provider for updating project quota(usage), there are 2 options, redis or db. - # By default it is implemented by db but you can configure it to redis which - # can improve the performance of high concurrent pushing to the same project, - # and reduce the database connections spike and occupies. - # Using redis will bring up some delay for quota usage updation for display, so only - # suggest switch provider to redis if you were ran into the db connections spike around - # the scenario of high concurrent pushing to same project, no improvment for other scenes. - quotaUpdateProvider: db # Or redis - # Secret is used when core server communicates with other components. - # If a secret key is not specified, Helm will generate one. Alternatively set existingSecret to use an existing secret - # Must be a string of 16 chars. - secret: "" - # Fill in the name of a kubernetes secret if you want to use your own - # If using existingSecret, the key must be secret - existingSecret: "" - # Fill the name of a kubernetes secret if you want to use your own - # TLS certificate and private key for token encryption/decryption. - # The secret must contain keys named: - # "tls.key" - the private key - # "tls.crt" - the certificate - secretName: "" - # If not specifying a preexisting secret, a secret can be created from tokenKey and tokenCert and used instead. - # If none of secretName, tokenKey, and tokenCert are specified, an ephemeral key and certificate will be autogenerated. - # tokenKey and tokenCert must BOTH be set or BOTH unset. - # The tokenKey value is formatted as a multiline string containing a PEM-encoded RSA key, indented one more than tokenKey on the following line. - tokenKey: | - # If tokenKey is set, the value of tokenCert must be set as a PEM-encoded certificate signed by tokenKey, and supplied as a multiline string, indented one more than tokenCert on the following line. - tokenCert: | - # The XSRF key. Will be generated automatically if it isn't specified - xsrfKey: "" - # If using existingSecret, the key is defined by core.existingXsrfSecretKey - existingXsrfSecret: "" - # If using existingSecret, the key - existingXsrfSecretKey: CSRF_KEY - ## The priority class to run the pod as - priorityClassName: - # The time duration for async update artifact pull_time and repository - # pull_count, the unit is second. Will be 10 seconds if it isn't set. - # eg. artifactPullAsyncFlushDuration: 10 - artifactPullAsyncFlushDuration: - gdpr: - deleteUser: false - -jobservice: - image: - repository: goharbor/harbor-jobservice - tag: v2.10.0 - replicas: 1 - revisionHistoryLimit: 10 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - maxJobWorkers: 10 - # The logger for jobs: "file", "database" or "stdout" - jobLoggers: - - file - # - database - # - stdout - # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days - notification: - webhook_job_max_retry: 3 - webhook_job_http_client_timeout: 3 # in seconds - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: 24 - # the max time for execution in running state without new task created - max_dangling_hours: 168 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - # Secret is used when job service communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the job service secret - existingSecretKey: JOBSERVICE_SECRET - ## The priority class to run the pod as - priorityClassName: - -registry: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - registry: - image: - repository: goharbor/registry-photon - tag: v2.10.0 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - controller: - image: - repository: goharbor/harbor-registryctl - tag: v2.10.0 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - replicas: 1 - revisionHistoryLimit: 10 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # Secret is used to secure the upload state from client - # and registry storage backend. - # See: https://github.com/distribution/distribution/blob/main/docs/configuration.md#http - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the registry service secret - existingSecretKey: REGISTRY_HTTP_SECRET - # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. - relativeurls: false - credentials: - username: "harbor_registry_user" - password: "harbor_registry_password" - # If using existingSecret, the key must be REGISTRY_PASSWD and REGISTRY_HTPASSWD - existingSecret: "" - # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. - # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string - htpasswdString: "" - middleware: - enabled: false - type: cloudFront - cloudFront: - baseurl: example.cloudfront.net - keypairid: KEYPAIRID - duration: 3000s - ipfilteredby: none - # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key - # that allows access to CloudFront - privateKeySecret: "my-secret" - # enable purge _upload directories - upload_purging: - enabled: true - # remove files in _upload directories which exist for a period of time, default is one week. - age: 168h - # the interval of the purge operations - interval: 24h - dryrun: false - -trivy: - # enabled the flag to enable Trivy scanner - enabled: true - image: - # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon - # tag the tag for Trivy adapter image - tag: v2.10.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # replicas the number of Pod replicas - replicas: 1 - # debugMode the flag to enable Trivy debug mode with more verbose scanning log - debugMode: false - # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`. - vulnType: "os,library" - # severity a comma-separated list of severities to be checked - severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - # ignoreUnfixed the flag to display only fixed vulnerabilities - ignoreUnfixed: false - # insecure the flag to skip verifying registry certificate - insecure: false - # gitHubToken the GitHub access token to download Trivy DB - # - # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases. - # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached - # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update - # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one. - # Currently, the database is updated every 12 hours and published as a new release to GitHub. - # - # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough - # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000 - # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult - # https://developer.github.com/v3/#rate-limiting - # - # You can create a GitHub token by following the instructions in - # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - gitHubToken: "" - # skipUpdate the flag to disable Trivy DB downloads from GitHub - # - # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues. - # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the - # `/home/scanner/.cache/trivy/db/trivy.db` path. - skipUpdate: false - # The offlineScan option prevents Trivy from sending API requests to identify dependencies. - # - # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it. - # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't - # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode. - # It would work if all the dependencies are in local. - # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment. - offlineScan: false - # Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. Defaults to `vuln`. - securityCheck: "vuln" - # The duration to wait for scan completion - timeout: 5m0s - resources: - requests: - cpu: 200m - memory: 512Mi - limits: - cpu: 1 - memory: 1Gi - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -database: - # if external database is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-db - tag: v2.10.0 - # The initial superuser password for internal database - password: "changeit" - # The size limit for Shared memory, pgSQL use it for shared_buffer - # More details see: - # https://github.com/goharbor/harbor/issues/15034 - shmSizeLimit: 512Mi - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - # The timeout used in livenessProbe; 1 to 5 seconds - livenessProbe: - timeoutSeconds: 1 - # The timeout used in readinessProbe; 1 to 5 seconds - readinessProbe: - timeoutSeconds: 1 - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - initContainer: - migrator: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - permissions: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - external: - host: "192.168.0.1" - port: "5432" - username: "user" - password: "password" - coreDatabase: "registry" - # if using existing secret, the key must be "password" - existingSecret: "" - # "disable" - No SSL - # "require" - Always SSL (skip verification) - # "verify-ca" - Always SSL (verify that the certificate presented by the - # server was signed by a trusted CA) - # "verify-full" - Always SSL (verify that the certification presented by the - # server was signed by a trusted CA and the server host name matches the one - # in the certificate) - sslmode: "disable" - # The maximum number of connections in the idle connection pool per pod (core+exporter). - # If it <=0, no idle connections are retained. - maxIdleConns: 100 - # The maximum number of open connections to the database per pod (core+exporter). - # If it <= 0, then there is no limit on the number of open connections. - # Note: the default number of connections is 1024 for postgre of harbor. - maxOpenConns: 900 - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -redis: - # if external Redis is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/redis-photon - tag: v2.10.0 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # # jobserviceDatabaseIndex defaults to "1" - # # registryDatabaseIndex defaults to "2" - # # trivyAdapterIndex defaults to "5" - # # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - external: - # support redis, redis+sentinel - # addr for redis: : - # addr for redis+sentinel: :,:,: - addr: "192.168.0.2:6379" - # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel - sentinelMasterSet: "" - # The "coreDatabaseIndex" must be "0" as the library Harbor - # used doesn't support configuring it - # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - coreDatabaseIndex: "0" - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - # username field can be an empty string, and it will be authenticated against the default user - username: "" - password: "" - # If using existingSecret, the key must be REDIS_PASSWORD - existingSecret: "" - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -exporter: - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-exporter - tag: v2.10.0 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - cacheDuration: 23 - cacheCleanInterval: 14400 - ## The priority class to run the pod as - priorityClassName: - -metrics: - enabled: false - core: - path: /metrics - port: 8001 - registry: - path: /metrics - port: 8001 - jobservice: - path: /metrics - port: 8001 - exporter: - path: /metrics - port: 8001 - ## Create prometheus serviceMonitor to scrape harbor metrics. - ## This requires the monitoring.coreos.com/v1 CRD. Please see - ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md - ## - serviceMonitor: - enabled: false - additionalLabels: {} - # Scrape interval. If not set, the Prometheus default scrape interval is used. - interval: "" - # Metric relabel configs to apply to samples before ingestion. - metricRelabelings: - [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - # Relabel configs to apply to samples before ingestion. - relabelings: - [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] - # separator: ; - # regex: ^(.*)$ - # targetLabel: nodename - # replacement: $1 - # action: replace - -trace: - enabled: false - # trace provider: jaeger or otel - # jaeger should be 1.26+ - provider: jaeger - # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth - sample_rate: 1 - # namespace used to differentiate different harbor services - # namespace: - # attributes is a key value dict contains user defined attributes used to initialize trace provider - # attributes: - # application: harbor - jaeger: - # jaeger supports two modes: - # collector mode(uncomment endpoint and uncomment username, password if needed) - # agent mode(uncomment agent_host and agent_port) - endpoint: http://hostname:14268/api/traces - # username: - # password: - # agent_host: hostname - # export trace data by jaeger.thrift in compact mode - # agent_port: 6831 - otel: - endpoint: hostname:4318 - url_path: /v1/traces - compression: false - insecure: true - # timeout is in seconds - timeout: 10 - -# cache layer configurations -# if this feature enabled, harbor will cache the resource -# `project/project_metadata/repository/artifact/manifest` in the redis -# which help to improve the performance of high concurrent pulling manifest. -cache: - # default is not enabled. - enabled: false - # default keep cache for one day. - expireHours: 24 diff --git a/charts/harbor/harbor/1.14.1/.helmignore b/charts/harbor/harbor/1.14.1/.helmignore deleted file mode 100644 index b4424fd59b..0000000000 --- a/charts/harbor/harbor/1.14.1/.helmignore +++ /dev/null @@ -1,6 +0,0 @@ -.github/* -docs/* -.git/* -.gitignore -CONTRIBUTING.md -test/* \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/Chart.yaml b/charts/harbor/harbor/1.14.1/Chart.yaml deleted file mode 100644 index e077f02120..0000000000 --- a/charts/harbor/harbor/1.14.1/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor -apiVersion: v1 -appVersion: 2.10.1 -description: An open source trusted cloud native registry that stores, signs, and - scans content -home: https://goharbor.io -icon: https://raw.githubusercontent.com/goharbor/website/main/static/img/logos/harbor-icon-color.png -keywords: -- docker -- registry -- harbor -maintainers: -- email: yinw@vmware.com - name: Wenkai Yin -- email: hweiwei@vmware.com - name: Weiwei He -- email: yshengwen@vmware.com - name: Shengwen Yu -name: harbor -sources: -- https://github.com/goharbor/harbor -- https://github.com/goharbor/harbor-helm -version: 1.14.1 diff --git a/charts/harbor/harbor/1.14.1/LICENSE b/charts/harbor/harbor/1.14.1/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/charts/harbor/harbor/1.14.1/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/charts/harbor/harbor/1.14.1/README.md b/charts/harbor/harbor/1.14.1/README.md deleted file mode 100644 index 472324a3ff..0000000000 --- a/charts/harbor/harbor/1.14.1/README.md +++ /dev/null @@ -1,411 +0,0 @@ -# Helm Chart for Harbor - -**Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be found [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. - -This repository, including the issues, focuses on deploying Harbor chart via helm. For functionality issues or Harbor questions, please open issues on [goharbor/harbor](https://github.com/goharbor/harbor) - -## Introduction - -This [Helm](https://github.com/kubernetes/helm) chart installs [Harbor](https://github.com/goharbor/harbor) in a Kubernetes cluster. Welcome to [contribute](CONTRIBUTING.md) to Helm Chart for Harbor. - -## Prerequisites - -- Kubernetes cluster 1.20+ -- Helm v3.2.0+ - -## Installation - -### Add Helm repository - -```bash -helm repo add harbor https://helm.goharbor.io -``` - -### Configure the chart - -The following items can be set via `--set` flag during installation or configured by editing the `values.yaml` directly (need to download the chart first). - -#### Configure how to expose Harbor service - -- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. - **Notes:** if TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to issue [#5291](https://github.com/goharbor/harbor/issues/5291) for details. -- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. -- **NodePort**: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. -- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. - -#### Configure the external URL - -The external URL for Harbor core service is used to: - -1. populate the docker/helm commands showed on portal -2. populate the token service URL returned to docker client - -Format: `protocol://domain[:port]`. Usually: - -- if service exposed via `Ingress`, the `domain` should be the value of `expose.ingress.hosts.core` -- if service exposed via `ClusterIP`, the `domain` should be the value of `expose.clusterIP.name` -- if service exposed via `NodePort`, the `domain` should be the IP address of one Kubernetes node -- if service exposed via `LoadBalancer`, set the `domain` as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider - -If Harbor is deployed behind the proxy, set it as the URL of proxy. - -#### Configure how to persist data - -- **Disable**: The data does not survive the termination of a pod. -- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you already have existing persistent volumes to use. -- **External Storage(only for images and charts)**: For images and charts, the external storages are supported: `azure`, `gcs`, `s3` `swift` and `oss`. - -#### Configure the other items listed in [configuration](#configuration) section - -### Install the chart - -Install the Harbor helm chart with a release name `my-release`: -```bash -helm install my-release harbor/harbor -``` - -## Uninstallation - -To uninstall/delete the `my-release` deployment: -```bash -helm uninstall my-release -``` - -## Configuration - -The following table lists the configurable parameters of the Harbor chart and the default values. - -| Parameter | Description | Default | -| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| **Expose** | | | -| `expose.type` | How to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` | -| `expose.tls.enabled` | Enable TLS or not. Delete the `ssl-redirect` annotations in `expose.ingress.annotations` when TLS is disabled and `expose.type` is `ingress`. Note: if the `expose.type` is `ingress` and TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to https://github.com/goharbor/harbor/issues/5291 for details. | `true` | -| `expose.tls.certSource` | The source of the TLS certificate. Set as `auto`, `secret` or `none` and fill the information in the corresponding section: 1) auto: generate the TLS certificate automatically 2) secret: read the TLS certificate from the specified secret. The TLS certificate can be generated manually or by cert manager 3) none: configure no TLS certificate for the ingress. If the default TLS certificate is configured in the ingress controller, choose this option | `auto` | -| `expose.tls.auto.commonName` | The common name used to generate the certificate, it's necessary when the type isn't `ingress` | | -| `expose.tls.secret.secretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key | | -| `expose.ingress.hosts.core` | The host of Harbor core service in ingress rule | `core.harbor.domain` | -| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce`, `alb`, `f5-bigip` and `ncp` | `default` | -| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | | -| `expose.ingress.annotations` | The annotations used commonly for ingresses | | -| `expose.ingress.harbor.annotations` | The annotations specific to harbor ingress | {} | -| `expose.ingress.harbor.labels` | The labels specific to harbor ingress | {} | -| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` | -| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} | -| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.clusterIP.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.name` | The name of NodePort service | `harbor` | -| `expose.nodePort.ports.http.port` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.nodePort.ports.http.nodePort` | The node port Harbor listens on when serving HTTP | `30002` | -| `expose.nodePort.ports.https.port` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.ports.https.nodePort` | The node port Harbor listens on when serving HTTPS | `30003` | -| `expose.loadBalancer.name` | The name of service | `harbor` | -| `expose.loadBalancer.IP` | The IP of the loadBalancer. It only works when loadBalancer supports assigning IP | `""` | -| `expose.loadBalancer.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.loadBalancer.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `30002` | -| `expose.loadBalancer.annotations` | The annotations attached to the loadBalancer service | {} | -| `expose.loadBalancer.sourceRanges` | List of IP address ranges to assign to loadBalancerSourceRanges | [] | -| **Internal TLS** | | | -| `internalTLS.enabled` | Enable TLS for the components (core, jobservice, portal, registry, trivy) | `false` | -| `internalTLS.strong_ssl_ciphers` | Enable strong ssl ciphers for nginx and portal | `false` -| `internalTLS.certSource` | Method to provide TLS for the components, options are `auto`, `manual`, `secret`. | `auto` | -| `internalTLS.trustCa` | The content of trust CA, only available when `certSource` is `manual`. **Note**: all the internal certificates of the components must be issued by this CA | | -| `internalTLS.core.secretName` | The secret name for core component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.core.crt` | Content of core's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.core.key` | Content of core's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.secretName` | The secret name for jobservice component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.jobservice.crt` | Content of jobservice's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.key` | Content of jobservice's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.registry.secretName` | The secret name for registry component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.registry.crt` | Content of registry's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.registry.key` | Content of registry's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.portal.secretName` | The secret name for portal component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.portal.crt` | Content of portal's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.portal.key` | Content of portal's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.secretName` | The secret name for trivy component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.trivy.crt` | Content of trivy's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.key` | Content of trivy's TLS key file, only available when `certSource` is `manual` | | -| **IPFamily** | | | -| `ipFamily.ipv4.enabled` | if cluster is ipv4 enabled, all ipv4 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| `ipFamily.ipv6.enabled` | if cluster is ipv6 enabled, all ipv6 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| **Persistence** | | | -| `persistence.enabled` | Enable the data persistence or not | `true` | -| `persistence.resourcePolicy` | Setting it to `keep` to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted. Does not affect PVCs created for internal database and redis components. | `keep` | -| `persistence.persistentVolumeClaim.registry.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.registry.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.registry.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.registry.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.registry.size` | The size of the volume | `5Gi` | -| `persistence.persistentVolumeClaim.registry.annotations` | The annotations of the volume | | -|`persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.database.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.subPath` | The sub path used in the volume. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.accessMode` | The access mode of the volume. If external database is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.database.size` | The size of the volume. If external database is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.database.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.redis.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.subPath` | The sub path used in the volume. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.accessMode` | The access mode of the volume. If external Redis is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.redis.size` | The size of the volume. If external Redis is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.redis.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.trivy.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.trivy.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.trivy.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.trivy.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.trivy.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.trivy.annotations` | The annotations of the volume | | -| `persistence.imageChartStorage.disableredirect` | The configuration for managing redirects from content backends. For backends which not supported it (such as using minio for `s3` storage type), please set it to `true` to disable redirects. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect) for more details | `false` | -| `persistence.imageChartStorage.caBundleSecretName` | Specify the `caBundleSecretName` if the storage service uses a self-signed certificate. The secret must contain keys named `ca.crt` which will be injected into the trust store of registry's and containers. | | -| `persistence.imageChartStorage.type` | The type of storage for images and charts: `filesystem`, `azure`, `gcs`, `s3`, `swift` or `oss`. The type must be `filesystem` if you want to use persistent volumes for registry. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#storage) for more details | `filesystem` | -| `persistence.imageChartStorage.gcs.existingSecret` | An existing secret containing the gcs service account json key. The key must be gcs-key.json. | `""` | -| `persistence.imageChartStorage.gcs.useWorkloadIdentity` | A boolean to allow the use of workloadidentity in a GKE cluster. To use it, create a kubernetes service account and set the name in the key `serviceAccountName` of each component, then allow automounting the service account. | `false` | -| **General** | | | -| `externalURL` | The external URL for Harbor core service | `https://core.harbor.domain` | -| `caBundleSecretName` | The custom CA bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for core, jobservice, registry, trivy components. | | -| `uaaSecretName` | If using external UAA auth which has a self signed cert, you can provide a pre-created secret containing it under the key `ca.crt`. | | -| `imagePullPolicy` | The image pull policy | | -| `imagePullSecrets` | The imagePullSecrets names for all deployments | | -| `updateStrategy.type` | The update strategy for deployments with persistent volumes(jobservice, registry): `RollingUpdate` or `Recreate`. Set it as `Recreate` when `RWM` for volumes isn't supported | `RollingUpdate` | -| `logLevel` | The log level: `debug`, `info`, `warning`, `error` or `fatal` | `info` | -| `harborAdminPassword` | The initial password of Harbor admin. Change it from portal after launching Harbor | `Harbor12345` | -| `existingSecretAdminPassword` | The name of secret where admin password can be found. | | -| `existingSecretAdminPasswordKey` | The name of the key in the secret where to find harbor admin password Harbor | `HARBOR_ADMIN_PASSWORD` | -| `caSecretName` | The name of the secret which contains key named `ca.crt`. Setting this enables the download link on portal to download the CA certificate when the certificate isn't generated automatically | | -| `secretKey` | The key used for encryption. Must be a string of 16 chars | `not-a-secure-key` | -| `existingSecretSecretKey` | An existing secret containing the encoding secretKey | `""` | -| `proxy.httpProxy` | The URL of the HTTP proxy server | | -| `proxy.httpsProxy` | The URL of the HTTPS proxy server | | -| `proxy.noProxy` | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal | -| `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | -| `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | -| **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | -| `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | -| `nginx.image.tag` | Image tag | `dev` | -| `nginx.replicas` | The replica count | `1` | -| `nginx.revisionHistoryLimit` | The revision history limit | `10` | -| `nginx.resources` | The [resources] to allocate for container | undefined | -| `nginx.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `nginx.nodeSelector` | Node labels for pod assignment | `{}` | -| `nginx.tolerations` | Tolerations for pod assignment | `[]` | -| `nginx.affinity` | Node/Pod affinities | `{}` | -| `nginx.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | -| `nginx.priorityClassName` | The priority class to run the pod as | | -| **Portal** | | | -| `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | -| `portal.image.tag` | Tag for portal image | `dev` | -| `portal.replicas` | The replica count | `1` | -| `portal.revisionHistoryLimit` | The revision history limit | `10` | -| `portal.resources` | The [resources] to allocate for container | undefined | -| `portal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `portal.nodeSelector` | Node labels for pod assignment | `{}` | -| `portal.tolerations` | Tolerations for pod assignment | `[]` | -| `portal.affinity` | Node/Pod affinities | `{}` | -| `portal.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` | -| `portal.serviceAnnotations` | Annotations to add to the portal service | `{}` | -| `portal.priorityClassName` | The priority class to run the pod as | | -| **Core** | | | -| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | -| `core.image.tag` | Tag for Harbor core image | `dev` | -| `core.replicas` | The replica count | `1` | -| `core.revisionHistoryLimit` | The revision history limit | `10` | -| `core.startupProbe.initialDelaySeconds` | The initial delay in seconds for the startup probe | `10` | -| `core.resources` | The [resources] to allocate for container | undefined | -| `core.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `core.nodeSelector` | Node labels for pod assignment | `{}` | -| `core.tolerations` | Tolerations for pod assignment | `[]` | -| `core.affinity` | Node/Pod affinities | `{}` | -| `core.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `core.podAnnotations` | Annotations to add to the core pod | `{}` | -| `core.serviceAnnotations` | Annotations to add to the core service | `{}` | -| `core.configureUserSettings` | A JSON string to set in the environment variable `CONFIG_OVERWRITE_JSON` to configure user settings. See the [official docs](https://goharbor.io/docs/latest/install-config/configure-user-settings-cli/#configure-users-settings-using-an-environment-variable). | | -| `core.quotaUpdateProvider` | The provider for updating project quota(usage), there are 2 options, redis or db. By default it is implemented by db but you can configure it to redis which can improve the performance of high concurrent pushing to the same project, and reduce the database connections spike and occupies. Using redis will bring up some delay for quota usage updation for display, so only suggest switch provider to redis if you were ran into the db connections spike around the scenario of high concurrent pushing to same project, no improvment for other scenes. | `db` | -| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `core.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate and private key for token encryption/decryption. The secret must contain keys named: `tls.crt` - the certificate and `tls.key` - the private key. The default key pair will be used if it isn't set | | -| `core.tokenKey` | PEM-formatted RSA private key used to sign service tokens. Only used if `core.secretName` is unset. If set, `core.tokenCert` MUST also be set. | | -| `core.tokenCert` | PEM-formatted certificate signed by `core.tokenKey` used to validate service tokens. Only used if `core.secretName` is unset. If set, `core.tokenKey` MUST also be set. | | -| `core.xsrfKey` | The XSRF key. Will be generated automatically if it isn't specified | | -| `core.priorityClassName` | The priority class to run the pod as | | -| `core.artifactPullAsyncFlushDuration` | The time duration for async update artifact pull_time and repository pull_count | | -| `core.gdpr.deleteUser` | Enable GDPR compliant user delete | `false` | -| `core.gdpr.auditLogsCompliant` | Enable GDPR compliant for audit logs by changing username to its CRC32 value if that user was deleted from the system | `false` | -| **Jobservice** | | | -| `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | -| `jobservice.image.tag` | Tag for jobservice image | `dev` | -| `jobservice.replicas` | The replica count | `1` | -| `jobservice.revisionHistoryLimit` | The revision history limit | `10` | -| `jobservice.maxJobWorkers` | The max job workers | `10` | -| `jobservice.jobLoggers` | The loggers for jobs: `file`, `database` or `stdout` | `[file]` | -| `jobservice.loggerSweeperDuration` | The jobLogger sweeper duration in days (ignored if `jobLoggers` is set to `stdout`) | `14` | -| `jobservice.notification.webhook_job_max_retry` | The maximum retry of webhook sending notifications | `3` | -| `jobservice.notification.webhook_job_http_client_timeout` | The http client timeout value of webhook sending notifications | `3` | -| `jobservice.reaper.max_update_hours` | the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 | `24` | -| `jobservice.reaper.max_dangling_hours` | the max time for execution in running state without new task created | `168` | -| `jobservice.resources` | The [resources] to allocate for container | undefined | -| `jobservice.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `jobservice.nodeSelector` | Node labels for pod assignment | `{}` | -| `jobservice.tolerations` | Tolerations for pod assignment | `[]` | -| `jobservice.affinity` | Node/Pod affinities | `{}` | -| `jobservice.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` | -| `jobservice.priorityClassName` | The priority class to run the pod as | | -| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| **Registry** | | | -| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | -| `registry.registry.image.tag` | Tag for registry image | `dev` | -| `registry.registry.resources` | The [resources] to allocate for container | undefined | -| `registry.controller.image.repository` | Repository for registry controller image | `goharbor/harbor-registryctl` | -| `registry.controller.image.tag` | Tag for registry controller image | `dev` | -| `registry.controller.resources` | The [resources] to allocate for container | undefined | -| `registry.replicas` | The replica count | `1` | -| `registry.revisionHistoryLimit` | The revision history limit | `10` | -| `registry.nodeSelector` | Node labels for pod assignment | `{}` | -| `registry.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `registry.tolerations` | Tolerations for pod assignment | `[]` | -| `registry.affinity` | Node/Pod affinities | `{}` | -| `registry.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | | -| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` | -| `registry.priorityClassName` | The priority class to run the pod as | | -| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `registry.credentials.username` | The username that harbor core uses internally to access the registry instance. Together with the `registry.credentials.password`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` | -| `registry.credentials.password` | The password that harbor core uses internally to access the registry instance. Together with the `registry.credentials.username`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). It is suggested you update this value before installation. | `harbor_registry_password` | -| `registry.credentials.existingSecret` | An existing secret containing the password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). The key must be `REGISTRY_PASSWD` | `""` | -| `registry.credentials.htpasswdString` | Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. | undefined | -| `registry.relativeurls` | If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. Needed if harbor is behind a reverse proxy | `false` | -| `registry.upload_purging.enabled` | If true, enable purge _upload directories | `true` | -| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` | -| `registry.upload_purging.interval` | The interval of the purge operations | `24h` | -| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` | -| **[Trivy][trivy]** | | | -| `trivy.enabled` | The flag to enable Trivy scanner | `true` | -| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` | -| `trivy.image.tag` | Tag for Trivy adapter image | `dev` | -| `trivy.resources` | The [resources] to allocate for Trivy adapter container | | -| `trivy.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `trivy.replicas` | The number of Pod replicas | `1` | -| `trivy.debugMode` | The flag to enable Trivy debug mode | `false` | -| `trivy.vulnType` | Comma-separated list of vulnerability types. Possible values `os` and `library`. | `os,library` | -| `trivy.severity` | Comma-separated list of severities to be checked | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | -| `trivy.ignoreUnfixed` | The flag to display only fixed vulnerabilities | `false` | -| `trivy.insecure` | The flag to skip verifying registry certificate | `false` | -| `trivy.skipUpdate` | The flag to disable [Trivy DB][trivy-db] downloads from GitHub | `false` | -| `trivy.skipJavaDBUpdate` | If the flag is enabled you have to manually download the `trivy-java.db` file [Trivy Java DB][trivy-java-db] and mount it in the `/home/scanner/.cache/trivy/java-db/trivy-java.db` path | `false` | -| `trivy.offlineScan` | The flag prevents Trivy from sending API requests to identify dependencies. | `false` | -| `trivy.securityCheck` | Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. | `vuln` | -| `trivy.timeout` | The duration to wait for scan completion | `5m0s` | -| `trivy.gitHubToken` | The GitHub access token to download [Trivy DB][trivy-db] (see [GitHub rate limiting][trivy-rate-limiting]) | | -| `trivy.priorityClassName` | The priority class to run the pod as | | -| `trivy.topologySpreadConstraints` | The priority class to run the pod as | | -| **Database** | | | -| `database.type` | If external database is used, set it to `external` | `internal` | -| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` | -| `database.internal.image.tag` | Tag for database image | `dev` | -| `database.internal.password` | The password for database | `changeit` | -| `database.internal.shmSizeLimit` | The limit for the size of shared memory for internal PostgreSQL, conventionally it's around 50% of the memory limit of the container | `512Mi` | -| `database.internal.resources` | The [resources] to allocate for container | undefined | -| `database.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `database.internal.initContainer.migrator.resources` | The [resources] to allocate for the database migrator initContainer | undefined | -| `database.internal.initContainer.permissions.resources` | The [resources] to allocate for the database permissions initContainer | undefined | -| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `database.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `database.internal.affinity` | Node/Pod affinities | `{}` | -| `database.internal.priorityClassName` | The priority class to run the pod as | | -| `database.internal.livenessProbe.timeoutSeconds` | The timeout used in liveness probe; 1 to 5 seconds | 1 | -| `database.internal.readinessProbe.timeoutSeconds` | The timeout used in readiness probe; 1 to 5 seconds | 1 | -| `database.external.host` | The hostname of external database | `192.168.0.1` | -| `database.external.port` | The port of external database | `5432` | -| `database.external.username` | The username of external database | `user` | -| `database.external.password` | The password of external database | `password` | -| `database.external.coreDatabase` | The database used by core service | `registry` | -| `database.external.existingSecret` | An existing password containing the database password. the key must be `password`. | `""` | -| `database.external.sslmode` | Connection method of external database (require, verify-full, verify-ca, disable) | `disable` | -| `database.maxIdleConns` | The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained. | `50` | -| `database.maxOpenConns` | The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections. | `100` | -| `database.podAnnotations` | Annotations to add to the database pod | `{}` | -| **Redis** | | | -| `redis.type` | If external redis is used, set it to `external` | `internal` | -| `redis.internal.image.repository` | Repository for redis image | `goharbor/redis-photon` | -| `redis.internal.image.tag` | Tag for redis image | `dev` | -| `redis.internal.resources` | The [resources] to allocate for container | undefined | -| `redis.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `redis.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `redis.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `redis.internal.affinity` | Node/Pod affinities | `{}` | -| `redis.internal.priorityClassName` | The priority class to run the pod as | | -| `redis.internal.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.internal.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.internal.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.internal.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.internal.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.addr` | The addr of external Redis: :. When using sentinel, it should be :,:,: | `192.168.0.2:6379` | -| `redis.external.sentinelMasterSet` | The name of the set of Redis instances to monitor | | -| `redis.external.coreDatabaseIndex` | The database index for core | `0` | -| `redis.external.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.external.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.external.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.external.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.external.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.username` | The username of external Redis | | -| `redis.external.password` | The password of external Redis | | -| `redis.external.existingSecret` | Use an existing secret to connect to redis. The key must be `REDIS_PASSWORD`. | `""` | -| `redis.podAnnotations` | Annotations to add to the redis pod | `{}` | -| **Exporter** | | | -| `exporter.replicas` | The replica count | `1` | -| `exporter.revisionHistoryLimit` | The revision history limit | `10` | -| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` | -| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` | -| `exporter.image.tag` | Tag for exporter image | `dev` | -| `exporter.nodeSelector` | Node labels for pod assignment | `{}` | -| `exporter.tolerations` | Tolerations for pod assignment | `[]` | -| `exporter.affinity` | Node/Pod affinities | `{}` | -| `exporter.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `exporter.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `exporter.cacheDuration` | the cache duration for information that exporter collected from Harbor | `30` | -| `exporter.cacheCleanInterval` | cache clean interval for information that exporter collected from Harbor | `14400` | -| `exporter.priorityClassName` | The priority class to run the pod as | | -| **Metrics** | | | -| `metrics.enabled` | if enable harbor metrics | `false` | -| `metrics.core.path` | the url path for core metrics | `/metrics` | -| `metrics.core.port` | the port for core metrics | `8001` | -| `metrics.registry.path` | the url path for registry metrics | `/metrics` | -| `metrics.registry.port` | the port for registry metrics | `8001` | -| `metrics.exporter.path` | the url path for exporter metrics | `/metrics` | -| `metrics.exporter.port` | the port for exporter metrics | `8001` | -| `metrics.serviceMonitor.enabled` | create prometheus serviceMonitor. Requires prometheus CRD's | `false` | -| `metrics.serviceMonitor.additionalLabels` | additional labels to upsert to the manifest | `""` | -| `metrics.serviceMonitor.interval` | scrape period for harbor metrics | `""` | -| `metrics.serviceMonitor.metricRelabelings` | metrics relabel to add/mod/del before ingestion | `[]` | -| `metrics.serviceMonitor.relabelings` | relabels to add/mod/del to sample before scrape | `[]` | -| **Trace** | | | -| `trace.enabled` | Enable tracing or not | `false` | -| `trace.provider` | The tracing provider: `jaeger` or `otel`. `jaeger` should be 1.26+ | `jaeger` | -| `trace.sample_rate` | Set `sample_rate` to 1 if you want sampling 100% of trace data; set 0.5 if you want sampling 50% of trace data, and so forth | `1` | -| `trace.namespace` | Namespace used to differentiate different harbor services | | -| `trace.attributes` | `attributes` is a key value dict contains user defined attributes used to initialize trace provider | | -| `trace.jaeger.endpoint` | The endpoint of jaeger | `http://hostname:14268/api/traces` | -| `trace.jaeger.username` | The username of jaeger | | -| `trace.jaeger.password` | The password of jaeger | | -| `trace.jaeger.agent_host` | The agent host of jaeger | | -| `trace.jaeger.agent_port` | The agent port of jaeger | `6831` | -| `trace.otel.endpoint` | The endpoint of otel | `hostname:4318` | -| `trace.otel.url_path` | The URL path of otel | `/v1/traces` | -| `trace.otel.compression` | Whether enable compression or not for otel | `false` | -| `trace.otel.insecure` | Whether establish insecure connection or not for otel | `true` | -| `trace.otel.timeout` | The timeout in seconds of otel | `10` | -| **Cache** | | | -| `cache.enabled` | Enable cache layer or not | `false` | -| `cache.expireHours` | The expire hours of cache layer | `24` | - -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[trivy]: https://github.com/aquasecurity/trivy -[trivy-db]: https://github.com/aquasecurity/trivy-db -[trivy-java-db]: https://github.com/aquasecurity/trivy-java-db -[trivy-rate-limiting]: https://github.com/aquasecurity/trivy#github-rate-limiting diff --git a/charts/harbor/harbor/1.14.1/templates/NOTES.txt b/charts/harbor/harbor/1.14.1/templates/NOTES.txt deleted file mode 100644 index 0980c08a35..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }} -For more details, please visit https://github.com/goharbor/harbor diff --git a/charts/harbor/harbor/1.14.1/templates/_helpers.tpl b/charts/harbor/harbor/1.14.1/templates/_helpers.tpl deleted file mode 100644 index b3430a1f36..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/_helpers.tpl +++ /dev/null @@ -1,566 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "harbor.name" -}} -{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "harbor.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "harbor" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Helm required labels */}} -{{- define "harbor.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* matchLabels */}} -{{- define "harbor.matchLabels" -}} -release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* Helper for printing values from existing secrets*/}} -{{- define "harbor.secretKeyHelper" -}} - {{- if and (not (empty .data)) (hasKey .data .key) }} - {{- index .data .key | b64dec -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCert" -}} - {{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForIngress" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (eq .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForNginx" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (ne .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.host" -}} - {{- if eq .Values.database.type "internal" -}} - {{- template "harbor.database" . }} - {{- else -}} - {{- .Values.database.external.host -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.port" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "5432" -}} - {{- else -}} - {{- .Values.database.external.port -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.username" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "postgres" -}} - {{- else -}} - {{- .Values.database.external.username -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.rawPassword" -}} - {{- if eq .Values.database.type "internal" -}} - {{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.database" .) -}} - {{- if and (not (empty $existingSecret)) (hasKey $existingSecret.data "POSTGRES_PASSWORD") -}} - {{- .Values.database.internal.password | default (index $existingSecret.data "POSTGRES_PASSWORD" | b64dec) -}} - {{- else -}} - {{- .Values.database.internal.password -}} - {{- end -}} - {{- else -}} - {{- .Values.database.external.password -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.escapedRawPassword" -}} - {{- include "harbor.database.rawPassword" . | urlquery | replace "+" "%20" -}} -{{- end -}} - -{{- define "harbor.database.encryptedPassword" -}} - {{- include "harbor.database.rawPassword" . | b64enc | quote -}} -{{- end -}} - -{{- define "harbor.database.coreDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "registry" -}} - {{- else -}} - {{- .Values.database.external.coreDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.sslmode" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "disable" -}} - {{- else -}} - {{- .Values.database.external.sslmode -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.redis.scheme" -}} - {{- with .Values.redis }} - {{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }} - {{- end }} -{{- end -}} - -/*host:port*/ -{{- define "harbor.redis.addr" -}} - {{- with .Values.redis }} - {{- ternary (printf "%s:6379" (include "harbor.redis" $ )) .external.addr (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.masterSet" -}} - {{- with .Values.redis }} - {{- ternary .external.sentinelMasterSet "" (eq "redis+sentinel" (include "harbor.redis.scheme" $)) }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.password" -}} - {{- with .Values.redis }} - {{- ternary "" .external.password (eq .type "internal") }} - {{- end }} -{{- end -}} - - -{{- define "harbor.redis.pwdfromsecret" -}} - {{- (lookup "v1" "Secret" .Release.Namespace (.Values.redis.external.existingSecret)).data.REDIS_PASSWORD | b64dec }} -{{- end -}} - -{{- define "harbor.redis.cred" -}} - {{- with .Values.redis }} - {{- if (and (eq .type "external" ) (.external.existingSecret)) }} - {{- printf ":%s@" (include "harbor.redis.pwdfromsecret" $) }} - {{- else }} - {{- ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }} - {{- end }} - {{- end }} -{{- end -}} - -/*scheme://[:password@]host:port[/master_set]*/ -{{- define "harbor.redis.url" -}} - {{- with .Values.redis }} - {{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }} - {{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) (include "harbor.redis.cred" $) (include "harbor.redis.addr" $) $path -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCore" -}} - {{- with .Values.redis }} - {{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index*/ -{{- define "harbor.redis.urlForJobservice" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.jobserviceDatabaseIndex .external.jobserviceDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForRegistry" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForTrivy" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.trivyAdapterIndex .external.trivyAdapterIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForHarbor" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.harborDatabaseIndex .external.harborDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCache" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.cacheLayerDatabaseIndex .external.cacheLayerDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.dbForRegistry" -}} - {{- with .Values.redis }} - {{- ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.noProxy" -}} - {{- printf "%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}} -{{- end -}} - -{{- define "harbor.caBundleVolume" -}} -- name: ca-bundle-certs - secret: - secretName: {{ .Values.caBundleSecretName }} -{{- end -}} - -{{- define "harbor.caBundleVolumeMount" -}} -- name: ca-bundle-certs - mountPath: /harbor_cust_cert/custom-ca.crt - subPath: ca.crt -{{- end -}} - -{{/* scheme for all components because it only support http mode */}} -{{- define "harbor.component.scheme" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "https" -}} - {{- else -}} - {{- printf "http" -}} - {{- end -}} -{{- end -}} - -{{/* core component container port */}} -{{- define "harbor.core.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* core component service port */}} -{{- define "harbor.core.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component container port */}} -{{- define "harbor.jobservice.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component service port */}} -{{- define "harbor.jobservice.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* portal component container port */}} -{{- define "harbor.portal.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* portal component service port */}} -{{- define "harbor.portal.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* registry component container port */}} -{{- define "harbor.registry.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registry component service port */}} -{{- define "harbor.registry.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component container port */}} -{{- define "harbor.registryctl.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component service port */}} -{{- define "harbor.registryctl.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component container port */}} -{{- define "harbor.trivy.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component service port */}} -{{- define "harbor.trivy.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* CORE_URL */}} -{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}} -{{- define "harbor.coreURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}} -{{- end -}} - -{{/* JOBSERVICE_URL */}} -{{- define "harbor.jobserviceURL" -}} - {{- printf "%s://%s-jobservice" (include "harbor.component.scheme" .) (include "harbor.fullname" .) -}} -{{- end -}} - -{{/* PORTAL_URL */}} -{{- define "harbor.portalURL" -}} - {{- printf "%s://%s" (include "harbor.component.scheme" .) (include "harbor.portal" .) -}} -{{- end -}} - -{{/* REGISTRY_URL */}} -{{- define "harbor.registryURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registry.servicePort" .) -}} -{{- end -}} - -{{/* REGISTRY_CONTROLLER_URL */}} -{{- define "harbor.registryControllerURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registryctl.servicePort" .) -}} -{{- end -}} - -{{/* TOKEN_SERVICE_URL */}} -{{- define "harbor.tokenServiceURL" -}} - {{- printf "%s/service/token" (include "harbor.coreURL" .) -}} -{{- end -}} - -{{/* TRIVY_ADAPTER_URL */}} -{{- define "harbor.trivyAdapterURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}} -{{- end -}} - -{{- define "harbor.internalTLS.core.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.core.secretName -}} - {{- else -}} - {{- printf "%s-core-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.jobservice.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.jobservice.secretName -}} - {{- else -}} - {{- printf "%s-jobservice-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.portal.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.portal.secretName -}} - {{- else -}} - {{- printf "%s-portal-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.registry.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.registry.secretName -}} - {{- else -}} - {{- printf "%s-registry-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.trivy.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.trivy.secretName -}} - {{- else -}} - {{- printf "%s-trivy-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsCoreSecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsSecretForNginx" -}} - {{- if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.nginx" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.metricsPortName" -}} - {{- if .Values.internalTLS.enabled }} - {{- printf "https-metrics" -}} - {{- else -}} - {{- printf "http-metrics" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.traceEnvs" -}} - TRACE_ENABLED: "{{ .Values.trace.enabled }}" - TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}" - TRACE_NAMESPACE: "{{ .Values.trace.namespace }}" - {{- if .Values.trace.attributes }} - TRACE_ATTRIBUTES: {{ .Values.trace.attributes | toJson | squote }} - {{- end }} - {{- if eq .Values.trace.provider "jaeger" }} - TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}" - TRACE_JAEGER_USERNAME: "{{ .Values.trace.jaeger.username }}" - TRACE_JAEGER_AGENT_HOSTNAME: "{{ .Values.trace.jaeger.agent_host }}" - TRACE_JAEGER_AGENT_PORT: "{{ .Values.trace.jaeger.agent_port }}" - {{- else }} - TRACE_OTEL_ENDPOINT: "{{ .Values.trace.otel.endpoint }}" - TRACE_OTEL_URL_PATH: "{{ .Values.trace.otel.url_path }}" - TRACE_OTEL_COMPRESSION: "{{ .Values.trace.otel.compression }}" - TRACE_OTEL_INSECURE: "{{ .Values.trace.otel.insecure }}" - TRACE_OTEL_TIMEOUT: "{{ .Values.trace.otel.timeout }}" - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForCore" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-core" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForJobservice" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-jobservice" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForRegistryCtl" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-registryctl" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceJaegerPassword" -}} - {{- if and .Values.trace.enabled (eq .Values.trace.provider "jaeger") }} - TRACE_JAEGER_PASSWORD: "{{ .Values.trace.jaeger.password | default "" | b64enc }}" - {{- end }} -{{- end -}} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "harbor.ingress.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/core/core-cm.yaml b/charts/harbor/harbor/1.14.1/templates/core/core-cm.yaml deleted file mode 100644 index 93cab01b4c..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/core/core-cm.yaml +++ /dev/null @@ -1,90 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - app.conf: |+ - appname = Harbor - runmode = prod - enablegzip = true - - [prod] - httpport = {{ ternary "8443" "8080" .Values.internalTLS.enabled }} - PORT: "{{ ternary "8443" "8080" .Values.internalTLS.enabled }}" - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "{{ template "harbor.database.host" . }}" - POSTGRESQL_PORT: "{{ template "harbor.database.port" . }}" - POSTGRESQL_USERNAME: "{{ template "harbor.database.username" . }}" - POSTGRESQL_DATABASE: "{{ template "harbor.database.coreDatabase" . }}" - POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" - EXT_ENDPOINT: "{{ .Values.externalURL }}" - CORE_URL: "{{ template "harbor.coreURL" . }}" - JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - CORE_LOCAL_URL: "{{ ternary "https://127.0.0.1:8443" "http://127.0.0.1:8080" .Values.internalTLS.enabled }}" - WITH_TRIVY: {{ .Values.trivy.enabled | quote }} - TRIVY_ADAPTER_URL: "{{ template "harbor.trivyAdapterURL" . }}" - REGISTRY_STORAGE_PROVIDER_NAME: "{{ .Values.persistence.imageChartStorage.type }}" - LOG_LEVEL: "{{ .Values.logLevel }}" - CONFIG_PATH: "/etc/core/app.conf" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}" - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.harborDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.harborDatabaseIndex) }} - _REDIS_URL_HARBOR: "{{ template "harbor.redis.urlForHarbor" . }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} - PORTAL_URL: "{{ template "harbor.portalURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - {{- if .Values.uaaSecretName }} - UAA_CA_ROOT: "/etc/core/auth-ca/auth-ca.crt" - {{- end }} - {{- if has "core" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE: "docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory" - {{- if .Values.metrics.enabled}} - METRIC_ENABLE: "true" - METRIC_PATH: "{{ .Values.metrics.core.path }}" - METRIC_PORT: "{{ .Values.metrics.core.port }}" - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: core - {{- end }} - - {{- if hasKey .Values.core "gcTimeWindowHours" }} - #make the GC time window configurable for testing - GC_TIME_WINDOW_HOURS: "{{ .Values.core.gcTimeWindowHours }}" - {{- end }} - {{- template "harbor.traceEnvsForCore" . }} - - {{- if .Values.core.artifactPullAsyncFlushDuration }} - ARTIFACT_PULL_ASYNC_FLUSH_DURATION: {{ .Values.core.artifactPullAsyncFlushDuration | quote }} - {{- end }} - - {{- if .Values.core.gdpr}} - {{- if .Values.core.gdpr.deleteUser}} - GDPR_DELETE_USER: "true" - {{- end }} - {{- if .Values.core.gdpr.auditLogsCompliant}} - GDPR_AUDIT_LOGS: "true" - {{- end }} - {{- end }} - - {{- if .Values.cache.enabled }} - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - - {{- if .Values.core.quotaUpdateProvider }} - QUOTA_UPDATE_PROVIDER: "{{ .Values.core.quotaUpdateProvider }}" - {{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/core/core-dpl.yaml b/charts/harbor/harbor/1.14.1/templates/core/core-dpl.yaml deleted file mode 100644 index 9a92b45a4f..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/core/core-dpl.yaml +++ /dev/null @@ -1,248 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: core -spec: - replicas: {{ .Values.core.replicas }} - revisionHistoryLimit: {{ .Values.core.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: core - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: core -{{- if .Values.core.podLabels }} -{{ toYaml .Values.core.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.core.podAnnotations }} -{{ toYaml .Values.core.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.core.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: core -{{- end }} -{{- end }} - containers: - - name: core - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if .Values.core.startupProbe.enabled }} - startupProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 360 - initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} - periodSeconds: 10 - {{- end }} - livenessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/core/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/core/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/core/ca.crt - {{- end }} - {{- if .Values.database.external.existingSecret }} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} - {{- if .Values.core.existingXsrfSecret }} - - name: CSRF_KEY - valueFrom: - secretKeyRef: - name: {{ .Values.core.existingXsrfSecret }} - key: {{ .Values.core.existingXsrfSecretKey }} - {{- end }} -{{- with .Values.core.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - {{- if .Values.expose.tls.enabled }} - - name: ca-download - mountPath: /etc/core/ca - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - mountPath: /etc/core/auth-ca/auth-ca.crt - subPath: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - {{- end }} - - name: psc - mountPath: /etc/core/token - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} -{{- if .Values.core.resources }} - resources: -{{ toYaml .Values.core.resources | indent 10 }} -{{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - - name: secret-key - secret: - {{- if .Values.existingSecretSecretKey }} - secretName: {{ .Values.existingSecretSecretKey }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - items: - - key: secretKey - path: key - - name: token-service-private-key - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: ca-download - secret: - {{- if .Values.caSecretName }} - secretName: {{ .Values.caSecretName }} - {{- else if eq (include "harbor.autoGenCertForIngress" .) "true" }} - secretName: "{{ template "harbor.ingress" . }}" - {{- else if eq (include "harbor.autoGenCertForNginx" .) "true" }} - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - secret: - secretName: {{ .Values.uaaSecretName }} - items: - - key: ca.crt - path: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - - name: psc - emptyDir: {} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.core.priorityClassName }} - priorityClassName: {{ .Values.core.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/core/core-pre-upgrade-job.yaml b/charts/harbor/harbor/1.14.1/templates/core/core-pre-upgrade-job.yaml deleted file mode 100644 index 43c9d3596d..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/core/core-pre-upgrade-job.yaml +++ /dev/null @@ -1,74 +0,0 @@ -{{- if .Values.enableMigrateHelmHook }} -apiVersion: batch/v1 -kind: Job -metadata: - name: migration-job - labels: -{{ include "harbor.labels" . | indent 4 }} - component: migrator - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-5" -spec: - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: migrator - spec: - restartPolicy: Never - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 120 - containers: - - name: core-job - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/harbor/harbor_core", "-mode=migrate"] - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - {{- if .Values.database.external.existingSecret }} - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/core/core-secret.yaml b/charts/harbor/harbor/1.14.1/templates/core/core-secret.yaml deleted file mode 100644 index 62a41fce80..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/core/core-secret.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.core" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.existingSecretSecretKey }} - secretKey: {{ .Values.secretKey | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingSecret }} - secret: {{ .Values.core.secret | default (include "harbor.secretKeyHelper" (dict "key" "secret" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.core.secretName }} - {{- $ca := genCA "harbor-token-ca" 365 }} - tls.key: {{ .Values.core.tokenKey | default $ca.Key | b64enc | quote }} - tls.crt: {{ .Values.core.tokenCert | default $ca.Cert | b64enc | quote }} - {{- end }} - {{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} - {{- end }} - {{- if not .Values.database.external.existingSecret }} - POSTGRESQL_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingXsrfSecret }} - CSRF_KEY: {{ .Values.core.xsrfKey | default (include "harbor.secretKeyHelper" (dict "key" "CSRF_KEY" "data" $existingSecret.data)) | default (randAlphaNum 32) | b64enc | quote }} - {{- end }} -{{- if .Values.core.configureUserSettings }} - CONFIG_OVERWRITE_JSON: {{ .Values.core.configureUserSettings | b64enc | quote }} -{{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.14.1/templates/core/core-svc.yaml b/charts/harbor/harbor/1.14.1/templates/core/core-svc.yaml deleted file mode 100644 index 0d2cfb2915..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/core/core-svc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.core.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - name: {{ ternary "https-web" "http-web" .Values.internalTLS.enabled }} - port: {{ template "harbor.core.servicePort" . }} - targetPort: {{ template "harbor.core.containerPort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.core.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: core diff --git a/charts/harbor/harbor/1.14.1/templates/core/core-tls.yaml b/charts/harbor/harbor/1.14.1/templates/core/core-tls.yaml deleted file mode 100644 index c52148f0d9..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/core/core-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.core.crt\" is required!" .Values.internalTLS.core.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.core.key\" is required!" .Values.internalTLS.core.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/database/database-secret.yaml b/charts/harbor/harbor/1.14.1/templates/database/database-secret.yaml deleted file mode 100644 index 864aff4a18..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/database/database-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - POSTGRES_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end -}} diff --git a/charts/harbor/harbor/1.14.1/templates/database/database-ss.yaml b/charts/harbor/harbor/1.14.1/templates/database/database-ss.yaml deleted file mode 100644 index 3b08b07ef1..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/database/database-ss.yaml +++ /dev/null @@ -1,168 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -{{- $database := .Values.persistence.persistentVolumeClaim.database -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: database -spec: - replicas: 1 - serviceName: "{{ template "harbor.database" . }}" - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: database - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: database -{{- if .Values.database.podLabels }} -{{ toYaml .Values.database.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} -{{- if .Values.database.podAnnotations }} -{{ toYaml .Values.database.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.database.internal.serviceAccountName }} - serviceAccountName: {{ .Values.database.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.database.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - # as we change the data directory to a sub folder to support psp, the init container here - # is used to migrate the existing data. See https://github.com/goharbor/harbor-helm/issues/756 - # for more detail. - # we may remove it after several releases - - name: "data-migrator" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "[ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true"] -{{- if .Values.database.internal.initContainer.migrator.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.migrator.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - # with "fsGroup" set, each time a volume is mounted, Kubernetes must recursively chown() and chmod() all the files and directories inside the volume - # this causes the postgresql reports the "data directory /var/lib/postgresql/data/pgdata has group or world access" issue when using some CSIs e.g. Ceph - # use this init container to correct the permission - # as "fsGroup" applied before the init container running, the container has enough permission to execute the command - - name: "data-permissions-ensurer" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"] -{{- if .Values.database.internal.initContainer.permissions.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.permissions.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - containers: - - name: database - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.livenessProbe.timeoutSeconds }} - readinessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 1 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.readinessProbe.timeoutSeconds }} -{{- if .Values.database.internal.resources }} - resources: -{{ toYaml .Values.database.internal.resources | indent 10 }} -{{- end }} - envFrom: - - secretRef: - name: "{{ template "harbor.database" . }}" - env: - # put the data into a sub directory to avoid the permission issue in k8s with restricted psp enabled - # more detail refer to https://github.com/goharbor/harbor-helm/issues/756 - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" -{{- with .Values.database.internal.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - - name: shm-volume - mountPath: /dev/shm - volumes: - - name: shm-volume - emptyDir: - medium: Memory - sizeLimit: {{ .Values.database.internal.shmSizeLimit }} - {{- if not .Values.persistence.enabled }} - - name: "database-data" - emptyDir: {} - {{- else if $database.existingClaim }} - - name: "database-data" - persistentVolumeClaim: - claimName: {{ $database.existingClaim }} - {{- end -}} - {{- with .Values.database.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.database.internal.priorityClassName }} - priorityClassName: {{ .Values.database.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $database.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $database.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $database.accessMode | quote }}] - {{- if $database.storageClass }} - {{- if (eq "-" $database.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $database.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $database.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.14.1/templates/database/database-svc.yaml b/charts/harbor/harbor/1.14.1/templates/database/database-svc.yaml deleted file mode 100644 index 6475048cd9..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/database/database-svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 5432 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: database -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/exporter/exporter-cm-env.yaml b/charts/harbor/harbor/1.14.1/templates/exporter/exporter-cm-env.yaml deleted file mode 100644 index 0bf4e7d905..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/exporter/exporter-cm-env.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.exporter" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - LOG_LEVEL: "{{ .Values.logLevel }}" - HARBOR_EXPORTER_PORT: "{{ .Values.metrics.exporter.port }}" - HARBOR_EXPORTER_METRICS_PATH: "{{ .Values.metrics.exporter.path }}" - HARBOR_EXPORTER_METRICS_ENABLED: "{{ .Values.metrics.enabled }}" - HARBOR_EXPORTER_CACHE_TIME: "{{ .Values.exporter.cacheDuration }}" - HARBOR_EXPORTER_CACHE_CLEAN_INTERVAL: "{{ .Values.exporter.cacheCleanInterval }}" - HARBOR_METRIC_NAMESPACE: harbor - HARBOR_METRIC_SUBSYSTEM: exporter - HARBOR_REDIS_URL: "{{ template "harbor.redis.urlForJobservice" . }}" - HARBOR_REDIS_NAMESPACE: harbor_job_service_namespace - HARBOR_REDIS_TIMEOUT: "3600" - HARBOR_SERVICE_SCHEME: "{{ template "harbor.component.scheme" . }}" - HARBOR_SERVICE_HOST: "{{ template "harbor.core" . }}" - HARBOR_SERVICE_PORT: "{{ template "harbor.core.servicePort" . }}" - HARBOR_DATABASE_HOST: "{{ template "harbor.database.host" . }}" - HARBOR_DATABASE_PORT: "{{ template "harbor.database.port" . }}" - HARBOR_DATABASE_USERNAME: "{{ template "harbor.database.username" . }}" - HARBOR_DATABASE_DBNAME: "{{ template "harbor.database.coreDatabase" . }}" - HARBOR_DATABASE_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - HARBOR_DATABASE_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - HARBOR_DATABASE_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" -{{- end}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/exporter/exporter-dpl.yaml b/charts/harbor/harbor/1.14.1/templates/exporter/exporter-dpl.yaml deleted file mode 100644 index 6d2e1f53ac..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/exporter/exporter-dpl.yaml +++ /dev/null @@ -1,139 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: exporter -spec: - replicas: {{ .Values.exporter.replicas }} - revisionHistoryLimit: {{ .Values.exporter.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: exporter - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: exporter -{{- if .Values.exporter.podLabels }} -{{ toYaml .Values.exporter.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.exporter.podAnnotations }} -{{ toYaml .Values.exporter.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.exporter.serviceAccountName }} - serviceAccountName: {{ .Values.exporter.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.exporter.automountServiceAccountToken | default false }} -{{- with .Values.exporter.topologySpreadConstraints }} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: exporter -{{- end }} -{{- end }} - containers: - - name: exporter - image: {{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 30 - periodSeconds: 10 - args: ["-log-level", "{{ .Values.logLevel }}"] - envFrom: - - configMapRef: - name: "{{ template "harbor.exporter" . }}-env" - - secretRef: - name: "{{ template "harbor.exporter" . }}" - env: - {{- if .Values.database.external.existingSecret }} - - name: HARBOR_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} -{{- if .Values.exporter.resources }} - resources: -{{ toYaml .Values.exporter.resources | indent 10 }} -{{- end }} -{{- with .Values.exporter.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - # There are some metric data are collectd from harbor core. - # When internal TLS is enabled, the Exporter need the CA file to collect these data. - {{- end }} - volumes: - - name: config - secret: - secretName: "{{ template "harbor.exporter" . }}" - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.exporter.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.exporter.priorityClassName }} - priorityClassName: {{ .Values.exporter.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.14.1/templates/exporter/exporter-secret.yaml b/charts/harbor/harbor/1.14.1/templates/exporter/exporter-secret.yaml deleted file mode 100644 index 434a1bf689..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/exporter/exporter-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: -{{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} -{{- end }} -{{- if not .Values.database.external.existingSecret }} - HARBOR_DATABASE_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/exporter/exporter-svc.yaml b/charts/harbor/harbor/1.14.1/templates/exporter/exporter-svc.yaml deleted file mode 100644 index 4a6f3fdec6..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/exporter/exporter-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.exporter" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.exporter.port }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: exporter -{{ end }} diff --git a/charts/harbor/harbor/1.14.1/templates/ingress/ingress.yaml b/charts/harbor/harbor/1.14.1/templates/ingress/ingress.yaml deleted file mode 100644 index e4c06939c6..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/ingress/ingress.yaml +++ /dev/null @@ -1,145 +0,0 @@ -{{- if eq .Values.expose.type "ingress" }} -{{- $ingress := .Values.expose.ingress -}} -{{- $tls := .Values.expose.tls -}} -{{- if eq .Values.expose.ingress.controller "gce" }} - {{- $_ := set . "portal_path" "/*" -}} - {{- $_ := set . "api_path" "/api/*" -}} - {{- $_ := set . "service_path" "/service/*" -}} - {{- $_ := set . "v2_path" "/v2/*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/*" -}} - {{- $_ := set . "controller_path" "/c/*" -}} -{{- else if eq .Values.expose.ingress.controller "ncp" }} - {{- $_ := set . "portal_path" "/.*" -}} - {{- $_ := set . "api_path" "/api/.*" -}} - {{- $_ := set . "service_path" "/service/.*" -}} - {{- $_ := set . "v2_path" "/v2/.*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}} - {{- $_ := set . "controller_path" "/c/.*" -}} -{{- else }} - {{- $_ := set . "portal_path" "/" -}} - {{- $_ := set . "api_path" "/api/" -}} - {{- $_ := set . "service_path" "/service/" -}} - {{- $_ := set . "v2_path" "/v2/" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/" -}} - {{- $_ := set . "controller_path" "/c/" -}} -{{- end }} - ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.harbor.labels }} -{{ toYaml $ingress.harbor.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if .Values.internalTLS.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" -{{- end }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -{{- if $ingress.harbor.annotations }} -{{ toYaml $ingress.harbor.annotations | indent 4 }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsCoreSecretForIngress" . }} - {{- if $ingress.hosts.core }} - hosts: - - {{ $ingress.hosts.core }} - {{- end }} - {{- end }} - rules: - - http: - paths: -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - - path: {{ .api_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - backend: - serviceName: {{ template "harbor.portal" . }} - servicePort: {{ template "harbor.portal.servicePort" . }} -{{- else }} - - path: {{ .api_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.portal" . }} - port: - number: {{ template "harbor.portal.servicePort" . }} -{{- end }} - {{- if $ingress.hosts.core }} - host: {{ $ingress.hosts.core }} - {{- end }} - -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/ingress/secret.yaml b/charts/harbor/harbor/1.14.1/templates/ingress/secret.yaml deleted file mode 100644 index 41507b3dd9..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/ingress/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForIngress" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cert := genSignedCert .Values.expose.ingress.hosts.core nil (list .Values.expose.ingress.hosts.core) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/internal/auto-tls.yaml b/charts/harbor/harbor/1.14.1/templates/internal/auto-tls.yaml deleted file mode 100644 index da5f5e2c7b..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/internal/auto-tls.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} -{{- $ca := genCA "harbor-internal-ca" 365 }} -{{- $coreCN := (include "harbor.core" .) }} -{{- $coreCrt := genSignedCert $coreCN (list "127.0.0.1") (list "localhost" $coreCN) 365 $ca }} -{{- $jsCN := (include "harbor.jobservice" .) }} -{{- $jsCrt := genSignedCert $jsCN nil (list $jsCN) 365 $ca }} -{{- $regCN := (include "harbor.registry" .) }} -{{- $regCrt := genSignedCert $regCN nil (list $regCN) 365 $ca }} -{{- $portalCN := (include "harbor.portal" .) }} -{{- $portalCrt := genSignedCert $portalCN nil (list $portalCN) 365 $ca }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $coreCrt.Cert | b64enc | quote }} - tls.key: {{ $coreCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $jsCrt.Cert | b64enc | quote }} - tls.key: {{ $jsCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $regCrt.Cert | b64enc | quote }} - tls.key: {{ $regCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $portalCrt.Cert | b64enc | quote }} - tls.key: {{ $portalCrt.Key | b64enc | quote }} - -{{- if and .Values.trivy.enabled}} ---- -{{- $trivyCN := (include "harbor.trivy" .) }} -{{- $trivyCrt := genSignedCert $trivyCN nil (list $trivyCN) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $trivyCrt.Cert | b64enc | quote }} - tls.key: {{ $trivyCrt.Key | b64enc | quote }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-cm-env.yaml b/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-cm-env.yaml deleted file mode 100644 index 8411c7a47c..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-cm-env.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - CORE_URL: "{{ template "harbor.coreURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - - JOBSERVICE_WEBHOOK_JOB_MAX_RETRY: "{{ .Values.jobservice.notification.webhook_job_max_retry }}" - JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT: "{{ .Values.jobservice.notification.webhook_job_http_client_timeout }}" - - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.metrics.enabled}} - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: jobservice - {{- end }} - {{- template "harbor.traceEnvsForJobservice" . }} - {{- if .Values.cache.enabled }} - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-cm.yaml b/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-cm.yaml deleted file mode 100644 index 8211c62209..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-cm.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - #Server listening port - protocol: "{{ template "harbor.component.scheme" . }}" - port: {{ template "harbor.jobservice.containerPort". }} - {{- if .Values.internalTLS.enabled }} - https_config: - cert: "/etc/harbor/ssl/jobservice/tls.crt" - key: "/etc/harbor/ssl/jobservice/tls.key" - {{- end }} - worker_pool: - workers: {{ .Values.jobservice.maxJobWorkers }} - backend: "redis" - redis_pool: - redis_url: "{{ template "harbor.redis.urlForJobservice" . }}" - namespace: "harbor_job_service_namespace" - idle_timeout_second: 3600 - job_loggers: - {{- if has "file" .Values.jobservice.jobLoggers }} - - name: "FILE" - level: {{ .Values.logLevel | upper }} - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - {{- end }} - {{- if has "database" .Values.jobservice.jobLoggers }} - - name: "DB" - level: {{ .Values.logLevel | upper }} - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - {{- end }} - {{- if has "stdout" .Values.jobservice.jobLoggers }} - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - {{- end }} - metric: - enabled: {{ .Values.metrics.enabled }} - path: {{ .Values.metrics.jobservice.path }} - port: {{ .Values.metrics.jobservice.port }} - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: {{ .Values.jobservice.reaper.max_update_hours }} - # the max time for execution in running state without new task created - max_dangling_hours: {{ .Values.jobservice.reaper.max_dangling_hours }} diff --git a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-dpl.yaml b/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-dpl.yaml deleted file mode 100644 index e39e77e6ed..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-dpl.yaml +++ /dev/null @@ -1,173 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - replicas: {{ .Values.jobservice.replicas }} - revisionHistoryLimit: {{ .Values.jobservice.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: jobservice -{{- if .Values.jobservice.podLabels }} -{{ toYaml .Values.jobservice.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} - checksum/configmap-env: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/jobservice/jobservice-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.jobservice.podAnnotations }} -{{ toYaml .Values.jobservice.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.jobservice.serviceAccountName }} - serviceAccountName: {{ .Values.jobservice.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.jobservice.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: jobservice -{{- end }} -{{- end }} - containers: - - name: jobservice - image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.jobservice.resources }} - resources: -{{ toYaml .Values.jobservice.resources | indent 10 }} -{{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - {{- if .Values.jobservice.existingSecret }} - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/jobservice/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/jobservice/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/jobservice/ca.crt - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} -{{- with .Values.jobservice.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.jobservice" . }}-env" - - secretRef: - name: "{{ template "harbor.jobservice" . }}" - ports: - - containerPort: {{ template "harbor.jobservice.containerPort" . }} - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.subPath }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - mountPath: /etc/harbor/ssl/jobservice - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: jobservice-config - configMap: - name: "{{ template "harbor.jobservice" . }}" - - name: job-logs - {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLoggers) }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim | default (include "harbor.jobservice" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.jobservice.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.jobservice.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.jobservice.priorityClassName }} - priorityClassName: {{ .Values.jobservice.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-pvc.yaml b/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-pvc.yaml deleted file mode 100644 index a6b8b8bd38..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-pvc.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- $jobLog := .Values.persistence.persistentVolumeClaim.jobservice.jobLog -}} -{{- if and .Values.persistence.enabled (not $jobLog.existingClaim) (has "file" .Values.jobservice.jobLoggers) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.jobservice" . }} - annotations: - {{- range $key, $value := $jobLog.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - accessModes: - - {{ $jobLog.accessMode }} - resources: - requests: - storage: {{ $jobLog.size }} - {{- if $jobLog.storageClass }} - {{- if eq "-" $jobLog.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $jobLog.storageClass }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-secrets.yaml b/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-secrets.yaml deleted file mode 100644 index eeb00bde00..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-secrets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.jobservice" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.jobservice.existingSecret }} - JOBSERVICE_SECRET: {{ .Values.jobservice.secret | default (include "harbor.secretKeyHelper" (dict "key" "JOBSERVICE_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-svc.yaml b/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-svc.yaml deleted file mode 100644 index d2b7a47fd4..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-svc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }} - port: {{ template "harbor.jobservice.servicePort" . }} - targetPort: {{ template "harbor.jobservice.containerPort" . }} -{{- if .Values.metrics.enabled }} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.jobservice.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice diff --git a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-tls.yaml b/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-tls.yaml deleted file mode 100644 index 234cb39995..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/jobservice/jobservice-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.jobservice.crt\" is required!" .Values.internalTLS.jobservice.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.jobservice.key\" is required!" .Values.internalTLS.jobservice.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/metrics/metrics-svcmon.yaml b/charts/harbor/harbor/1.14.1/templates/metrics/metrics-svcmon.yaml deleted file mode 100644 index 1122ef01ef..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/metrics/metrics-svcmon.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "harbor.fullname" . }} - labels: {{ include "harbor.labels" . | nindent 4 }} -{{- if .Values.metrics.serviceMonitor.additionalLabels }} -{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} -{{- end }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: {{ template "harbor.metricsPortName" . }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - honorLabels: true -{{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.metrics.serviceMonitor.relabelings | indent 4 }} -{{- end }} - selector: - matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/nginx/configmap-http.yaml b/charts/harbor/harbor/1.14.1/templates/nginx/configmap-http.yaml deleted file mode 100644 index c4b8354d06..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/nginx/configmap-http.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server {{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled}} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end }} - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - proxy_send_timeout 900; - proxy_read_timeout 900; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/nginx/configmap-https.yaml b/charts/harbor/harbor/1.14.1/templates/nginx/configmap-https.yaml deleted file mode 100644 index 56c943a619..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/nginx/configmap-https.yaml +++ /dev/null @@ -1,187 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server "{{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}"; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8443 ssl; - {{- end }} - # server_name harbordomain.com; - server_tokens off; - # SSL - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - # Add extra headers - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; HttpOnly; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end}} - #server_name harbordomain.com; - return 301 https://$host$request_uri; - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/nginx/deployment.yaml b/charts/harbor/harbor/1.14.1/templates/nginx/deployment.yaml deleted file mode 100644 index 8290d497b6..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/nginx/deployment.yaml +++ /dev/null @@ -1,126 +0,0 @@ -{{- if ne .Values.expose.type "ingress" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: nginx -spec: - replicas: {{ .Values.nginx.replicas }} - revisionHistoryLimit: {{ .Values.nginx.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: nginx - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: nginx -{{- if .Values.nginx.podLabels }} -{{ toYaml .Values.nginx.podLabels | indent 8 }} -{{- end }} - annotations: - {{- if not .Values.expose.tls.enabled }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} - {{- else }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-https.yaml") . | sha256sum }} - {{- end }} - {{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} - checksum/secret: {{ include (print $.Template.BasePath "/nginx/secret.yaml") . | sha256sum }} - {{- end }} -{{- if .Values.nginx.podAnnotations }} -{{ toYaml .Values.nginx.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- if .Values.nginx.serviceAccountName }} - serviceAccountName: {{ .Values.nginx.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.nginx.automountServiceAccountToken | default false }} -{{- with .Values.nginx.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: nginx -{{- end }} -{{- end }} - containers: - - name: nginx - image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - {{- $_ := set . "scheme" "HTTP" -}} - {{- $_ := set . "port" "8080" -}} - {{- if .Values.expose.tls.enabled }} - {{- $_ := set . "scheme" "HTTPS" -}} - {{- $_ := set . "port" "8443" -}} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.nginx.resources }} - resources: -{{ toYaml .Values.nginx.resources | indent 10 }} -{{- end }} -{{- with .Values.nginx.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: 8080 - - containerPort: 8443 - - containerPort: 4443 - volumeMounts: - - name: config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.expose.tls.enabled }} - - name: certificate - mountPath: /etc/nginx/cert - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.nginx" . }} - {{- if .Values.expose.tls.enabled }} - - name: certificate - secret: - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- with .Values.nginx.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nginx.priorityClassName }} - priorityClassName: {{ .Values.nginx.priorityClassName }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/nginx/secret.yaml b/charts/harbor/harbor/1.14.1/templates/nginx/secret.yaml deleted file mode 100644 index c819c556d9..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/nginx/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cn := (required "The \"expose.tls.auto.commonName\" is required!" .Values.expose.tls.auto.commonName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if regexMatch `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` $cn }} - {{- $cert := genSignedCert $cn (list $cn) nil 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- else }} - {{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/nginx/service.yaml b/charts/harbor/harbor/1.14.1/templates/nginx/service.yaml deleted file mode 100644 index 205a805ea4..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/nginx/service.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }} -apiVersion: v1 -kind: Service -metadata: -{{- if eq .Values.expose.type "clusterIP" }} -{{- $clusterIP := .Values.expose.clusterIP }} - name: {{ $clusterIP.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $clusterIP.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: ClusterIP - {{- if .Values.expose.clusterIP.staticClusterIP }} - clusterIP: {{ .Values.expose.clusterIP.staticClusterIP }} - {{- end }} - ports: - - name: http - port: {{ $clusterIP.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $clusterIP.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- else if eq .Values.expose.type "nodePort" }} -{{- $nodePort := .Values.expose.nodePort }} - name: {{ $nodePort.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - type: NodePort - ports: - - name: http - port: {{ $nodePort.ports.http.port }} - targetPort: 8080 - {{- if $nodePort.ports.http.nodePort }} - nodePort: {{ $nodePort.ports.http.nodePort }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $nodePort.ports.https.port }} - targetPort: 8443 - {{- if $nodePort.ports.https.nodePort }} - nodePort: {{ $nodePort.ports.https.nodePort }} - {{- end }} - {{- end }} -{{- else if eq .Values.expose.type "loadBalancer" }} -{{- $loadBalancer := .Values.expose.loadBalancer }} - name: {{ $loadBalancer.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $loadBalancer.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: LoadBalancer - {{- with $loadBalancer.sourceRanges }} - loadBalancerSourceRanges: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $loadBalancer.IP }} - loadBalancerIP: {{ $loadBalancer.IP }} - {{- end }} - ports: - - name: http - port: {{ $loadBalancer.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $loadBalancer.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: nginx -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/portal/configmap.yaml b/charts/harbor/harbor/1.14.1/templates/portal/configmap.yaml deleted file mode 100644 index 7b2118e721..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/portal/configmap.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - events { - worker_connections 1024; - } - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - {{- if .Values.internalTLS.enabled }} - {{- if .Values.ipFamily.ipv4.enabled}} - listen {{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - # SSL - ssl_certificate /etc/harbor/ssl/portal/tls.crt; - ssl_certificate_key /etc/harbor/ssl/portal/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - {{- else }} - {{- if .Values.ipFamily.ipv4.enabled }} - listen {{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- end }} - server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location /devcenter-api-2.0 { - try_files $uri $uri/ /swagger-ui-index.html; - } - location / { - try_files $uri $uri/ /index.html; - } - location = /index.html { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - } - } diff --git a/charts/harbor/harbor/1.14.1/templates/portal/deployment.yaml b/charts/harbor/harbor/1.14.1/templates/portal/deployment.yaml deleted file mode 100644 index 959a3fd7b5..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/portal/deployment.yaml +++ /dev/null @@ -1,114 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: portal -spec: - replicas: {{ .Values.portal.replicas }} - revisionHistoryLimit: {{ .Values.portal.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: portal - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: portal -{{- if .Values.portal.podLabels }} -{{ toYaml .Values.portal.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} -{{- end }} - checksum/configmap: {{ include (print $.Template.BasePath "/portal/configmap.yaml") . | sha256sum }} -{{- if .Values.portal.podAnnotations }} -{{ toYaml .Values.portal.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- if .Values.portal.serviceAccountName }} - serviceAccountName: {{ .Values.portal.serviceAccountName }} -{{- end }} - automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }} -{{- with .Values.portal.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: portal -{{- end }} -{{- end }} - containers: - - name: portal - image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} -{{- if .Values.portal.resources }} - resources: -{{ toYaml .Values.portal.resources | indent 10 }} -{{- end }} -{{- with .Values.portal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: {{ template "harbor.portal.containerPort" . }} - volumeMounts: - - name: portal-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - mountPath: /etc/harbor/ssl/portal - {{- end }} - volumes: - - name: portal-config - configMap: - name: "{{ template "harbor.portal" . }}" - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.portal.secretName" . }} - {{- end }} - {{- with .Values.portal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.portal.priorityClassName }} - priorityClassName: {{ .Values.portal.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/portal/service.yaml b/charts/harbor/harbor/1.14.1/templates/portal/service.yaml deleted file mode 100644 index d00026da46..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/portal/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.portal.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: {{ template "harbor.portal.servicePort" . }} - targetPort: {{ template "harbor.portal.containerPort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: portal diff --git a/charts/harbor/harbor/1.14.1/templates/portal/tls.yaml b/charts/harbor/harbor/1.14.1/templates/portal/tls.yaml deleted file mode 100644 index de63f4e813..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/portal/tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.portal.crt\" is required!" .Values.internalTLS.portal.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.portal.key\" is required!" .Values.internalTLS.portal.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/redis/service.yaml b/charts/harbor/harbor/1.14.1/templates/redis/service.yaml deleted file mode 100644 index 79c95c3e05..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/redis/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 6379 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: redis -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/redis/statefulset.yaml b/charts/harbor/harbor/1.14.1/templates/redis/statefulset.yaml deleted file mode 100644 index 371b0fd5aa..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/redis/statefulset.yaml +++ /dev/null @@ -1,116 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -{{- $redis := .Values.persistence.persistentVolumeClaim.redis -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: redis -spec: - replicas: 1 - serviceName: {{ template "harbor.redis" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: redis - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: redis -{{- if .Values.redis.podLabels }} -{{ toYaml .Values.redis.podLabels | indent 8 }} -{{- end }} -{{- if .Values.redis.podAnnotations }} - annotations: -{{ toYaml .Values.redis.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.redis.internal.serviceAccountName }} - serviceAccountName: {{ .Values.redis.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.redis.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: redis - image: {{ .Values.redis.internal.image.repository }}:{{ .Values.redis.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.redis.internal.resources }} - resources: -{{ toYaml .Values.redis.internal.resources | indent 10 }} -{{- end }} -{{- with .Values.redis.internal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: {{ $redis.subPath }} - {{- if not .Values.persistence.enabled }} - volumes: - - name: data - emptyDir: {} - {{- else if $redis.existingClaim }} - volumes: - - name: data - persistentVolumeClaim: - claimName: {{ $redis.existingClaim }} - {{- end -}} - {{- with .Values.redis.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.redis.internal.priorityClassName }} - priorityClassName: {{ .Values.redis.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $redis.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $redis.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $redis.accessMode | quote }}] - {{- if $redis.storageClass }} - {{- if (eq "-" $redis.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $redis.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $redis.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.14.1/templates/registry/registry-cm.yaml b/charts/harbor/harbor/1.14.1/templates/registry/registry-cm.yaml deleted file mode 100644 index 4f7056c384..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/registry/registry-cm.yaml +++ /dev/null @@ -1,246 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - version: 0.1 - log: - {{- if eq .Values.logLevel "warning" }} - level: warn - {{- else if eq .Values.logLevel "fatal" }} - level: error - {{- else }} - level: {{ .Values.logLevel }} - {{- end }} - fields: - service: registry - storage: - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if eq $type "filesystem" }} - filesystem: - rootdirectory: {{ $storage.filesystem.rootdirectory }} - {{- if $storage.filesystem.maxthreads }} - maxthreads: {{ $storage.filesystem.maxthreads }} - {{- end }} - {{- else if eq $type "azure" }} - azure: - accountname: {{ $storage.azure.accountname }} - container: {{ $storage.azure.container }} - {{- if $storage.azure.realm }} - realm: {{ $storage.azure.realm }} - {{- end }} - {{- else if eq $type "gcs" }} - gcs: - bucket: {{ $storage.gcs.bucket }} - {{- if not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity }} - keyfile: /etc/registry/gcs-key.json - {{- end }} - {{- if $storage.gcs.rootdirectory }} - rootdirectory: {{ $storage.gcs.rootdirectory }} - {{- end }} - {{- if $storage.gcs.chunksize }} - chunksize: {{ $storage.gcs.chunksize }} - {{- end }} - {{- else if eq $type "s3" }} - s3: - region: {{ $storage.s3.region }} - bucket: {{ $storage.s3.bucket }} - {{- if $storage.s3.regionendpoint }} - regionendpoint: {{ $storage.s3.regionendpoint }} - {{- end }} - {{- if $storage.s3.encrypt }} - encrypt: {{ $storage.s3.encrypt }} - {{- end }} - {{- if $storage.s3.keyid }} - keyid: {{ $storage.s3.keyid }} - {{- end }} - {{- if $storage.s3.secure }} - secure: {{ $storage.s3.secure }} - {{- end }} - {{- if and $storage.s3.secure $storage.s3.skipverify }} - skipverify: {{ $storage.s3.skipverify }} - {{- end }} - {{- if $storage.s3.v4auth }} - v4auth: {{ $storage.s3.v4auth }} - {{- end }} - {{- if $storage.s3.chunksize }} - chunksize: {{ $storage.s3.chunksize }} - {{- end }} - {{- if $storage.s3.rootdirectory }} - rootdirectory: {{ $storage.s3.rootdirectory }} - {{- end }} - {{- if $storage.s3.storageclass }} - storageclass: {{ $storage.s3.storageclass }} - {{- end }} - {{- if $storage.s3.multipartcopychunksize }} - multipartcopychunksize: {{ $storage.s3.multipartcopychunksize }} - {{- end }} - {{- if $storage.s3.multipartcopymaxconcurrency }} - multipartcopymaxconcurrency: {{ $storage.s3.multipartcopymaxconcurrency }} - {{- end }} - {{- if $storage.s3.multipartcopythresholdsize }} - multipartcopythresholdsize: {{ $storage.s3.multipartcopythresholdsize }} - {{- end }} - {{- else if eq $type "swift" }} - swift: - authurl: {{ $storage.swift.authurl }} - username: {{ $storage.swift.username }} - container: {{ $storage.swift.container }} - {{- if $storage.swift.region }} - region: {{ $storage.swift.region }} - {{- end }} - {{- if $storage.swift.tenant }} - tenant: {{ $storage.swift.tenant }} - {{- end }} - {{- if $storage.swift.tenantid }} - tenantid: {{ $storage.swift.tenantid }} - {{- end }} - {{- if $storage.swift.domain }} - domain: {{ $storage.swift.domain }} - {{- end }} - {{- if $storage.swift.domainid }} - domainid: {{ $storage.swift.domainid }} - {{- end }} - {{- if $storage.swift.trustid }} - trustid: {{ $storage.swift.trustid }} - {{- end }} - {{- if $storage.swift.insecureskipverify }} - insecureskipverify: {{ $storage.swift.insecureskipverify }} - {{- end }} - {{- if $storage.swift.chunksize }} - chunksize: {{ $storage.swift.chunksize }} - {{- end }} - {{- if $storage.swift.prefix }} - prefix: {{ $storage.swift.prefix }} - {{- end }} - {{- if $storage.swift.authversion }} - authversion: {{ $storage.swift.authversion }} - {{- end }} - {{- if $storage.swift.endpointtype }} - endpointtype: {{ $storage.swift.endpointtype }} - {{- end }} - {{- if $storage.swift.tempurlcontainerkey }} - tempurlcontainerkey: {{ $storage.swift.tempurlcontainerkey }} - {{- end }} - {{- if $storage.swift.tempurlmethods }} - tempurlmethods: {{ $storage.swift.tempurlmethods }} - {{- end }} - {{- else if eq $type "oss" }} - oss: - accesskeyid: {{ $storage.oss.accesskeyid }} - region: {{ $storage.oss.region }} - bucket: {{ $storage.oss.bucket }} - {{- if $storage.oss.endpoint }} - endpoint: {{ $storage.oss.bucket }}.{{ $storage.oss.endpoint }} - {{- end }} - {{- if $storage.oss.internal }} - internal: {{ $storage.oss.internal }} - {{- end }} - {{- if $storage.oss.encrypt }} - encrypt: {{ $storage.oss.encrypt }} - {{- end }} - {{- if $storage.oss.secure }} - secure: {{ $storage.oss.secure }} - {{- end }} - {{- if $storage.oss.chunksize }} - chunksize: {{ $storage.oss.chunksize }} - {{- end }} - {{- if $storage.oss.rootdirectory }} - rootdirectory: {{ $storage.oss.rootdirectory }} - {{- end }} - {{- end }} - cache: - layerinfo: redis - maintenance: - uploadpurging: - {{- if .Values.registry.upload_purging.enabled }} - enabled: true - age: {{ .Values.registry.upload_purging.age }} - interval: {{ .Values.registry.upload_purging.interval }} - dryrun: {{ .Values.registry.upload_purging.dryrun }} - {{- else }} - enabled: false - {{- end }} - delete: - enabled: true - redirect: - disable: {{ $storage.disableredirect }} - redis: - addr: {{ template "harbor.redis.addr" . }} - {{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }} - sentinelMasterSet: {{ template "harbor.redis.masterSet" . }} - {{- end }} - db: {{ template "harbor.redis.dbForRegistry" . }} - {{- if not (eq (include "harbor.redis.password" .) "") }} - password: {{ template "harbor.redis.password" . }} - {{- end }} - readtimeout: 10s - writetimeout: 10s - dialtimeout: 10s - pool: - maxidle: 100 - maxactive: 500 - idletimeout: 60s - http: - addr: :{{ template "harbor.registry.containerPort" . }} - relativeurls: {{ .Values.registry.relativeurls }} - {{- if .Values.internalTLS.enabled }} - tls: - certificate: /etc/harbor/ssl/registry/tls.crt - key: /etc/harbor/ssl/registry/tls.key - minimumtls: tls1.2 - {{- end }} - # set via environment variable - # secret: placeholder - debug: - {{- if .Values.metrics.enabled}} - addr: :{{ .Values.metrics.registry.port }} - prometheus: - enabled: true - path: {{ .Values.metrics.registry.path }} - {{- else }} - addr: localhost:5001 - {{- end }} - auth: - htpasswd: - realm: harbor-registry-basic-realm - path: /etc/registry/passwd - validation: - disabled: true - compatibility: - schema1: - enabled: true - - {{- if .Values.registry.middleware.enabled }} - {{- $middleware := .Values.registry.middleware }} - {{- $middlewareType := $middleware.type }} - {{- if eq $middlewareType "cloudFront" }} - middleware: - storage: - - name: cloudfront - options: - baseurl: {{ $middleware.cloudFront.baseurl }} - privatekey: /etc/registry/pk.pem - keypairid: {{ $middleware.cloudFront.keypairid }} - duration: {{ $middleware.cloudFront.duration }} - ipfilteredby: {{ $middleware.cloudFront.ipfilteredby }} - {{- end }} - {{- end }} - ctl-config.yml: |+ - --- - {{- if .Values.internalTLS.enabled }} - protocol: "https" - port: 8443 - https_config: - cert: "/etc/harbor/ssl/registry/tls.crt" - key: "/etc/harbor/ssl/registry/tls.key" - {{- else }} - protocol: "http" - port: 8080 - {{- end }} - log_level: {{ .Values.logLevel }} - registry_config: "/etc/registry/config.yml" diff --git a/charts/harbor/harbor/1.14.1/templates/registry/registry-dpl.yaml b/charts/harbor/harbor/1.14.1/templates/registry/registry-dpl.yaml deleted file mode 100644 index dc4a833477..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/registry/registry-dpl.yaml +++ /dev/null @@ -1,419 +0,0 @@ -{{- $storage := .Values.persistence.imageChartStorage }} -{{- $type := $storage.type }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - replicas: {{ .Values.registry.replicas }} - revisionHistoryLimit: {{ .Values.registry.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: registry - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: registry -{{- if .Values.registry.podLabels }} -{{ toYaml .Values.registry.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/registry/registry-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.registry.podAnnotations }} -{{ toYaml .Values.registry.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - fsGroupChangePolicy: OnRootMismatch -{{- if .Values.registry.serviceAccountName }} - serviceAccountName: {{ .Values.registry.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.registry.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: registry -{{- end }} -{{- end }} - containers: - - name: registry - image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.registry.resources }} - resources: -{{ toYaml .Values.registry.registry.resources | indent 10 }} -{{- end }} - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: "{{ template "harbor.registry" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.registry.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registry.containerPort" . }} - - containerPort: 5001 - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-htpasswd - mountPath: /etc/registry/passwd - subPath: passwd - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - mountPath: /etc/registry/pk.pem - subPath: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - - name: registryctl - image: {{ .Values.registry.controller.image.repository }}:{{ .Values.registry.controller.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.controller.resources }} - resources: -{{ toYaml .Values.registry.controller.resources | indent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.registryCtl" . }}" - - secretRef: - name: "{{ template "harbor.registry" . }}" - - secretRef: - name: "{{ template "harbor.registryCtl" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.controller.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registryctl.containerPort" . }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: registry-htpasswd - secret: - {{- if not .Values.registry.credentials.existingSecret }} - secretName: {{ template "harbor.registry" . }}-htpasswd - {{ else }} - secretName: {{ .Values.registry.credentials.existingSecret }} - {{- end }} - items: - - key: REGISTRY_HTPASSWD - path: passwd - - name: registry-config - configMap: - name: "{{ template "harbor.registry" . }}" - - name: registry-data - {{- if and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "filesystem") }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.registry.existingClaim | default (include "harbor.registry" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.registry.secretName" . }} - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - secret: - {{- if and (eq $type "gcs") $storage.gcs.existingSecret }} - secretName: {{ $storage.gcs.existingSecret }} - {{- else }} - secretName: {{ template "harbor.registry" . }} - {{- end }} - items: - - key: GCS_KEY_DATA - path: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - secret: - secretName: {{ .Values.persistence.imageChartStorage.caBundleSecretName }} - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - secret: - secretName: {{ .Values.registry.middleware.cloudFront.privateKeySecret }} - items: - - key: CLOUDFRONT_KEY_DATA - path: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.registry.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.registry.priorityClassName }} - priorityClassName: {{ .Values.registry.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/registry/registry-pvc.yaml b/charts/harbor/harbor/1.14.1/templates/registry/registry-pvc.yaml deleted file mode 100644 index 2112e22877..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/registry/registry-pvc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.persistence.enabled }} -{{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} -{{- if and (not $registry.existingClaim) (eq .Values.persistence.imageChartStorage.type "filesystem") }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.registry" . }} - annotations: - {{- range $key, $value := $registry.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - accessModes: - - {{ $registry.accessMode }} - resources: - requests: - storage: {{ $registry.size }} - {{- if $registry.storageClass }} - {{- if eq "-" $registry.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $registry.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/registry/registry-secret.yaml b/charts/harbor/harbor/1.14.1/templates/registry/registry-secret.yaml deleted file mode 100644 index e853a9cbec..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/registry/registry-secret.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.registry" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.registry.existingSecret }} - REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (include "harbor.secretKeyHelper" (dict "key" "REGISTRY_HTTP_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.redis.external.existingSecret }} - REGISTRY_REDIS_PASSWORD: {{ include "harbor.redis.password" . | b64enc | quote }} - {{- end }} - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if and (eq $type "azure") (not $storage.azure.existingSecret) }} - REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }} - {{- else if and (and (eq $type "gcs") (not $storage.gcs.existingSecret)) (not $storage.gcs.useWorkloadIdentity) }} - GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }} - {{- else if eq $type "s3" }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.accesskey) }} - REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }} - {{- end }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.secretkey) }} - REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "swift") (not ($storage.swift.existingSecret)) }} - REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }} - {{- if $storage.swift.secretkey }} - REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }} - {{- end }} - {{- if $storage.swift.accesskey }} - REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "oss") ((not ($storage.oss.existingSecret))) }} - REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }} - {{- end }} -{{- if not .Values.registry.credentials.existingSecret }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}-htpasswd" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if .Values.registry.credentials.htpasswdString }} - REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswdString | b64enc | quote }} - {{- else }} - REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/registry/registry-svc.yaml b/charts/harbor/harbor/1.14.1/templates/registry/registry-svc.yaml deleted file mode 100644 index 749690ea03..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/registry/registry-svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }} - port: {{ template "harbor.registry.servicePort" . }} - - - name: {{ ternary "https-controller" "http-controller" .Values.internalTLS.enabled }} - port: {{ template "harbor.registryctl.servicePort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.registry.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/registry/registry-tls.yaml b/charts/harbor/harbor/1.14.1/templates/registry/registry-tls.yaml deleted file mode 100644 index 9d1862c417..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/registry/registry-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.registry.crt\" is required!" .Values.internalTLS.registry.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.registry.key\" is required!" .Values.internalTLS.registry.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/registry/registryctl-cm.yaml b/charts/harbor/harbor/1.14.1/templates/registry/registryctl-cm.yaml deleted file mode 100644 index 87aa5ffe24..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/registry/registryctl-cm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- template "harbor.traceEnvsForRegistryCtl" . }} diff --git a/charts/harbor/harbor/1.14.1/templates/registry/registryctl-secret.yaml b/charts/harbor/harbor/1.14.1/templates/registry/registryctl-secret.yaml deleted file mode 100644 index 70097703e9..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/registry/registryctl-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- template "harbor.traceJaegerPassword" . }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.1/templates/trivy/trivy-secret.yaml b/charts/harbor/harbor/1.14.1/templates/trivy/trivy-secret.yaml deleted file mode 100644 index 84652c7498..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/trivy/trivy-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.trivy.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - redisURL: {{ include "harbor.redis.urlForTrivy" . | b64enc }} - gitHubToken: {{ .Values.trivy.gitHubToken | default "" | b64enc | quote }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/trivy/trivy-sts.yaml b/charts/harbor/harbor/1.14.1/templates/trivy/trivy-sts.yaml deleted file mode 100644 index 7ee4e1068f..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/trivy/trivy-sts.yaml +++ /dev/null @@ -1,224 +0,0 @@ -{{- if .Values.trivy.enabled }} -{{- $trivy := .Values.persistence.persistentVolumeClaim.trivy }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: trivy -spec: - replicas: {{ .Values.trivy.replicas }} - serviceName: {{ template "harbor.trivy" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: trivy - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: trivy -{{- if .Values.trivy.podLabels }} -{{ toYaml .Values.trivy.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/trivy/trivy-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/trivy/trivy-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.trivy.podAnnotations }} -{{ toYaml .Values.trivy.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} -{{- end }} -{{- if .Values.trivy.serviceAccountName }} - serviceAccountName: {{ .Values.trivy.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }} -{{- with .Values.trivy.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: trivy -{{- end }} -{{- end }} - containers: - - name: trivy - image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - securityContext: - privileged: false - allowPrivilegeEscalation: false - env: - {{- if has "trivy" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - - name: "SCANNER_LOG_LEVEL" - value: {{ .Values.logLevel | quote }} - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: {{ .Values.trivy.debugMode | quote }} - - name: "SCANNER_TRIVY_VULN_TYPE" - value: {{ .Values.trivy.vulnType | quote }} - - name: "SCANNER_TRIVY_TIMEOUT" - value: {{ .Values.trivy.timeout | quote }} - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: {{ .Values.trivy.severity | quote }} - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: {{ .Values.trivy.ignoreUnfixed | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: {{ .Values.trivy.skipUpdate | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_JAVA_DB_UPDATE" - value: {{ .Values.trivy.skipJavaDBUpdate | default false | quote }} - - name: "SCANNER_TRIVY_OFFLINE_SCAN" - value: {{ .Values.trivy.offlineScan | default false | quote }} - - name: "SCANNER_TRIVY_SECURITY_CHECKS" - value: {{ .Values.trivy.securityCheck | quote }} - - name: "SCANNER_TRIVY_INSECURE" - value: {{ .Values.trivy.insecure | default false | quote }} - - name: SCANNER_API_SERVER_ADDR - value: ":{{ template "harbor.trivy.containerPort" . }}" - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: SCANNER_API_SERVER_TLS_KEY - value: /etc/harbor/ssl/trivy/tls.key - - name: SCANNER_API_SERVER_TLS_CERTIFICATE - value: /etc/harbor/ssl/trivy/tls.crt - {{- end }} - - name: "SCANNER_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL -{{- with .Values.trivy.extraEnvVars }} -{{- toYaml . | nindent 12 }} -{{- end }} - ports: - - name: api-server - containerPort: {{ template "harbor.trivy.containerPort" . }} - volumeMounts: - - name: data - mountPath: /home/scanner/.cache - subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} - readOnly: false - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - mountPath: /etc/harbor/ssl/trivy - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 10 }} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: -{{ toYaml .Values.trivy.resources | indent 12 }} - {{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }} - volumes: - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.trivy.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- if not .Values.persistence.enabled }} - - name: "data" - emptyDir: {} - {{- else if $trivy.existingClaim }} - - name: "data" - persistentVolumeClaim: - claimName: {{ $trivy.existingClaim }} - {{- end }} - {{- end }} - {{- with .Values.trivy.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.trivy.priorityClassName }} - priorityClassName: {{ .Values.trivy.priorityClassName }} - {{- end }} -{{- if and .Values.persistence.enabled (not $trivy.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $trivy.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $trivy.accessMode | quote }}] - {{- if $trivy.storageClass }} - {{- if (eq "-" $trivy.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $trivy.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $trivy.size | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/templates/trivy/trivy-svc.yaml b/charts/harbor/harbor/1.14.1/templates/trivy/trivy-svc.yaml deleted file mode 100644 index 24daf094e8..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/trivy/trivy-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{ if .Values.trivy.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.trivy" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-trivy" "http-trivy" .Values.internalTLS.enabled }} - protocol: TCP - port: {{ template "harbor.trivy.servicePort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: trivy -{{ end }} diff --git a/charts/harbor/harbor/1.14.1/templates/trivy/trivy-tls.yaml b/charts/harbor/harbor/1.14.1/templates/trivy/trivy-tls.yaml deleted file mode 100644 index a9c8330c37..0000000000 --- a/charts/harbor/harbor/1.14.1/templates/trivy/trivy-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.trivy.enabled .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.trivy.crt\" is required!" .Values.internalTLS.trivy.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.trivy.key\" is required!" .Values.internalTLS.trivy.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.1/values.yaml b/charts/harbor/harbor/1.14.1/values.yaml deleted file mode 100644 index 49e9d458d6..0000000000 --- a/charts/harbor/harbor/1.14.1/values.yaml +++ /dev/null @@ -1,992 +0,0 @@ -expose: - # Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" - # and fill the information in the corresponding section - type: ingress - tls: - # Enable TLS or not. - # Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" - # Note: if the "expose.type" is "ingress" and TLS is disabled, - # the port must be included in the command when pulling/pushing images. - # Refer to https://github.com/goharbor/harbor/issues/5291 for details. - enabled: true - # The source of the tls certificate. Set as "auto", "secret" - # or "none" and fill the information in the corresponding section - # 1) auto: generate the tls certificate automatically - # 2) secret: read the tls certificate from the specified secret. - # The tls certificate can be generated manually or by cert manager - # 3) none: configure no tls certificate for the ingress. If the default - # tls certificate is configured in the ingress controller, choose this option - certSource: auto - auto: - # The common name used to generate the certificate, it's necessary - # when the type isn't "ingress" - commonName: "" - secret: - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - secretName: "" - ingress: - hosts: - core: core.harbor.domain - # set to the type of ingress controller if it has specific requirements. - # leave as `default` for most ingress controllers. - # set to `gce` if using the GCE ingress controller - # set to `ncp` if using the NCP (NSX-T Container Plugin) ingress controller - # set to `alb` if using the ALB ingress controller - # set to `f5-bigip` if using the F5 BIG-IP ingress controller - controller: default - ## Allow .Capabilities.KubeVersion.Version to be overridden while creating ingress - kubeVersionOverride: "" - className: "" - annotations: - # note different ingress controllers may require a different ssl-redirect annotation - # for Envoy, use ingress.kubernetes.io/force-ssl-redirect: "true" and remove the nginx lines below - ingress.kubernetes.io/ssl-redirect: "true" - ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - harbor: - # harbor ingress-specific annotations - annotations: {} - # harbor ingress-specific labels - labels: {} - clusterIP: - # The name of ClusterIP service - name: harbor - # The ip address of the ClusterIP service (leave empty for acquiring dynamic ip) - staticClusterIP: "" - # Annotations on the ClusterIP service - annotations: {} - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - nodePort: - # The name of NodePort service - name: harbor - ports: - http: - # The service port Harbor listens on when serving HTTP - port: 80 - # The node port Harbor listens on when serving HTTP - nodePort: 30002 - https: - # The service port Harbor listens on when serving HTTPS - port: 443 - # The node port Harbor listens on when serving HTTPS - nodePort: 30003 - loadBalancer: - # The name of LoadBalancer service - name: harbor - # Set the IP if the LoadBalancer supports assigning IP - IP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - annotations: {} - sourceRanges: [] - -# The external URL for Harbor core service. It is used to -# 1) populate the docker/helm commands showed on portal -# 2) populate the token service URL returned to docker client -# -# Format: protocol://domain[:port]. Usually: -# 1) if "expose.type" is "ingress", the "domain" should be -# the value of "expose.ingress.hosts.core" -# 2) if "expose.type" is "clusterIP", the "domain" should be -# the value of "expose.clusterIP.name" -# 3) if "expose.type" is "nodePort", the "domain" should be -# the IP address of k8s node -# -# If Harbor is deployed behind the proxy, set it as the URL of proxy -externalURL: https://core.harbor.domain - -# The internal TLS used for harbor components secure communicating. In order to enable https -# in each component tls cert files need to provided in advance. -internalTLS: - # If internal TLS enabled - enabled: false - # enable strong ssl ciphers (default: false) - strong_ssl_ciphers: false - # There are three ways to provide tls - # 1) "auto" will generate cert automatically - # 2) "manual" need provide cert file manually in following value - # 3) "secret" internal certificates from secret - certSource: "auto" - # The content of trust ca, only available when `certSource` is "manual" - trustCa: "" - # core related cert configuration - core: - # secret name for core's tls certs - secretName: "" - # Content of core's TLS cert file, only available when `certSource` is "manual" - crt: "" - # Content of core's TLS key file, only available when `certSource` is "manual" - key: "" - # jobservice related cert configuration - jobservice: - # secret name for jobservice's tls certs - secretName: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - key: "" - # registry related cert configuration - registry: - # secret name for registry's tls certs - secretName: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - key: "" - # portal related cert configuration - portal: - # secret name for portal's tls certs - secretName: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - key: "" - # trivy related cert configuration - trivy: - # secret name for trivy's tls certs - secretName: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - key: "" - -ipFamily: - # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component - ipv6: - enabled: true - # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component - ipv4: - enabled: true - -# The persistence is enabled by default and a default StorageClass -# is needed in the k8s cluster to provision volumes dynamically. -# Specify another StorageClass in the "storageClass" or set "existingClaim" -# if you already have existing persistent volumes to use -# -# For storing images and charts, you can also use "azure", "gcs", "s3", -# "swift" or "oss". Set it in the "imageChartStorage" section -persistence: - enabled: true - # Setting it to "keep" to avoid removing PVCs during a helm delete - # operation. Leaving it empty will delete PVCs after the chart deleted - # (this does not apply for PVCs that are created for internal database - # and redis components, i.e. they are never deleted automatically) - resourcePolicy: "keep" - persistentVolumeClaim: - registry: - # Use the existing PVC which must be created manually before bound, - # and specify the "subPath" if the PVC is shared with other components - existingClaim: "" - # Specify the "storageClass" used to provision the volume. Or the default - # StorageClass will be used (the default). - # Set it to "-" to disable dynamic provisioning - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - jobservice: - jobLog: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external database is used, the following settings for database will - # be ignored - database: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external Redis is used, the following settings for Redis will - # be ignored - redis: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - trivy: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - # Define which storage backend is used for registry to store - # images and charts. Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#storage - # for the detail. - imageChartStorage: - # Specify whether to disable `redirect` for images and chart storage, for - # backends which not supported it (such as using minio for `s3` storage type), please disable - # it. To disable redirects, simply set `disableredirect` to `true` instead. - # Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#redirect - # for the detail. - disableredirect: false - # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate. - # The secret must contain keys named "ca.crt" which will be injected into the trust store - # of registry's containers. - # caBundleSecretName: - - # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift", - # "oss" and fill the information needed in the corresponding section. The type - # must be "filesystem" if you want to use persistent volumes for registry - type: filesystem - filesystem: - rootdirectory: /storage - #maxthreads: 100 - azure: - accountname: accountname - accountkey: base64encodedaccountkey - container: containername - #realm: core.windows.net - # To use existing secret, the key must be AZURE_STORAGE_ACCESS_KEY - existingSecret: "" - gcs: - bucket: bucketname - # The base64 encoded json file which contains the key - encodedkey: base64-encoded-json-key-file - #rootdirectory: /gcs/object/name/prefix - #chunksize: "5242880" - # To use existing secret, the key must be GCS_KEY_DATA - existingSecret: "" - useWorkloadIdentity: false - s3: - # Set an existing secret for S3 accesskey and secretkey - # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry - #existingSecret: "" - region: us-west-1 - bucket: bucketname - #accesskey: awsaccesskey - #secretkey: awssecretkey - #regionendpoint: http://myobjects.local - #encrypt: false - #keyid: mykeyid - #secure: true - #skipverify: false - #v4auth: true - #chunksize: "5242880" - #rootdirectory: /s3/object/name/prefix - #storageclass: STANDARD - #multipartcopychunksize: "33554432" - #multipartcopymaxconcurrency: 100 - #multipartcopythresholdsize: "33554432" - swift: - authurl: https://storage.myprovider.com/v3/auth - username: username - password: password - container: containername - # keys in existing secret must be REGISTRY_STORAGE_SWIFT_PASSWORD, REGISTRY_STORAGE_SWIFT_SECRETKEY, REGISTRY_STORAGE_SWIFT_ACCESSKEY - existingSecret: "" - #region: fr - #tenant: tenantname - #tenantid: tenantid - #domain: domainname - #domainid: domainid - #trustid: trustid - #insecureskipverify: false - #chunksize: 5M - #prefix: - #secretkey: secretkey - #accesskey: accesskey - #authversion: 3 - #endpointtype: public - #tempurlcontainerkey: false - #tempurlmethods: - oss: - accesskeyid: accesskeyid - accesskeysecret: accesskeysecret - region: regionname - bucket: bucketname - # key in existingSecret must be REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - existingSecret: "" - #endpoint: endpoint - #internal: false - #encrypt: false - #secure: true - #chunksize: 10M - #rootdirectory: rootdirectory - -imagePullPolicy: IfNotPresent - -# Use this set to assign a list of default pullSecrets -imagePullSecrets: -# - name: docker-registry-secret -# - name: internal-registry-secret - -# The update strategy for deployments with persistent volumes(jobservice, registry): "RollingUpdate" or "Recreate" -# Set it as "Recreate" when "RWM" for volumes isn't supported -updateStrategy: - type: RollingUpdate - -# debug, info, warning, error or fatal -logLevel: info - -# The initial password of Harbor admin. Change it from portal after launching Harbor -# or give an existing secret for it -# key in secret is given via (default to HARBOR_ADMIN_PASSWORD) -# existingSecretAdminPassword: -existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD -harborAdminPassword: "Harbor12345" - -# The name of the secret which contains key named "ca.crt". Setting this enables the -# download link on portal to download the CA certificate when the certificate isn't -# generated automatically -caSecretName: "" - -# The secret key used for encryption. Must be a string of 16 chars. -secretKey: "not-a-secure-key" -# If using existingSecretSecretKey, the key must be secretKey -existingSecretSecretKey: "" - -# The proxy settings for updating trivy vulnerabilities from the Internet and replicating -# artifacts from/to the registries that cannot be reached directly -proxy: - httpProxy: - httpsProxy: - noProxy: 127.0.0.1,localhost,.local,.internal - components: - - core - - jobservice - - trivy - -# Run the migration job via helm hook -enableMigrateHelmHook: false - -# The custom ca bundle secret, the secret must contain key named "ca.crt" -# which will be injected into the trust store for core, jobservice, registry, trivy components -# caBundleSecretName: "" - -## UAA Authentication Options -# If you're using UAA for authentication behind a self-signed -# certificate you will need to provide the CA Cert. -# Set uaaSecretName below to provide a pre-created secret that -# contains a base64 encoded CA Certificate named `ca.crt`. -# uaaSecretName: - -# If service exposed via "ingress", the Nginx will not be used -nginx: - image: - repository: goharbor/nginx-photon - tag: v2.10.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -portal: - image: - repository: goharbor/harbor-portal - tag: v2.10.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - -core: - image: - repository: goharbor/harbor-core - tag: v2.10.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - ## Startup probe values - startupProbe: - enabled: true - initialDelaySeconds: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## User settings configuration json string - configureUserSettings: - # The provider for updating project quota(usage), there are 2 options, redis or db. - # By default it is implemented by db but you can configure it to redis which - # can improve the performance of high concurrent pushing to the same project, - # and reduce the database connections spike and occupies. - # Using redis will bring up some delay for quota usage updation for display, so only - # suggest switch provider to redis if you were ran into the db connections spike around - # the scenario of high concurrent pushing to same project, no improvment for other scenes. - quotaUpdateProvider: db # Or redis - # Secret is used when core server communicates with other components. - # If a secret key is not specified, Helm will generate one. Alternatively set existingSecret to use an existing secret - # Must be a string of 16 chars. - secret: "" - # Fill in the name of a kubernetes secret if you want to use your own - # If using existingSecret, the key must be secret - existingSecret: "" - # Fill the name of a kubernetes secret if you want to use your own - # TLS certificate and private key for token encryption/decryption. - # The secret must contain keys named: - # "tls.key" - the private key - # "tls.crt" - the certificate - secretName: "" - # If not specifying a preexisting secret, a secret can be created from tokenKey and tokenCert and used instead. - # If none of secretName, tokenKey, and tokenCert are specified, an ephemeral key and certificate will be autogenerated. - # tokenKey and tokenCert must BOTH be set or BOTH unset. - # The tokenKey value is formatted as a multiline string containing a PEM-encoded RSA key, indented one more than tokenKey on the following line. - tokenKey: | - # If tokenKey is set, the value of tokenCert must be set as a PEM-encoded certificate signed by tokenKey, and supplied as a multiline string, indented one more than tokenCert on the following line. - tokenCert: | - # The XSRF key. Will be generated automatically if it isn't specified - xsrfKey: "" - # If using existingSecret, the key is defined by core.existingXsrfSecretKey - existingXsrfSecret: "" - # If using existingSecret, the key - existingXsrfSecretKey: CSRF_KEY - ## The priority class to run the pod as - priorityClassName: - # The time duration for async update artifact pull_time and repository - # pull_count, the unit is second. Will be 10 seconds if it isn't set. - # eg. artifactPullAsyncFlushDuration: 10 - artifactPullAsyncFlushDuration: - gdpr: - deleteUser: false - auditLogsCompliant: false - -jobservice: - image: - repository: goharbor/harbor-jobservice - tag: v2.10.1 - replicas: 1 - revisionHistoryLimit: 10 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - maxJobWorkers: 10 - # The logger for jobs: "file", "database" or "stdout" - jobLoggers: - - file - # - database - # - stdout - # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days - notification: - webhook_job_max_retry: 3 - webhook_job_http_client_timeout: 3 # in seconds - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: 24 - # the max time for execution in running state without new task created - max_dangling_hours: 168 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - # Secret is used when job service communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the job service secret - existingSecretKey: JOBSERVICE_SECRET - ## The priority class to run the pod as - priorityClassName: - -registry: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - registry: - image: - repository: goharbor/registry-photon - tag: v2.10.1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - controller: - image: - repository: goharbor/harbor-registryctl - tag: v2.10.1 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - replicas: 1 - revisionHistoryLimit: 10 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # Secret is used to secure the upload state from client - # and registry storage backend. - # See: https://github.com/distribution/distribution/blob/main/docs/configuration.md#http - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the registry service secret - existingSecretKey: REGISTRY_HTTP_SECRET - # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. - relativeurls: false - credentials: - username: "harbor_registry_user" - password: "harbor_registry_password" - # If using existingSecret, the key must be REGISTRY_PASSWD and REGISTRY_HTPASSWD - existingSecret: "" - # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. - # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string - htpasswdString: "" - middleware: - enabled: false - type: cloudFront - cloudFront: - baseurl: example.cloudfront.net - keypairid: KEYPAIRID - duration: 3000s - ipfilteredby: none - # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key - # that allows access to CloudFront - privateKeySecret: "my-secret" - # enable purge _upload directories - upload_purging: - enabled: true - # remove files in _upload directories which exist for a period of time, default is one week. - age: 168h - # the interval of the purge operations - interval: 24h - dryrun: false - -trivy: - # enabled the flag to enable Trivy scanner - enabled: true - image: - # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon - # tag the tag for Trivy adapter image - tag: v2.10.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # replicas the number of Pod replicas - replicas: 1 - # debugMode the flag to enable Trivy debug mode with more verbose scanning log - debugMode: false - # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`. - vulnType: "os,library" - # severity a comma-separated list of severities to be checked - severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - # ignoreUnfixed the flag to display only fixed vulnerabilities - ignoreUnfixed: false - # insecure the flag to skip verifying registry certificate - insecure: false - # gitHubToken the GitHub access token to download Trivy DB - # - # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases. - # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached - # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update - # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one. - # Currently, the database is updated every 12 hours and published as a new release to GitHub. - # - # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough - # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000 - # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult - # https://developer.github.com/v3/#rate-limiting - # - # You can create a GitHub token by following the instructions in - # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - gitHubToken: "" - # skipUpdate the flag to disable Trivy DB downloads from GitHub - # - # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues. - # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the - # `/home/scanner/.cache/trivy/db/trivy.db` path. - skipUpdate: false - # skipJavaDBUpdate If the flag is enabled you have to manually download the `trivy-java.db` file and mount it in the - # `/home/scanner/.cache/trivy/java-db/trivy-java.db` path - # - skipJavaDBUpdate: false - # The offlineScan option prevents Trivy from sending API requests to identify dependencies. - # - # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it. - # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't - # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode. - # It would work if all the dependencies are in local. - # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment. - offlineScan: false - # Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. Defaults to `vuln`. - securityCheck: "vuln" - # The duration to wait for scan completion - timeout: 5m0s - resources: - requests: - cpu: 200m - memory: 512Mi - limits: - cpu: 1 - memory: 1Gi - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -database: - # if external database is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-db - tag: v2.10.1 - # The initial superuser password for internal database - password: "changeit" - # The size limit for Shared memory, pgSQL use it for shared_buffer - # More details see: - # https://github.com/goharbor/harbor/issues/15034 - shmSizeLimit: 512Mi - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - # The timeout used in livenessProbe; 1 to 5 seconds - livenessProbe: - timeoutSeconds: 1 - # The timeout used in readinessProbe; 1 to 5 seconds - readinessProbe: - timeoutSeconds: 1 - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - initContainer: - migrator: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - permissions: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - external: - host: "192.168.0.1" - port: "5432" - username: "user" - password: "password" - coreDatabase: "registry" - # if using existing secret, the key must be "password" - existingSecret: "" - # "disable" - No SSL - # "require" - Always SSL (skip verification) - # "verify-ca" - Always SSL (verify that the certificate presented by the - # server was signed by a trusted CA) - # "verify-full" - Always SSL (verify that the certification presented by the - # server was signed by a trusted CA and the server host name matches the one - # in the certificate) - sslmode: "disable" - # The maximum number of connections in the idle connection pool per pod (core+exporter). - # If it <=0, no idle connections are retained. - maxIdleConns: 100 - # The maximum number of open connections to the database per pod (core+exporter). - # If it <= 0, then there is no limit on the number of open connections. - # Note: the default number of connections is 1024 for postgre of harbor. - maxOpenConns: 900 - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -redis: - # if external Redis is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/redis-photon - tag: v2.10.1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # # jobserviceDatabaseIndex defaults to "1" - # # registryDatabaseIndex defaults to "2" - # # trivyAdapterIndex defaults to "5" - # # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - external: - # support redis, redis+sentinel - # addr for redis: : - # addr for redis+sentinel: :,:,: - addr: "192.168.0.2:6379" - # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel - sentinelMasterSet: "" - # The "coreDatabaseIndex" must be "0" as the library Harbor - # used doesn't support configuring it - # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - coreDatabaseIndex: "0" - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - # username field can be an empty string, and it will be authenticated against the default user - username: "" - password: "" - # If using existingSecret, the key must be REDIS_PASSWORD - existingSecret: "" - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -exporter: - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-exporter - tag: v2.10.1 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - cacheDuration: 23 - cacheCleanInterval: 14400 - ## The priority class to run the pod as - priorityClassName: - -metrics: - enabled: false - core: - path: /metrics - port: 8001 - registry: - path: /metrics - port: 8001 - jobservice: - path: /metrics - port: 8001 - exporter: - path: /metrics - port: 8001 - ## Create prometheus serviceMonitor to scrape harbor metrics. - ## This requires the monitoring.coreos.com/v1 CRD. Please see - ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md - ## - serviceMonitor: - enabled: false - additionalLabels: {} - # Scrape interval. If not set, the Prometheus default scrape interval is used. - interval: "" - # Metric relabel configs to apply to samples before ingestion. - metricRelabelings: - [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - # Relabel configs to apply to samples before ingestion. - relabelings: - [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] - # separator: ; - # regex: ^(.*)$ - # targetLabel: nodename - # replacement: $1 - # action: replace - -trace: - enabled: false - # trace provider: jaeger or otel - # jaeger should be 1.26+ - provider: jaeger - # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth - sample_rate: 1 - # namespace used to differentiate different harbor services - # namespace: - # attributes is a key value dict contains user defined attributes used to initialize trace provider - # attributes: - # application: harbor - jaeger: - # jaeger supports two modes: - # collector mode(uncomment endpoint and uncomment username, password if needed) - # agent mode(uncomment agent_host and agent_port) - endpoint: http://hostname:14268/api/traces - # username: - # password: - # agent_host: hostname - # export trace data by jaeger.thrift in compact mode - # agent_port: 6831 - otel: - endpoint: hostname:4318 - url_path: /v1/traces - compression: false - insecure: true - # timeout is in seconds - timeout: 10 - -# cache layer configurations -# if this feature enabled, harbor will cache the resource -# `project/project_metadata/repository/artifact/manifest` in the redis -# which help to improve the performance of high concurrent pulling manifest. -cache: - # default is not enabled. - enabled: false - # default keep cache for one day. - expireHours: 24 diff --git a/charts/harbor/harbor/1.14.2/.helmignore b/charts/harbor/harbor/1.14.2/.helmignore deleted file mode 100644 index b4424fd59b..0000000000 --- a/charts/harbor/harbor/1.14.2/.helmignore +++ /dev/null @@ -1,6 +0,0 @@ -.github/* -docs/* -.git/* -.gitignore -CONTRIBUTING.md -test/* \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/Chart.yaml b/charts/harbor/harbor/1.14.2/Chart.yaml deleted file mode 100644 index 1632e628e1..0000000000 --- a/charts/harbor/harbor/1.14.2/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor -apiVersion: v1 -appVersion: 2.10.2 -description: An open source trusted cloud native registry that stores, signs, and - scans content -home: https://goharbor.io -icon: https://raw.githubusercontent.com/goharbor/website/main/static/img/logos/harbor-icon-color.png -keywords: -- docker -- registry -- harbor -maintainers: -- email: yinw@vmware.com - name: Wenkai Yin -- email: hweiwei@vmware.com - name: Weiwei He -- email: yshengwen@vmware.com - name: Shengwen Yu -name: harbor -sources: -- https://github.com/goharbor/harbor -- https://github.com/goharbor/harbor-helm -version: 1.14.2 diff --git a/charts/harbor/harbor/1.14.2/LICENSE b/charts/harbor/harbor/1.14.2/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/charts/harbor/harbor/1.14.2/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/charts/harbor/harbor/1.14.2/README.md b/charts/harbor/harbor/1.14.2/README.md deleted file mode 100644 index 472324a3ff..0000000000 --- a/charts/harbor/harbor/1.14.2/README.md +++ /dev/null @@ -1,411 +0,0 @@ -# Helm Chart for Harbor - -**Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be found [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. - -This repository, including the issues, focuses on deploying Harbor chart via helm. For functionality issues or Harbor questions, please open issues on [goharbor/harbor](https://github.com/goharbor/harbor) - -## Introduction - -This [Helm](https://github.com/kubernetes/helm) chart installs [Harbor](https://github.com/goharbor/harbor) in a Kubernetes cluster. Welcome to [contribute](CONTRIBUTING.md) to Helm Chart for Harbor. - -## Prerequisites - -- Kubernetes cluster 1.20+ -- Helm v3.2.0+ - -## Installation - -### Add Helm repository - -```bash -helm repo add harbor https://helm.goharbor.io -``` - -### Configure the chart - -The following items can be set via `--set` flag during installation or configured by editing the `values.yaml` directly (need to download the chart first). - -#### Configure how to expose Harbor service - -- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. - **Notes:** if TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to issue [#5291](https://github.com/goharbor/harbor/issues/5291) for details. -- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. -- **NodePort**: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. -- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. - -#### Configure the external URL - -The external URL for Harbor core service is used to: - -1. populate the docker/helm commands showed on portal -2. populate the token service URL returned to docker client - -Format: `protocol://domain[:port]`. Usually: - -- if service exposed via `Ingress`, the `domain` should be the value of `expose.ingress.hosts.core` -- if service exposed via `ClusterIP`, the `domain` should be the value of `expose.clusterIP.name` -- if service exposed via `NodePort`, the `domain` should be the IP address of one Kubernetes node -- if service exposed via `LoadBalancer`, set the `domain` as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider - -If Harbor is deployed behind the proxy, set it as the URL of proxy. - -#### Configure how to persist data - -- **Disable**: The data does not survive the termination of a pod. -- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you already have existing persistent volumes to use. -- **External Storage(only for images and charts)**: For images and charts, the external storages are supported: `azure`, `gcs`, `s3` `swift` and `oss`. - -#### Configure the other items listed in [configuration](#configuration) section - -### Install the chart - -Install the Harbor helm chart with a release name `my-release`: -```bash -helm install my-release harbor/harbor -``` - -## Uninstallation - -To uninstall/delete the `my-release` deployment: -```bash -helm uninstall my-release -``` - -## Configuration - -The following table lists the configurable parameters of the Harbor chart and the default values. - -| Parameter | Description | Default | -| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| **Expose** | | | -| `expose.type` | How to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` | -| `expose.tls.enabled` | Enable TLS or not. Delete the `ssl-redirect` annotations in `expose.ingress.annotations` when TLS is disabled and `expose.type` is `ingress`. Note: if the `expose.type` is `ingress` and TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to https://github.com/goharbor/harbor/issues/5291 for details. | `true` | -| `expose.tls.certSource` | The source of the TLS certificate. Set as `auto`, `secret` or `none` and fill the information in the corresponding section: 1) auto: generate the TLS certificate automatically 2) secret: read the TLS certificate from the specified secret. The TLS certificate can be generated manually or by cert manager 3) none: configure no TLS certificate for the ingress. If the default TLS certificate is configured in the ingress controller, choose this option | `auto` | -| `expose.tls.auto.commonName` | The common name used to generate the certificate, it's necessary when the type isn't `ingress` | | -| `expose.tls.secret.secretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key | | -| `expose.ingress.hosts.core` | The host of Harbor core service in ingress rule | `core.harbor.domain` | -| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce`, `alb`, `f5-bigip` and `ncp` | `default` | -| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | | -| `expose.ingress.annotations` | The annotations used commonly for ingresses | | -| `expose.ingress.harbor.annotations` | The annotations specific to harbor ingress | {} | -| `expose.ingress.harbor.labels` | The labels specific to harbor ingress | {} | -| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` | -| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} | -| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.clusterIP.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.name` | The name of NodePort service | `harbor` | -| `expose.nodePort.ports.http.port` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.nodePort.ports.http.nodePort` | The node port Harbor listens on when serving HTTP | `30002` | -| `expose.nodePort.ports.https.port` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.ports.https.nodePort` | The node port Harbor listens on when serving HTTPS | `30003` | -| `expose.loadBalancer.name` | The name of service | `harbor` | -| `expose.loadBalancer.IP` | The IP of the loadBalancer. It only works when loadBalancer supports assigning IP | `""` | -| `expose.loadBalancer.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.loadBalancer.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `30002` | -| `expose.loadBalancer.annotations` | The annotations attached to the loadBalancer service | {} | -| `expose.loadBalancer.sourceRanges` | List of IP address ranges to assign to loadBalancerSourceRanges | [] | -| **Internal TLS** | | | -| `internalTLS.enabled` | Enable TLS for the components (core, jobservice, portal, registry, trivy) | `false` | -| `internalTLS.strong_ssl_ciphers` | Enable strong ssl ciphers for nginx and portal | `false` -| `internalTLS.certSource` | Method to provide TLS for the components, options are `auto`, `manual`, `secret`. | `auto` | -| `internalTLS.trustCa` | The content of trust CA, only available when `certSource` is `manual`. **Note**: all the internal certificates of the components must be issued by this CA | | -| `internalTLS.core.secretName` | The secret name for core component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.core.crt` | Content of core's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.core.key` | Content of core's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.secretName` | The secret name for jobservice component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.jobservice.crt` | Content of jobservice's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.key` | Content of jobservice's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.registry.secretName` | The secret name for registry component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.registry.crt` | Content of registry's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.registry.key` | Content of registry's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.portal.secretName` | The secret name for portal component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.portal.crt` | Content of portal's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.portal.key` | Content of portal's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.secretName` | The secret name for trivy component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.trivy.crt` | Content of trivy's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.key` | Content of trivy's TLS key file, only available when `certSource` is `manual` | | -| **IPFamily** | | | -| `ipFamily.ipv4.enabled` | if cluster is ipv4 enabled, all ipv4 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| `ipFamily.ipv6.enabled` | if cluster is ipv6 enabled, all ipv6 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| **Persistence** | | | -| `persistence.enabled` | Enable the data persistence or not | `true` | -| `persistence.resourcePolicy` | Setting it to `keep` to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted. Does not affect PVCs created for internal database and redis components. | `keep` | -| `persistence.persistentVolumeClaim.registry.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.registry.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.registry.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.registry.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.registry.size` | The size of the volume | `5Gi` | -| `persistence.persistentVolumeClaim.registry.annotations` | The annotations of the volume | | -|`persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.database.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.subPath` | The sub path used in the volume. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.accessMode` | The access mode of the volume. If external database is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.database.size` | The size of the volume. If external database is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.database.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.redis.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.subPath` | The sub path used in the volume. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.accessMode` | The access mode of the volume. If external Redis is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.redis.size` | The size of the volume. If external Redis is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.redis.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.trivy.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.trivy.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.trivy.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.trivy.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.trivy.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.trivy.annotations` | The annotations of the volume | | -| `persistence.imageChartStorage.disableredirect` | The configuration for managing redirects from content backends. For backends which not supported it (such as using minio for `s3` storage type), please set it to `true` to disable redirects. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect) for more details | `false` | -| `persistence.imageChartStorage.caBundleSecretName` | Specify the `caBundleSecretName` if the storage service uses a self-signed certificate. The secret must contain keys named `ca.crt` which will be injected into the trust store of registry's and containers. | | -| `persistence.imageChartStorage.type` | The type of storage for images and charts: `filesystem`, `azure`, `gcs`, `s3`, `swift` or `oss`. The type must be `filesystem` if you want to use persistent volumes for registry. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#storage) for more details | `filesystem` | -| `persistence.imageChartStorage.gcs.existingSecret` | An existing secret containing the gcs service account json key. The key must be gcs-key.json. | `""` | -| `persistence.imageChartStorage.gcs.useWorkloadIdentity` | A boolean to allow the use of workloadidentity in a GKE cluster. To use it, create a kubernetes service account and set the name in the key `serviceAccountName` of each component, then allow automounting the service account. | `false` | -| **General** | | | -| `externalURL` | The external URL for Harbor core service | `https://core.harbor.domain` | -| `caBundleSecretName` | The custom CA bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for core, jobservice, registry, trivy components. | | -| `uaaSecretName` | If using external UAA auth which has a self signed cert, you can provide a pre-created secret containing it under the key `ca.crt`. | | -| `imagePullPolicy` | The image pull policy | | -| `imagePullSecrets` | The imagePullSecrets names for all deployments | | -| `updateStrategy.type` | The update strategy for deployments with persistent volumes(jobservice, registry): `RollingUpdate` or `Recreate`. Set it as `Recreate` when `RWM` for volumes isn't supported | `RollingUpdate` | -| `logLevel` | The log level: `debug`, `info`, `warning`, `error` or `fatal` | `info` | -| `harborAdminPassword` | The initial password of Harbor admin. Change it from portal after launching Harbor | `Harbor12345` | -| `existingSecretAdminPassword` | The name of secret where admin password can be found. | | -| `existingSecretAdminPasswordKey` | The name of the key in the secret where to find harbor admin password Harbor | `HARBOR_ADMIN_PASSWORD` | -| `caSecretName` | The name of the secret which contains key named `ca.crt`. Setting this enables the download link on portal to download the CA certificate when the certificate isn't generated automatically | | -| `secretKey` | The key used for encryption. Must be a string of 16 chars | `not-a-secure-key` | -| `existingSecretSecretKey` | An existing secret containing the encoding secretKey | `""` | -| `proxy.httpProxy` | The URL of the HTTP proxy server | | -| `proxy.httpsProxy` | The URL of the HTTPS proxy server | | -| `proxy.noProxy` | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal | -| `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | -| `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | -| **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | -| `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | -| `nginx.image.tag` | Image tag | `dev` | -| `nginx.replicas` | The replica count | `1` | -| `nginx.revisionHistoryLimit` | The revision history limit | `10` | -| `nginx.resources` | The [resources] to allocate for container | undefined | -| `nginx.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `nginx.nodeSelector` | Node labels for pod assignment | `{}` | -| `nginx.tolerations` | Tolerations for pod assignment | `[]` | -| `nginx.affinity` | Node/Pod affinities | `{}` | -| `nginx.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | -| `nginx.priorityClassName` | The priority class to run the pod as | | -| **Portal** | | | -| `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | -| `portal.image.tag` | Tag for portal image | `dev` | -| `portal.replicas` | The replica count | `1` | -| `portal.revisionHistoryLimit` | The revision history limit | `10` | -| `portal.resources` | The [resources] to allocate for container | undefined | -| `portal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `portal.nodeSelector` | Node labels for pod assignment | `{}` | -| `portal.tolerations` | Tolerations for pod assignment | `[]` | -| `portal.affinity` | Node/Pod affinities | `{}` | -| `portal.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` | -| `portal.serviceAnnotations` | Annotations to add to the portal service | `{}` | -| `portal.priorityClassName` | The priority class to run the pod as | | -| **Core** | | | -| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | -| `core.image.tag` | Tag for Harbor core image | `dev` | -| `core.replicas` | The replica count | `1` | -| `core.revisionHistoryLimit` | The revision history limit | `10` | -| `core.startupProbe.initialDelaySeconds` | The initial delay in seconds for the startup probe | `10` | -| `core.resources` | The [resources] to allocate for container | undefined | -| `core.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `core.nodeSelector` | Node labels for pod assignment | `{}` | -| `core.tolerations` | Tolerations for pod assignment | `[]` | -| `core.affinity` | Node/Pod affinities | `{}` | -| `core.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `core.podAnnotations` | Annotations to add to the core pod | `{}` | -| `core.serviceAnnotations` | Annotations to add to the core service | `{}` | -| `core.configureUserSettings` | A JSON string to set in the environment variable `CONFIG_OVERWRITE_JSON` to configure user settings. See the [official docs](https://goharbor.io/docs/latest/install-config/configure-user-settings-cli/#configure-users-settings-using-an-environment-variable). | | -| `core.quotaUpdateProvider` | The provider for updating project quota(usage), there are 2 options, redis or db. By default it is implemented by db but you can configure it to redis which can improve the performance of high concurrent pushing to the same project, and reduce the database connections spike and occupies. Using redis will bring up some delay for quota usage updation for display, so only suggest switch provider to redis if you were ran into the db connections spike around the scenario of high concurrent pushing to same project, no improvment for other scenes. | `db` | -| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `core.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate and private key for token encryption/decryption. The secret must contain keys named: `tls.crt` - the certificate and `tls.key` - the private key. The default key pair will be used if it isn't set | | -| `core.tokenKey` | PEM-formatted RSA private key used to sign service tokens. Only used if `core.secretName` is unset. If set, `core.tokenCert` MUST also be set. | | -| `core.tokenCert` | PEM-formatted certificate signed by `core.tokenKey` used to validate service tokens. Only used if `core.secretName` is unset. If set, `core.tokenKey` MUST also be set. | | -| `core.xsrfKey` | The XSRF key. Will be generated automatically if it isn't specified | | -| `core.priorityClassName` | The priority class to run the pod as | | -| `core.artifactPullAsyncFlushDuration` | The time duration for async update artifact pull_time and repository pull_count | | -| `core.gdpr.deleteUser` | Enable GDPR compliant user delete | `false` | -| `core.gdpr.auditLogsCompliant` | Enable GDPR compliant for audit logs by changing username to its CRC32 value if that user was deleted from the system | `false` | -| **Jobservice** | | | -| `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | -| `jobservice.image.tag` | Tag for jobservice image | `dev` | -| `jobservice.replicas` | The replica count | `1` | -| `jobservice.revisionHistoryLimit` | The revision history limit | `10` | -| `jobservice.maxJobWorkers` | The max job workers | `10` | -| `jobservice.jobLoggers` | The loggers for jobs: `file`, `database` or `stdout` | `[file]` | -| `jobservice.loggerSweeperDuration` | The jobLogger sweeper duration in days (ignored if `jobLoggers` is set to `stdout`) | `14` | -| `jobservice.notification.webhook_job_max_retry` | The maximum retry of webhook sending notifications | `3` | -| `jobservice.notification.webhook_job_http_client_timeout` | The http client timeout value of webhook sending notifications | `3` | -| `jobservice.reaper.max_update_hours` | the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 | `24` | -| `jobservice.reaper.max_dangling_hours` | the max time for execution in running state without new task created | `168` | -| `jobservice.resources` | The [resources] to allocate for container | undefined | -| `jobservice.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `jobservice.nodeSelector` | Node labels for pod assignment | `{}` | -| `jobservice.tolerations` | Tolerations for pod assignment | `[]` | -| `jobservice.affinity` | Node/Pod affinities | `{}` | -| `jobservice.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` | -| `jobservice.priorityClassName` | The priority class to run the pod as | | -| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| **Registry** | | | -| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | -| `registry.registry.image.tag` | Tag for registry image | `dev` | -| `registry.registry.resources` | The [resources] to allocate for container | undefined | -| `registry.controller.image.repository` | Repository for registry controller image | `goharbor/harbor-registryctl` | -| `registry.controller.image.tag` | Tag for registry controller image | `dev` | -| `registry.controller.resources` | The [resources] to allocate for container | undefined | -| `registry.replicas` | The replica count | `1` | -| `registry.revisionHistoryLimit` | The revision history limit | `10` | -| `registry.nodeSelector` | Node labels for pod assignment | `{}` | -| `registry.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `registry.tolerations` | Tolerations for pod assignment | `[]` | -| `registry.affinity` | Node/Pod affinities | `{}` | -| `registry.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | | -| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` | -| `registry.priorityClassName` | The priority class to run the pod as | | -| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `registry.credentials.username` | The username that harbor core uses internally to access the registry instance. Together with the `registry.credentials.password`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` | -| `registry.credentials.password` | The password that harbor core uses internally to access the registry instance. Together with the `registry.credentials.username`, a htpasswd  is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). It is suggested you update this value before installation. | `harbor_registry_password` | -| `registry.credentials.existingSecret` | An existing secret containing the password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). The key must be `REGISTRY_PASSWD` | `""` | -| `registry.credentials.htpasswdString` | Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. | undefined | -| `registry.relativeurls` | If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. Needed if harbor is behind a reverse proxy | `false` | -| `registry.upload_purging.enabled` | If true, enable purge _upload directories | `true` | -| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` | -| `registry.upload_purging.interval` | The interval of the purge operations | `24h` | -| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` | -| **[Trivy][trivy]** | | | -| `trivy.enabled` | The flag to enable Trivy scanner | `true` | -| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` | -| `trivy.image.tag` | Tag for Trivy adapter image | `dev` | -| `trivy.resources` | The [resources] to allocate for Trivy adapter container | | -| `trivy.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `trivy.replicas` | The number of Pod replicas | `1` | -| `trivy.debugMode` | The flag to enable Trivy debug mode | `false` | -| `trivy.vulnType` | Comma-separated list of vulnerability types. Possible values `os` and `library`. | `os,library` | -| `trivy.severity` | Comma-separated list of severities to be checked | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | -| `trivy.ignoreUnfixed` | The flag to display only fixed vulnerabilities | `false` | -| `trivy.insecure` | The flag to skip verifying registry certificate | `false` | -| `trivy.skipUpdate` | The flag to disable [Trivy DB][trivy-db] downloads from GitHub | `false` | -| `trivy.skipJavaDBUpdate` | If the flag is enabled you have to manually download the `trivy-java.db` file [Trivy Java DB][trivy-java-db] and mount it in the `/home/scanner/.cache/trivy/java-db/trivy-java.db` path | `false` | -| `trivy.offlineScan` | The flag prevents Trivy from sending API requests to identify dependencies. | `false` | -| `trivy.securityCheck` | Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. | `vuln` | -| `trivy.timeout` | The duration to wait for scan completion | `5m0s` | -| `trivy.gitHubToken` | The GitHub access token to download [Trivy DB][trivy-db] (see [GitHub rate limiting][trivy-rate-limiting]) | | -| `trivy.priorityClassName` | The priority class to run the pod as | | -| `trivy.topologySpreadConstraints` | The priority class to run the pod as | | -| **Database** | | | -| `database.type` | If external database is used, set it to `external` | `internal` | -| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` | -| `database.internal.image.tag` | Tag for database image | `dev` | -| `database.internal.password` | The password for database | `changeit` | -| `database.internal.shmSizeLimit` | The limit for the size of shared memory for internal PostgreSQL, conventionally it's around 50% of the memory limit of the container | `512Mi` | -| `database.internal.resources` | The [resources] to allocate for container | undefined | -| `database.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `database.internal.initContainer.migrator.resources` | The [resources] to allocate for the database migrator initContainer | undefined | -| `database.internal.initContainer.permissions.resources` | The [resources] to allocate for the database permissions initContainer | undefined | -| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `database.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `database.internal.affinity` | Node/Pod affinities | `{}` | -| `database.internal.priorityClassName` | The priority class to run the pod as | | -| `database.internal.livenessProbe.timeoutSeconds` | The timeout used in liveness probe; 1 to 5 seconds | 1 | -| `database.internal.readinessProbe.timeoutSeconds` | The timeout used in readiness probe; 1 to 5 seconds | 1 | -| `database.external.host` | The hostname of external database | `192.168.0.1` | -| `database.external.port` | The port of external database | `5432` | -| `database.external.username` | The username of external database | `user` | -| `database.external.password` | The password of external database | `password` | -| `database.external.coreDatabase` | The database used by core service | `registry` | -| `database.external.existingSecret` | An existing password containing the database password. the key must be `password`. | `""` | -| `database.external.sslmode` | Connection method of external database (require, verify-full, verify-ca, disable) | `disable` | -| `database.maxIdleConns` | The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained. | `50` | -| `database.maxOpenConns` | The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections. | `100` | -| `database.podAnnotations` | Annotations to add to the database pod | `{}` | -| **Redis** | | | -| `redis.type` | If external redis is used, set it to `external` | `internal` | -| `redis.internal.image.repository` | Repository for redis image | `goharbor/redis-photon` | -| `redis.internal.image.tag` | Tag for redis image | `dev` | -| `redis.internal.resources` | The [resources] to allocate for container | undefined | -| `redis.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `redis.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `redis.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `redis.internal.affinity` | Node/Pod affinities | `{}` | -| `redis.internal.priorityClassName` | The priority class to run the pod as | | -| `redis.internal.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.internal.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.internal.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.internal.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.internal.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.addr` | The addr of external Redis: :. When using sentinel, it should be :,:,: | `192.168.0.2:6379` | -| `redis.external.sentinelMasterSet` | The name of the set of Redis instances to monitor | | -| `redis.external.coreDatabaseIndex` | The database index for core | `0` | -| `redis.external.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.external.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.external.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.external.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.external.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.username` | The username of external Redis | | -| `redis.external.password` | The password of external Redis | | -| `redis.external.existingSecret` | Use an existing secret to connect to redis. The key must be `REDIS_PASSWORD`. | `""` | -| `redis.podAnnotations` | Annotations to add to the redis pod | `{}` | -| **Exporter** | | | -| `exporter.replicas` | The replica count | `1` | -| `exporter.revisionHistoryLimit` | The revision history limit | `10` | -| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` | -| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` | -| `exporter.image.tag` | Tag for exporter image | `dev` | -| `exporter.nodeSelector` | Node labels for pod assignment | `{}` | -| `exporter.tolerations` | Tolerations for pod assignment | `[]` | -| `exporter.affinity` | Node/Pod affinities | `{}` | -| `exporter.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `exporter.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `exporter.cacheDuration` | the cache duration for information that exporter collected from Harbor | `30` | -| `exporter.cacheCleanInterval` | cache clean interval for information that exporter collected from Harbor | `14400` | -| `exporter.priorityClassName` | The priority class to run the pod as | | -| **Metrics** | | | -| `metrics.enabled` | if enable harbor metrics | `false` | -| `metrics.core.path` | the url path for core metrics | `/metrics` | -| `metrics.core.port` | the port for core metrics | `8001` | -| `metrics.registry.path` | the url path for registry metrics | `/metrics` | -| `metrics.registry.port` | the port for registry metrics | `8001` | -| `metrics.exporter.path` | the url path for exporter metrics | `/metrics` | -| `metrics.exporter.port` | the port for exporter metrics | `8001` | -| `metrics.serviceMonitor.enabled` | create prometheus serviceMonitor. Requires prometheus CRD's | `false` | -| `metrics.serviceMonitor.additionalLabels` | additional labels to upsert to the manifest | `""` | -| `metrics.serviceMonitor.interval` | scrape period for harbor metrics | `""` | -| `metrics.serviceMonitor.metricRelabelings` | metrics relabel to add/mod/del before ingestion | `[]` | -| `metrics.serviceMonitor.relabelings` | relabels to add/mod/del to sample before scrape | `[]` | -| **Trace** | | | -| `trace.enabled` | Enable tracing or not | `false` | -| `trace.provider` | The tracing provider: `jaeger` or `otel`. `jaeger` should be 1.26+ | `jaeger` | -| `trace.sample_rate` | Set `sample_rate` to 1 if you want sampling 100% of trace data; set 0.5 if you want sampling 50% of trace data, and so forth | `1` | -| `trace.namespace` | Namespace used to differentiate different harbor services | | -| `trace.attributes` | `attributes` is a key value dict contains user defined attributes used to initialize trace provider | | -| `trace.jaeger.endpoint` | The endpoint of jaeger | `http://hostname:14268/api/traces` | -| `trace.jaeger.username` | The username of jaeger | | -| `trace.jaeger.password` | The password of jaeger | | -| `trace.jaeger.agent_host` | The agent host of jaeger | | -| `trace.jaeger.agent_port` | The agent port of jaeger | `6831` | -| `trace.otel.endpoint` | The endpoint of otel | `hostname:4318` | -| `trace.otel.url_path` | The URL path of otel | `/v1/traces` | -| `trace.otel.compression` | Whether enable compression or not for otel | `false` | -| `trace.otel.insecure` | Whether establish insecure connection or not for otel | `true` | -| `trace.otel.timeout` | The timeout in seconds of otel | `10` | -| **Cache** | | | -| `cache.enabled` | Enable cache layer or not | `false` | -| `cache.expireHours` | The expire hours of cache layer | `24` | - -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[trivy]: https://github.com/aquasecurity/trivy -[trivy-db]: https://github.com/aquasecurity/trivy-db -[trivy-java-db]: https://github.com/aquasecurity/trivy-java-db -[trivy-rate-limiting]: https://github.com/aquasecurity/trivy#github-rate-limiting diff --git a/charts/harbor/harbor/1.14.2/templates/NOTES.txt b/charts/harbor/harbor/1.14.2/templates/NOTES.txt deleted file mode 100644 index 0980c08a35..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }} -For more details, please visit https://github.com/goharbor/harbor diff --git a/charts/harbor/harbor/1.14.2/templates/_helpers.tpl b/charts/harbor/harbor/1.14.2/templates/_helpers.tpl deleted file mode 100644 index b3430a1f36..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/_helpers.tpl +++ /dev/null @@ -1,566 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "harbor.name" -}} -{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "harbor.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "harbor" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Helm required labels */}} -{{- define "harbor.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* matchLabels */}} -{{- define "harbor.matchLabels" -}} -release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* Helper for printing values from existing secrets*/}} -{{- define "harbor.secretKeyHelper" -}} - {{- if and (not (empty .data)) (hasKey .data .key) }} - {{- index .data .key | b64dec -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCert" -}} - {{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForIngress" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (eq .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForNginx" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (ne .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.host" -}} - {{- if eq .Values.database.type "internal" -}} - {{- template "harbor.database" . }} - {{- else -}} - {{- .Values.database.external.host -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.port" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "5432" -}} - {{- else -}} - {{- .Values.database.external.port -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.username" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "postgres" -}} - {{- else -}} - {{- .Values.database.external.username -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.rawPassword" -}} - {{- if eq .Values.database.type "internal" -}} - {{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.database" .) -}} - {{- if and (not (empty $existingSecret)) (hasKey $existingSecret.data "POSTGRES_PASSWORD") -}} - {{- .Values.database.internal.password | default (index $existingSecret.data "POSTGRES_PASSWORD" | b64dec) -}} - {{- else -}} - {{- .Values.database.internal.password -}} - {{- end -}} - {{- else -}} - {{- .Values.database.external.password -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.escapedRawPassword" -}} - {{- include "harbor.database.rawPassword" . | urlquery | replace "+" "%20" -}} -{{- end -}} - -{{- define "harbor.database.encryptedPassword" -}} - {{- include "harbor.database.rawPassword" . | b64enc | quote -}} -{{- end -}} - -{{- define "harbor.database.coreDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "registry" -}} - {{- else -}} - {{- .Values.database.external.coreDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.sslmode" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "disable" -}} - {{- else -}} - {{- .Values.database.external.sslmode -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.redis.scheme" -}} - {{- with .Values.redis }} - {{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }} - {{- end }} -{{- end -}} - -/*host:port*/ -{{- define "harbor.redis.addr" -}} - {{- with .Values.redis }} - {{- ternary (printf "%s:6379" (include "harbor.redis" $ )) .external.addr (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.masterSet" -}} - {{- with .Values.redis }} - {{- ternary .external.sentinelMasterSet "" (eq "redis+sentinel" (include "harbor.redis.scheme" $)) }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.password" -}} - {{- with .Values.redis }} - {{- ternary "" .external.password (eq .type "internal") }} - {{- end }} -{{- end -}} - - -{{- define "harbor.redis.pwdfromsecret" -}} - {{- (lookup "v1" "Secret" .Release.Namespace (.Values.redis.external.existingSecret)).data.REDIS_PASSWORD | b64dec }} -{{- end -}} - -{{- define "harbor.redis.cred" -}} - {{- with .Values.redis }} - {{- if (and (eq .type "external" ) (.external.existingSecret)) }} - {{- printf ":%s@" (include "harbor.redis.pwdfromsecret" $) }} - {{- else }} - {{- ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }} - {{- end }} - {{- end }} -{{- end -}} - -/*scheme://[:password@]host:port[/master_set]*/ -{{- define "harbor.redis.url" -}} - {{- with .Values.redis }} - {{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }} - {{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) (include "harbor.redis.cred" $) (include "harbor.redis.addr" $) $path -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCore" -}} - {{- with .Values.redis }} - {{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index*/ -{{- define "harbor.redis.urlForJobservice" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.jobserviceDatabaseIndex .external.jobserviceDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForRegistry" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForTrivy" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.trivyAdapterIndex .external.trivyAdapterIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForHarbor" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.harborDatabaseIndex .external.harborDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCache" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.cacheLayerDatabaseIndex .external.cacheLayerDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.dbForRegistry" -}} - {{- with .Values.redis }} - {{- ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.noProxy" -}} - {{- printf "%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}} -{{- end -}} - -{{- define "harbor.caBundleVolume" -}} -- name: ca-bundle-certs - secret: - secretName: {{ .Values.caBundleSecretName }} -{{- end -}} - -{{- define "harbor.caBundleVolumeMount" -}} -- name: ca-bundle-certs - mountPath: /harbor_cust_cert/custom-ca.crt - subPath: ca.crt -{{- end -}} - -{{/* scheme for all components because it only support http mode */}} -{{- define "harbor.component.scheme" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "https" -}} - {{- else -}} - {{- printf "http" -}} - {{- end -}} -{{- end -}} - -{{/* core component container port */}} -{{- define "harbor.core.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* core component service port */}} -{{- define "harbor.core.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component container port */}} -{{- define "harbor.jobservice.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component service port */}} -{{- define "harbor.jobservice.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* portal component container port */}} -{{- define "harbor.portal.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* portal component service port */}} -{{- define "harbor.portal.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* registry component container port */}} -{{- define "harbor.registry.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registry component service port */}} -{{- define "harbor.registry.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component container port */}} -{{- define "harbor.registryctl.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component service port */}} -{{- define "harbor.registryctl.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component container port */}} -{{- define "harbor.trivy.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component service port */}} -{{- define "harbor.trivy.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* CORE_URL */}} -{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}} -{{- define "harbor.coreURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}} -{{- end -}} - -{{/* JOBSERVICE_URL */}} -{{- define "harbor.jobserviceURL" -}} - {{- printf "%s://%s-jobservice" (include "harbor.component.scheme" .) (include "harbor.fullname" .) -}} -{{- end -}} - -{{/* PORTAL_URL */}} -{{- define "harbor.portalURL" -}} - {{- printf "%s://%s" (include "harbor.component.scheme" .) (include "harbor.portal" .) -}} -{{- end -}} - -{{/* REGISTRY_URL */}} -{{- define "harbor.registryURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registry.servicePort" .) -}} -{{- end -}} - -{{/* REGISTRY_CONTROLLER_URL */}} -{{- define "harbor.registryControllerURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registryctl.servicePort" .) -}} -{{- end -}} - -{{/* TOKEN_SERVICE_URL */}} -{{- define "harbor.tokenServiceURL" -}} - {{- printf "%s/service/token" (include "harbor.coreURL" .) -}} -{{- end -}} - -{{/* TRIVY_ADAPTER_URL */}} -{{- define "harbor.trivyAdapterURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}} -{{- end -}} - -{{- define "harbor.internalTLS.core.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.core.secretName -}} - {{- else -}} - {{- printf "%s-core-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.jobservice.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.jobservice.secretName -}} - {{- else -}} - {{- printf "%s-jobservice-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.portal.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.portal.secretName -}} - {{- else -}} - {{- printf "%s-portal-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.registry.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.registry.secretName -}} - {{- else -}} - {{- printf "%s-registry-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.trivy.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.trivy.secretName -}} - {{- else -}} - {{- printf "%s-trivy-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsCoreSecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsSecretForNginx" -}} - {{- if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.nginx" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.metricsPortName" -}} - {{- if .Values.internalTLS.enabled }} - {{- printf "https-metrics" -}} - {{- else -}} - {{- printf "http-metrics" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.traceEnvs" -}} - TRACE_ENABLED: "{{ .Values.trace.enabled }}" - TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}" - TRACE_NAMESPACE: "{{ .Values.trace.namespace }}" - {{- if .Values.trace.attributes }} - TRACE_ATTRIBUTES: {{ .Values.trace.attributes | toJson | squote }} - {{- end }} - {{- if eq .Values.trace.provider "jaeger" }} - TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}" - TRACE_JAEGER_USERNAME: "{{ .Values.trace.jaeger.username }}" - TRACE_JAEGER_AGENT_HOSTNAME: "{{ .Values.trace.jaeger.agent_host }}" - TRACE_JAEGER_AGENT_PORT: "{{ .Values.trace.jaeger.agent_port }}" - {{- else }} - TRACE_OTEL_ENDPOINT: "{{ .Values.trace.otel.endpoint }}" - TRACE_OTEL_URL_PATH: "{{ .Values.trace.otel.url_path }}" - TRACE_OTEL_COMPRESSION: "{{ .Values.trace.otel.compression }}" - TRACE_OTEL_INSECURE: "{{ .Values.trace.otel.insecure }}" - TRACE_OTEL_TIMEOUT: "{{ .Values.trace.otel.timeout }}" - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForCore" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-core" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForJobservice" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-jobservice" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForRegistryCtl" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-registryctl" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceJaegerPassword" -}} - {{- if and .Values.trace.enabled (eq .Values.trace.provider "jaeger") }} - TRACE_JAEGER_PASSWORD: "{{ .Values.trace.jaeger.password | default "" | b64enc }}" - {{- end }} -{{- end -}} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "harbor.ingress.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/core/core-cm.yaml b/charts/harbor/harbor/1.14.2/templates/core/core-cm.yaml deleted file mode 100644 index 93cab01b4c..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/core/core-cm.yaml +++ /dev/null @@ -1,90 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - app.conf: |+ - appname = Harbor - runmode = prod - enablegzip = true - - [prod] - httpport = {{ ternary "8443" "8080" .Values.internalTLS.enabled }} - PORT: "{{ ternary "8443" "8080" .Values.internalTLS.enabled }}" - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "{{ template "harbor.database.host" . }}" - POSTGRESQL_PORT: "{{ template "harbor.database.port" . }}" - POSTGRESQL_USERNAME: "{{ template "harbor.database.username" . }}" - POSTGRESQL_DATABASE: "{{ template "harbor.database.coreDatabase" . }}" - POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" - EXT_ENDPOINT: "{{ .Values.externalURL }}" - CORE_URL: "{{ template "harbor.coreURL" . }}" - JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - CORE_LOCAL_URL: "{{ ternary "https://127.0.0.1:8443" "http://127.0.0.1:8080" .Values.internalTLS.enabled }}" - WITH_TRIVY: {{ .Values.trivy.enabled | quote }} - TRIVY_ADAPTER_URL: "{{ template "harbor.trivyAdapterURL" . }}" - REGISTRY_STORAGE_PROVIDER_NAME: "{{ .Values.persistence.imageChartStorage.type }}" - LOG_LEVEL: "{{ .Values.logLevel }}" - CONFIG_PATH: "/etc/core/app.conf" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}" - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.harborDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.harborDatabaseIndex) }} - _REDIS_URL_HARBOR: "{{ template "harbor.redis.urlForHarbor" . }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} - PORTAL_URL: "{{ template "harbor.portalURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - {{- if .Values.uaaSecretName }} - UAA_CA_ROOT: "/etc/core/auth-ca/auth-ca.crt" - {{- end }} - {{- if has "core" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE: "docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory" - {{- if .Values.metrics.enabled}} - METRIC_ENABLE: "true" - METRIC_PATH: "{{ .Values.metrics.core.path }}" - METRIC_PORT: "{{ .Values.metrics.core.port }}" - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: core - {{- end }} - - {{- if hasKey .Values.core "gcTimeWindowHours" }} - #make the GC time window configurable for testing - GC_TIME_WINDOW_HOURS: "{{ .Values.core.gcTimeWindowHours }}" - {{- end }} - {{- template "harbor.traceEnvsForCore" . }} - - {{- if .Values.core.artifactPullAsyncFlushDuration }} - ARTIFACT_PULL_ASYNC_FLUSH_DURATION: {{ .Values.core.artifactPullAsyncFlushDuration | quote }} - {{- end }} - - {{- if .Values.core.gdpr}} - {{- if .Values.core.gdpr.deleteUser}} - GDPR_DELETE_USER: "true" - {{- end }} - {{- if .Values.core.gdpr.auditLogsCompliant}} - GDPR_AUDIT_LOGS: "true" - {{- end }} - {{- end }} - - {{- if .Values.cache.enabled }} - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - - {{- if .Values.core.quotaUpdateProvider }} - QUOTA_UPDATE_PROVIDER: "{{ .Values.core.quotaUpdateProvider }}" - {{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/core/core-dpl.yaml b/charts/harbor/harbor/1.14.2/templates/core/core-dpl.yaml deleted file mode 100644 index 9a92b45a4f..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/core/core-dpl.yaml +++ /dev/null @@ -1,248 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: core -spec: - replicas: {{ .Values.core.replicas }} - revisionHistoryLimit: {{ .Values.core.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: core - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: core -{{- if .Values.core.podLabels }} -{{ toYaml .Values.core.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.core.podAnnotations }} -{{ toYaml .Values.core.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.core.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: core -{{- end }} -{{- end }} - containers: - - name: core - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if .Values.core.startupProbe.enabled }} - startupProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 360 - initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} - periodSeconds: 10 - {{- end }} - livenessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/core/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/core/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/core/ca.crt - {{- end }} - {{- if .Values.database.external.existingSecret }} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} - {{- if .Values.core.existingXsrfSecret }} - - name: CSRF_KEY - valueFrom: - secretKeyRef: - name: {{ .Values.core.existingXsrfSecret }} - key: {{ .Values.core.existingXsrfSecretKey }} - {{- end }} -{{- with .Values.core.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - {{- if .Values.expose.tls.enabled }} - - name: ca-download - mountPath: /etc/core/ca - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - mountPath: /etc/core/auth-ca/auth-ca.crt - subPath: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - {{- end }} - - name: psc - mountPath: /etc/core/token - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} -{{- if .Values.core.resources }} - resources: -{{ toYaml .Values.core.resources | indent 10 }} -{{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - - name: secret-key - secret: - {{- if .Values.existingSecretSecretKey }} - secretName: {{ .Values.existingSecretSecretKey }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - items: - - key: secretKey - path: key - - name: token-service-private-key - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: ca-download - secret: - {{- if .Values.caSecretName }} - secretName: {{ .Values.caSecretName }} - {{- else if eq (include "harbor.autoGenCertForIngress" .) "true" }} - secretName: "{{ template "harbor.ingress" . }}" - {{- else if eq (include "harbor.autoGenCertForNginx" .) "true" }} - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - secret: - secretName: {{ .Values.uaaSecretName }} - items: - - key: ca.crt - path: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - - name: psc - emptyDir: {} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.core.priorityClassName }} - priorityClassName: {{ .Values.core.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/core/core-pre-upgrade-job.yaml b/charts/harbor/harbor/1.14.2/templates/core/core-pre-upgrade-job.yaml deleted file mode 100644 index 43c9d3596d..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/core/core-pre-upgrade-job.yaml +++ /dev/null @@ -1,74 +0,0 @@ -{{- if .Values.enableMigrateHelmHook }} -apiVersion: batch/v1 -kind: Job -metadata: - name: migration-job - labels: -{{ include "harbor.labels" . | indent 4 }} - component: migrator - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-5" -spec: - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: migrator - spec: - restartPolicy: Never - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 120 - containers: - - name: core-job - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/harbor/harbor_core", "-mode=migrate"] - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - {{- if .Values.database.external.existingSecret }} - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/core/core-secret.yaml b/charts/harbor/harbor/1.14.2/templates/core/core-secret.yaml deleted file mode 100644 index 62a41fce80..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/core/core-secret.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.core" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.existingSecretSecretKey }} - secretKey: {{ .Values.secretKey | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingSecret }} - secret: {{ .Values.core.secret | default (include "harbor.secretKeyHelper" (dict "key" "secret" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.core.secretName }} - {{- $ca := genCA "harbor-token-ca" 365 }} - tls.key: {{ .Values.core.tokenKey | default $ca.Key | b64enc | quote }} - tls.crt: {{ .Values.core.tokenCert | default $ca.Cert | b64enc | quote }} - {{- end }} - {{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} - {{- end }} - {{- if not .Values.database.external.existingSecret }} - POSTGRESQL_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingXsrfSecret }} - CSRF_KEY: {{ .Values.core.xsrfKey | default (include "harbor.secretKeyHelper" (dict "key" "CSRF_KEY" "data" $existingSecret.data)) | default (randAlphaNum 32) | b64enc | quote }} - {{- end }} -{{- if .Values.core.configureUserSettings }} - CONFIG_OVERWRITE_JSON: {{ .Values.core.configureUserSettings | b64enc | quote }} -{{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.14.2/templates/core/core-svc.yaml b/charts/harbor/harbor/1.14.2/templates/core/core-svc.yaml deleted file mode 100644 index 0d2cfb2915..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/core/core-svc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.core.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - name: {{ ternary "https-web" "http-web" .Values.internalTLS.enabled }} - port: {{ template "harbor.core.servicePort" . }} - targetPort: {{ template "harbor.core.containerPort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.core.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: core diff --git a/charts/harbor/harbor/1.14.2/templates/core/core-tls.yaml b/charts/harbor/harbor/1.14.2/templates/core/core-tls.yaml deleted file mode 100644 index c52148f0d9..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/core/core-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.core.crt\" is required!" .Values.internalTLS.core.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.core.key\" is required!" .Values.internalTLS.core.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/database/database-secret.yaml b/charts/harbor/harbor/1.14.2/templates/database/database-secret.yaml deleted file mode 100644 index 864aff4a18..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/database/database-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - POSTGRES_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end -}} diff --git a/charts/harbor/harbor/1.14.2/templates/database/database-ss.yaml b/charts/harbor/harbor/1.14.2/templates/database/database-ss.yaml deleted file mode 100644 index 3b08b07ef1..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/database/database-ss.yaml +++ /dev/null @@ -1,168 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -{{- $database := .Values.persistence.persistentVolumeClaim.database -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: database -spec: - replicas: 1 - serviceName: "{{ template "harbor.database" . }}" - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: database - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: database -{{- if .Values.database.podLabels }} -{{ toYaml .Values.database.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} -{{- if .Values.database.podAnnotations }} -{{ toYaml .Values.database.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.database.internal.serviceAccountName }} - serviceAccountName: {{ .Values.database.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.database.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - # as we change the data directory to a sub folder to support psp, the init container here - # is used to migrate the existing data. See https://github.com/goharbor/harbor-helm/issues/756 - # for more detail. - # we may remove it after several releases - - name: "data-migrator" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "[ -e /var/lib/postgresql/data/postgresql.conf ] && [ ! -d /var/lib/postgresql/data/pgdata ] && mkdir -m 0700 /var/lib/postgresql/data/pgdata && mv /var/lib/postgresql/data/* /var/lib/postgresql/data/pgdata/ || true"] -{{- if .Values.database.internal.initContainer.migrator.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.migrator.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - # with "fsGroup" set, each time a volume is mounted, Kubernetes must recursively chown() and chmod() all the files and directories inside the volume - # this causes the postgresql reports the "data directory /var/lib/postgresql/data/pgdata has group or world access" issue when using some CSIs e.g. Ceph - # use this init container to correct the permission - # as "fsGroup" applied before the init container running, the container has enough permission to execute the command - - name: "data-permissions-ensurer" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/bin/sh"] - args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"] -{{- if .Values.database.internal.initContainer.permissions.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.permissions.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - containers: - - name: database - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.livenessProbe.timeoutSeconds }} - readinessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 1 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.readinessProbe.timeoutSeconds }} -{{- if .Values.database.internal.resources }} - resources: -{{ toYaml .Values.database.internal.resources | indent 10 }} -{{- end }} - envFrom: - - secretRef: - name: "{{ template "harbor.database" . }}" - env: - # put the data into a sub directory to avoid the permission issue in k8s with restricted psp enabled - # more detail refer to https://github.com/goharbor/harbor-helm/issues/756 - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" -{{- with .Values.database.internal.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - - name: shm-volume - mountPath: /dev/shm - volumes: - - name: shm-volume - emptyDir: - medium: Memory - sizeLimit: {{ .Values.database.internal.shmSizeLimit }} - {{- if not .Values.persistence.enabled }} - - name: "database-data" - emptyDir: {} - {{- else if $database.existingClaim }} - - name: "database-data" - persistentVolumeClaim: - claimName: {{ $database.existingClaim }} - {{- end -}} - {{- with .Values.database.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.database.internal.priorityClassName }} - priorityClassName: {{ .Values.database.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $database.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $database.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $database.accessMode | quote }}] - {{- if $database.storageClass }} - {{- if (eq "-" $database.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $database.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $database.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.14.2/templates/database/database-svc.yaml b/charts/harbor/harbor/1.14.2/templates/database/database-svc.yaml deleted file mode 100644 index 6475048cd9..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/database/database-svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 5432 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: database -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/exporter/exporter-cm-env.yaml b/charts/harbor/harbor/1.14.2/templates/exporter/exporter-cm-env.yaml deleted file mode 100644 index 0bf4e7d905..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/exporter/exporter-cm-env.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.exporter" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - LOG_LEVEL: "{{ .Values.logLevel }}" - HARBOR_EXPORTER_PORT: "{{ .Values.metrics.exporter.port }}" - HARBOR_EXPORTER_METRICS_PATH: "{{ .Values.metrics.exporter.path }}" - HARBOR_EXPORTER_METRICS_ENABLED: "{{ .Values.metrics.enabled }}" - HARBOR_EXPORTER_CACHE_TIME: "{{ .Values.exporter.cacheDuration }}" - HARBOR_EXPORTER_CACHE_CLEAN_INTERVAL: "{{ .Values.exporter.cacheCleanInterval }}" - HARBOR_METRIC_NAMESPACE: harbor - HARBOR_METRIC_SUBSYSTEM: exporter - HARBOR_REDIS_URL: "{{ template "harbor.redis.urlForJobservice" . }}" - HARBOR_REDIS_NAMESPACE: harbor_job_service_namespace - HARBOR_REDIS_TIMEOUT: "3600" - HARBOR_SERVICE_SCHEME: "{{ template "harbor.component.scheme" . }}" - HARBOR_SERVICE_HOST: "{{ template "harbor.core" . }}" - HARBOR_SERVICE_PORT: "{{ template "harbor.core.servicePort" . }}" - HARBOR_DATABASE_HOST: "{{ template "harbor.database.host" . }}" - HARBOR_DATABASE_PORT: "{{ template "harbor.database.port" . }}" - HARBOR_DATABASE_USERNAME: "{{ template "harbor.database.username" . }}" - HARBOR_DATABASE_DBNAME: "{{ template "harbor.database.coreDatabase" . }}" - HARBOR_DATABASE_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - HARBOR_DATABASE_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - HARBOR_DATABASE_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" -{{- end}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/exporter/exporter-dpl.yaml b/charts/harbor/harbor/1.14.2/templates/exporter/exporter-dpl.yaml deleted file mode 100644 index 6d2e1f53ac..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/exporter/exporter-dpl.yaml +++ /dev/null @@ -1,139 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: exporter -spec: - replicas: {{ .Values.exporter.replicas }} - revisionHistoryLimit: {{ .Values.exporter.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: exporter - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: exporter -{{- if .Values.exporter.podLabels }} -{{ toYaml .Values.exporter.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.exporter.podAnnotations }} -{{ toYaml .Values.exporter.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.exporter.serviceAccountName }} - serviceAccountName: {{ .Values.exporter.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.exporter.automountServiceAccountToken | default false }} -{{- with .Values.exporter.topologySpreadConstraints }} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: exporter -{{- end }} -{{- end }} - containers: - - name: exporter - image: {{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 30 - periodSeconds: 10 - args: ["-log-level", "{{ .Values.logLevel }}"] - envFrom: - - configMapRef: - name: "{{ template "harbor.exporter" . }}-env" - - secretRef: - name: "{{ template "harbor.exporter" . }}" - env: - {{- if .Values.database.external.existingSecret }} - - name: HARBOR_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} -{{- if .Values.exporter.resources }} - resources: -{{ toYaml .Values.exporter.resources | indent 10 }} -{{- end }} -{{- with .Values.exporter.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - # There are some metric data are collectd from harbor core. - # When internal TLS is enabled, the Exporter need the CA file to collect these data. - {{- end }} - volumes: - - name: config - secret: - secretName: "{{ template "harbor.exporter" . }}" - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.exporter.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.exporter.priorityClassName }} - priorityClassName: {{ .Values.exporter.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.14.2/templates/exporter/exporter-secret.yaml b/charts/harbor/harbor/1.14.2/templates/exporter/exporter-secret.yaml deleted file mode 100644 index 434a1bf689..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/exporter/exporter-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: -{{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} -{{- end }} -{{- if not .Values.database.external.existingSecret }} - HARBOR_DATABASE_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/exporter/exporter-svc.yaml b/charts/harbor/harbor/1.14.2/templates/exporter/exporter-svc.yaml deleted file mode 100644 index 4a6f3fdec6..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/exporter/exporter-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.exporter" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.exporter.port }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: exporter -{{ end }} diff --git a/charts/harbor/harbor/1.14.2/templates/ingress/ingress.yaml b/charts/harbor/harbor/1.14.2/templates/ingress/ingress.yaml deleted file mode 100644 index e4c06939c6..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/ingress/ingress.yaml +++ /dev/null @@ -1,145 +0,0 @@ -{{- if eq .Values.expose.type "ingress" }} -{{- $ingress := .Values.expose.ingress -}} -{{- $tls := .Values.expose.tls -}} -{{- if eq .Values.expose.ingress.controller "gce" }} - {{- $_ := set . "portal_path" "/*" -}} - {{- $_ := set . "api_path" "/api/*" -}} - {{- $_ := set . "service_path" "/service/*" -}} - {{- $_ := set . "v2_path" "/v2/*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/*" -}} - {{- $_ := set . "controller_path" "/c/*" -}} -{{- else if eq .Values.expose.ingress.controller "ncp" }} - {{- $_ := set . "portal_path" "/.*" -}} - {{- $_ := set . "api_path" "/api/.*" -}} - {{- $_ := set . "service_path" "/service/.*" -}} - {{- $_ := set . "v2_path" "/v2/.*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}} - {{- $_ := set . "controller_path" "/c/.*" -}} -{{- else }} - {{- $_ := set . "portal_path" "/" -}} - {{- $_ := set . "api_path" "/api/" -}} - {{- $_ := set . "service_path" "/service/" -}} - {{- $_ := set . "v2_path" "/v2/" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/" -}} - {{- $_ := set . "controller_path" "/c/" -}} -{{- end }} - ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.harbor.labels }} -{{ toYaml $ingress.harbor.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if .Values.internalTLS.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" -{{- end }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -{{- if $ingress.harbor.annotations }} -{{ toYaml $ingress.harbor.annotations | indent 4 }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsCoreSecretForIngress" . }} - {{- if $ingress.hosts.core }} - hosts: - - {{ $ingress.hosts.core }} - {{- end }} - {{- end }} - rules: - - http: - paths: -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - - path: {{ .api_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - backend: - serviceName: {{ template "harbor.portal" . }} - servicePort: {{ template "harbor.portal.servicePort" . }} -{{- else }} - - path: {{ .api_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.portal" . }} - port: - number: {{ template "harbor.portal.servicePort" . }} -{{- end }} - {{- if $ingress.hosts.core }} - host: {{ $ingress.hosts.core }} - {{- end }} - -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/ingress/secret.yaml b/charts/harbor/harbor/1.14.2/templates/ingress/secret.yaml deleted file mode 100644 index 41507b3dd9..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/ingress/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForIngress" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cert := genSignedCert .Values.expose.ingress.hosts.core nil (list .Values.expose.ingress.hosts.core) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/internal/auto-tls.yaml b/charts/harbor/harbor/1.14.2/templates/internal/auto-tls.yaml deleted file mode 100644 index da5f5e2c7b..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/internal/auto-tls.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} -{{- $ca := genCA "harbor-internal-ca" 365 }} -{{- $coreCN := (include "harbor.core" .) }} -{{- $coreCrt := genSignedCert $coreCN (list "127.0.0.1") (list "localhost" $coreCN) 365 $ca }} -{{- $jsCN := (include "harbor.jobservice" .) }} -{{- $jsCrt := genSignedCert $jsCN nil (list $jsCN) 365 $ca }} -{{- $regCN := (include "harbor.registry" .) }} -{{- $regCrt := genSignedCert $regCN nil (list $regCN) 365 $ca }} -{{- $portalCN := (include "harbor.portal" .) }} -{{- $portalCrt := genSignedCert $portalCN nil (list $portalCN) 365 $ca }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $coreCrt.Cert | b64enc | quote }} - tls.key: {{ $coreCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $jsCrt.Cert | b64enc | quote }} - tls.key: {{ $jsCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $regCrt.Cert | b64enc | quote }} - tls.key: {{ $regCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $portalCrt.Cert | b64enc | quote }} - tls.key: {{ $portalCrt.Key | b64enc | quote }} - -{{- if and .Values.trivy.enabled}} ---- -{{- $trivyCN := (include "harbor.trivy" .) }} -{{- $trivyCrt := genSignedCert $trivyCN nil (list $trivyCN) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $trivyCrt.Cert | b64enc | quote }} - tls.key: {{ $trivyCrt.Key | b64enc | quote }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-cm-env.yaml b/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-cm-env.yaml deleted file mode 100644 index 8411c7a47c..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-cm-env.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - CORE_URL: "{{ template "harbor.coreURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - - JOBSERVICE_WEBHOOK_JOB_MAX_RETRY: "{{ .Values.jobservice.notification.webhook_job_max_retry }}" - JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT: "{{ .Values.jobservice.notification.webhook_job_http_client_timeout }}" - - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.metrics.enabled}} - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: jobservice - {{- end }} - {{- template "harbor.traceEnvsForJobservice" . }} - {{- if .Values.cache.enabled }} - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-cm.yaml b/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-cm.yaml deleted file mode 100644 index 8211c62209..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-cm.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - #Server listening port - protocol: "{{ template "harbor.component.scheme" . }}" - port: {{ template "harbor.jobservice.containerPort". }} - {{- if .Values.internalTLS.enabled }} - https_config: - cert: "/etc/harbor/ssl/jobservice/tls.crt" - key: "/etc/harbor/ssl/jobservice/tls.key" - {{- end }} - worker_pool: - workers: {{ .Values.jobservice.maxJobWorkers }} - backend: "redis" - redis_pool: - redis_url: "{{ template "harbor.redis.urlForJobservice" . }}" - namespace: "harbor_job_service_namespace" - idle_timeout_second: 3600 - job_loggers: - {{- if has "file" .Values.jobservice.jobLoggers }} - - name: "FILE" - level: {{ .Values.logLevel | upper }} - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - {{- end }} - {{- if has "database" .Values.jobservice.jobLoggers }} - - name: "DB" - level: {{ .Values.logLevel | upper }} - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - {{- end }} - {{- if has "stdout" .Values.jobservice.jobLoggers }} - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - {{- end }} - metric: - enabled: {{ .Values.metrics.enabled }} - path: {{ .Values.metrics.jobservice.path }} - port: {{ .Values.metrics.jobservice.port }} - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: {{ .Values.jobservice.reaper.max_update_hours }} - # the max time for execution in running state without new task created - max_dangling_hours: {{ .Values.jobservice.reaper.max_dangling_hours }} diff --git a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-dpl.yaml b/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-dpl.yaml deleted file mode 100644 index e39e77e6ed..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-dpl.yaml +++ /dev/null @@ -1,173 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - replicas: {{ .Values.jobservice.replicas }} - revisionHistoryLimit: {{ .Values.jobservice.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: jobservice -{{- if .Values.jobservice.podLabels }} -{{ toYaml .Values.jobservice.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} - checksum/configmap-env: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/jobservice/jobservice-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.jobservice.podAnnotations }} -{{ toYaml .Values.jobservice.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.jobservice.serviceAccountName }} - serviceAccountName: {{ .Values.jobservice.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.jobservice.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: jobservice -{{- end }} -{{- end }} - containers: - - name: jobservice - image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.jobservice.resources }} - resources: -{{ toYaml .Values.jobservice.resources | indent 10 }} -{{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - {{- if .Values.jobservice.existingSecret }} - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/jobservice/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/jobservice/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/jobservice/ca.crt - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} -{{- with .Values.jobservice.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.jobservice" . }}-env" - - secretRef: - name: "{{ template "harbor.jobservice" . }}" - ports: - - containerPort: {{ template "harbor.jobservice.containerPort" . }} - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.subPath }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - mountPath: /etc/harbor/ssl/jobservice - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: jobservice-config - configMap: - name: "{{ template "harbor.jobservice" . }}" - - name: job-logs - {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLoggers) }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim | default (include "harbor.jobservice" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.jobservice.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.jobservice.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.jobservice.priorityClassName }} - priorityClassName: {{ .Values.jobservice.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-pvc.yaml b/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-pvc.yaml deleted file mode 100644 index a6b8b8bd38..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-pvc.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- $jobLog := .Values.persistence.persistentVolumeClaim.jobservice.jobLog -}} -{{- if and .Values.persistence.enabled (not $jobLog.existingClaim) (has "file" .Values.jobservice.jobLoggers) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.jobservice" . }} - annotations: - {{- range $key, $value := $jobLog.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice -spec: - accessModes: - - {{ $jobLog.accessMode }} - resources: - requests: - storage: {{ $jobLog.size }} - {{- if $jobLog.storageClass }} - {{- if eq "-" $jobLog.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $jobLog.storageClass }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-secrets.yaml b/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-secrets.yaml deleted file mode 100644 index eeb00bde00..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-secrets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.jobservice" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.jobservice.existingSecret }} - JOBSERVICE_SECRET: {{ .Values.jobservice.secret | default (include "harbor.secretKeyHelper" (dict "key" "JOBSERVICE_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-svc.yaml b/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-svc.yaml deleted file mode 100644 index d2b7a47fd4..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-svc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }} - port: {{ template "harbor.jobservice.servicePort" . }} - targetPort: {{ template "harbor.jobservice.containerPort" . }} -{{- if .Values.metrics.enabled }} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.jobservice.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice diff --git a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-tls.yaml b/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-tls.yaml deleted file mode 100644 index 234cb39995..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/jobservice/jobservice-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.jobservice.crt\" is required!" .Values.internalTLS.jobservice.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.jobservice.key\" is required!" .Values.internalTLS.jobservice.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/metrics/metrics-svcmon.yaml b/charts/harbor/harbor/1.14.2/templates/metrics/metrics-svcmon.yaml deleted file mode 100644 index 1122ef01ef..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/metrics/metrics-svcmon.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "harbor.fullname" . }} - labels: {{ include "harbor.labels" . | nindent 4 }} -{{- if .Values.metrics.serviceMonitor.additionalLabels }} -{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} -{{- end }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: {{ template "harbor.metricsPortName" . }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - honorLabels: true -{{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.metrics.serviceMonitor.relabelings | indent 4 }} -{{- end }} - selector: - matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/nginx/configmap-http.yaml b/charts/harbor/harbor/1.14.2/templates/nginx/configmap-http.yaml deleted file mode 100644 index c4b8354d06..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/nginx/configmap-http.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server {{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled}} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end }} - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - proxy_send_timeout 900; - proxy_read_timeout 900; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/nginx/configmap-https.yaml b/charts/harbor/harbor/1.14.2/templates/nginx/configmap-https.yaml deleted file mode 100644 index 56c943a619..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/nginx/configmap-https.yaml +++ /dev/null @@ -1,187 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server "{{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}"; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8443 ssl; - {{- end }} - # server_name harbordomain.com; - server_tokens off; - # SSL - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - # Add extra headers - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; HttpOnly; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end}} - #server_name harbordomain.com; - return 301 https://$host$request_uri; - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/nginx/deployment.yaml b/charts/harbor/harbor/1.14.2/templates/nginx/deployment.yaml deleted file mode 100644 index 8290d497b6..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/nginx/deployment.yaml +++ /dev/null @@ -1,126 +0,0 @@ -{{- if ne .Values.expose.type "ingress" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: nginx -spec: - replicas: {{ .Values.nginx.replicas }} - revisionHistoryLimit: {{ .Values.nginx.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: nginx - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: nginx -{{- if .Values.nginx.podLabels }} -{{ toYaml .Values.nginx.podLabels | indent 8 }} -{{- end }} - annotations: - {{- if not .Values.expose.tls.enabled }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} - {{- else }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-https.yaml") . | sha256sum }} - {{- end }} - {{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} - checksum/secret: {{ include (print $.Template.BasePath "/nginx/secret.yaml") . | sha256sum }} - {{- end }} -{{- if .Values.nginx.podAnnotations }} -{{ toYaml .Values.nginx.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- if .Values.nginx.serviceAccountName }} - serviceAccountName: {{ .Values.nginx.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.nginx.automountServiceAccountToken | default false }} -{{- with .Values.nginx.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: nginx -{{- end }} -{{- end }} - containers: - - name: nginx - image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - {{- $_ := set . "scheme" "HTTP" -}} - {{- $_ := set . "port" "8080" -}} - {{- if .Values.expose.tls.enabled }} - {{- $_ := set . "scheme" "HTTPS" -}} - {{- $_ := set . "port" "8443" -}} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.nginx.resources }} - resources: -{{ toYaml .Values.nginx.resources | indent 10 }} -{{- end }} -{{- with .Values.nginx.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - ports: - - containerPort: 8080 - - containerPort: 8443 - - containerPort: 4443 - volumeMounts: - - name: config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.expose.tls.enabled }} - - name: certificate - mountPath: /etc/nginx/cert - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.nginx" . }} - {{- if .Values.expose.tls.enabled }} - - name: certificate - secret: - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- with .Values.nginx.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nginx.priorityClassName }} - priorityClassName: {{ .Values.nginx.priorityClassName }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/nginx/secret.yaml b/charts/harbor/harbor/1.14.2/templates/nginx/secret.yaml deleted file mode 100644 index c819c556d9..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/nginx/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cn := (required "The \"expose.tls.auto.commonName\" is required!" .Values.expose.tls.auto.commonName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if regexMatch `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` $cn }} - {{- $cert := genSignedCert $cn (list $cn) nil 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- else }} - {{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/nginx/service.yaml b/charts/harbor/harbor/1.14.2/templates/nginx/service.yaml deleted file mode 100644 index 205a805ea4..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/nginx/service.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }} -apiVersion: v1 -kind: Service -metadata: -{{- if eq .Values.expose.type "clusterIP" }} -{{- $clusterIP := .Values.expose.clusterIP }} - name: {{ $clusterIP.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $clusterIP.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: ClusterIP - {{- if .Values.expose.clusterIP.staticClusterIP }} - clusterIP: {{ .Values.expose.clusterIP.staticClusterIP }} - {{- end }} - ports: - - name: http - port: {{ $clusterIP.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $clusterIP.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- else if eq .Values.expose.type "nodePort" }} -{{- $nodePort := .Values.expose.nodePort }} - name: {{ $nodePort.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - type: NodePort - ports: - - name: http - port: {{ $nodePort.ports.http.port }} - targetPort: 8080 - {{- if $nodePort.ports.http.nodePort }} - nodePort: {{ $nodePort.ports.http.nodePort }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $nodePort.ports.https.port }} - targetPort: 8443 - {{- if $nodePort.ports.https.nodePort }} - nodePort: {{ $nodePort.ports.https.nodePort }} - {{- end }} - {{- end }} -{{- else if eq .Values.expose.type "loadBalancer" }} -{{- $loadBalancer := .Values.expose.loadBalancer }} - name: {{ $loadBalancer.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with $loadBalancer.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: LoadBalancer - {{- with $loadBalancer.sourceRanges }} - loadBalancerSourceRanges: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $loadBalancer.IP }} - loadBalancerIP: {{ $loadBalancer.IP }} - {{- end }} - ports: - - name: http - port: {{ $loadBalancer.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $loadBalancer.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: nginx -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/portal/configmap.yaml b/charts/harbor/harbor/1.14.2/templates/portal/configmap.yaml deleted file mode 100644 index 7b2118e721..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/portal/configmap.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - events { - worker_connections 1024; - } - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - {{- if .Values.internalTLS.enabled }} - {{- if .Values.ipFamily.ipv4.enabled}} - listen {{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - # SSL - ssl_certificate /etc/harbor/ssl/portal/tls.crt; - ssl_certificate_key /etc/harbor/ssl/portal/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - {{- else }} - {{- if .Values.ipFamily.ipv4.enabled }} - listen {{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- end }} - server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location /devcenter-api-2.0 { - try_files $uri $uri/ /swagger-ui-index.html; - } - location / { - try_files $uri $uri/ /index.html; - } - location = /index.html { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - } - } diff --git a/charts/harbor/harbor/1.14.2/templates/portal/deployment.yaml b/charts/harbor/harbor/1.14.2/templates/portal/deployment.yaml deleted file mode 100644 index 959a3fd7b5..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/portal/deployment.yaml +++ /dev/null @@ -1,114 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: portal -spec: - replicas: {{ .Values.portal.replicas }} - revisionHistoryLimit: {{ .Values.portal.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: portal - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: portal -{{- if .Values.portal.podLabels }} -{{ toYaml .Values.portal.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} -{{- end }} - checksum/configmap: {{ include (print $.Template.BasePath "/portal/configmap.yaml") . | sha256sum }} -{{- if .Values.portal.podAnnotations }} -{{ toYaml .Values.portal.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- if .Values.portal.serviceAccountName }} - serviceAccountName: {{ .Values.portal.serviceAccountName }} -{{- end }} - automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }} -{{- with .Values.portal.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: portal -{{- end }} -{{- end }} - containers: - - name: portal - image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} -{{- if .Values.portal.resources }} - resources: -{{ toYaml .Values.portal.resources | indent 10 }} -{{- end }} -{{- with .Values.portal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: {{ template "harbor.portal.containerPort" . }} - volumeMounts: - - name: portal-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - mountPath: /etc/harbor/ssl/portal - {{- end }} - volumes: - - name: portal-config - configMap: - name: "{{ template "harbor.portal" . }}" - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.portal.secretName" . }} - {{- end }} - {{- with .Values.portal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.portal.priorityClassName }} - priorityClassName: {{ .Values.portal.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/portal/service.yaml b/charts/harbor/harbor/1.14.2/templates/portal/service.yaml deleted file mode 100644 index d00026da46..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/portal/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.portal.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: {{ template "harbor.portal.servicePort" . }} - targetPort: {{ template "harbor.portal.containerPort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: portal diff --git a/charts/harbor/harbor/1.14.2/templates/portal/tls.yaml b/charts/harbor/harbor/1.14.2/templates/portal/tls.yaml deleted file mode 100644 index de63f4e813..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/portal/tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.portal.crt\" is required!" .Values.internalTLS.portal.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.portal.key\" is required!" .Values.internalTLS.portal.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/redis/service.yaml b/charts/harbor/harbor/1.14.2/templates/redis/service.yaml deleted file mode 100644 index 79c95c3e05..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/redis/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 6379 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: redis -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/redis/statefulset.yaml b/charts/harbor/harbor/1.14.2/templates/redis/statefulset.yaml deleted file mode 100644 index 371b0fd5aa..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/redis/statefulset.yaml +++ /dev/null @@ -1,116 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -{{- $redis := .Values.persistence.persistentVolumeClaim.redis -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: redis -spec: - replicas: 1 - serviceName: {{ template "harbor.redis" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: redis - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: redis -{{- if .Values.redis.podLabels }} -{{ toYaml .Values.redis.podLabels | indent 8 }} -{{- end }} -{{- if .Values.redis.podAnnotations }} - annotations: -{{ toYaml .Values.redis.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.redis.internal.serviceAccountName }} - serviceAccountName: {{ .Values.redis.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.redis.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - containers: - - name: redis - image: {{ .Values.redis.internal.image.repository }}:{{ .Values.redis.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.redis.internal.resources }} - resources: -{{ toYaml .Values.redis.internal.resources | indent 10 }} -{{- end }} -{{- with .Values.redis.internal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: {{ $redis.subPath }} - {{- if not .Values.persistence.enabled }} - volumes: - - name: data - emptyDir: {} - {{- else if $redis.existingClaim }} - volumes: - - name: data - persistentVolumeClaim: - claimName: {{ $redis.existingClaim }} - {{- end -}} - {{- with .Values.redis.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.redis.internal.priorityClassName }} - priorityClassName: {{ .Values.redis.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $redis.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $redis.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $redis.accessMode | quote }}] - {{- if $redis.storageClass }} - {{- if (eq "-" $redis.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $redis.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $redis.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.14.2/templates/registry/registry-cm.yaml b/charts/harbor/harbor/1.14.2/templates/registry/registry-cm.yaml deleted file mode 100644 index 4f7056c384..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/registry/registry-cm.yaml +++ /dev/null @@ -1,246 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - version: 0.1 - log: - {{- if eq .Values.logLevel "warning" }} - level: warn - {{- else if eq .Values.logLevel "fatal" }} - level: error - {{- else }} - level: {{ .Values.logLevel }} - {{- end }} - fields: - service: registry - storage: - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if eq $type "filesystem" }} - filesystem: - rootdirectory: {{ $storage.filesystem.rootdirectory }} - {{- if $storage.filesystem.maxthreads }} - maxthreads: {{ $storage.filesystem.maxthreads }} - {{- end }} - {{- else if eq $type "azure" }} - azure: - accountname: {{ $storage.azure.accountname }} - container: {{ $storage.azure.container }} - {{- if $storage.azure.realm }} - realm: {{ $storage.azure.realm }} - {{- end }} - {{- else if eq $type "gcs" }} - gcs: - bucket: {{ $storage.gcs.bucket }} - {{- if not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity }} - keyfile: /etc/registry/gcs-key.json - {{- end }} - {{- if $storage.gcs.rootdirectory }} - rootdirectory: {{ $storage.gcs.rootdirectory }} - {{- end }} - {{- if $storage.gcs.chunksize }} - chunksize: {{ $storage.gcs.chunksize }} - {{- end }} - {{- else if eq $type "s3" }} - s3: - region: {{ $storage.s3.region }} - bucket: {{ $storage.s3.bucket }} - {{- if $storage.s3.regionendpoint }} - regionendpoint: {{ $storage.s3.regionendpoint }} - {{- end }} - {{- if $storage.s3.encrypt }} - encrypt: {{ $storage.s3.encrypt }} - {{- end }} - {{- if $storage.s3.keyid }} - keyid: {{ $storage.s3.keyid }} - {{- end }} - {{- if $storage.s3.secure }} - secure: {{ $storage.s3.secure }} - {{- end }} - {{- if and $storage.s3.secure $storage.s3.skipverify }} - skipverify: {{ $storage.s3.skipverify }} - {{- end }} - {{- if $storage.s3.v4auth }} - v4auth: {{ $storage.s3.v4auth }} - {{- end }} - {{- if $storage.s3.chunksize }} - chunksize: {{ $storage.s3.chunksize }} - {{- end }} - {{- if $storage.s3.rootdirectory }} - rootdirectory: {{ $storage.s3.rootdirectory }} - {{- end }} - {{- if $storage.s3.storageclass }} - storageclass: {{ $storage.s3.storageclass }} - {{- end }} - {{- if $storage.s3.multipartcopychunksize }} - multipartcopychunksize: {{ $storage.s3.multipartcopychunksize }} - {{- end }} - {{- if $storage.s3.multipartcopymaxconcurrency }} - multipartcopymaxconcurrency: {{ $storage.s3.multipartcopymaxconcurrency }} - {{- end }} - {{- if $storage.s3.multipartcopythresholdsize }} - multipartcopythresholdsize: {{ $storage.s3.multipartcopythresholdsize }} - {{- end }} - {{- else if eq $type "swift" }} - swift: - authurl: {{ $storage.swift.authurl }} - username: {{ $storage.swift.username }} - container: {{ $storage.swift.container }} - {{- if $storage.swift.region }} - region: {{ $storage.swift.region }} - {{- end }} - {{- if $storage.swift.tenant }} - tenant: {{ $storage.swift.tenant }} - {{- end }} - {{- if $storage.swift.tenantid }} - tenantid: {{ $storage.swift.tenantid }} - {{- end }} - {{- if $storage.swift.domain }} - domain: {{ $storage.swift.domain }} - {{- end }} - {{- if $storage.swift.domainid }} - domainid: {{ $storage.swift.domainid }} - {{- end }} - {{- if $storage.swift.trustid }} - trustid: {{ $storage.swift.trustid }} - {{- end }} - {{- if $storage.swift.insecureskipverify }} - insecureskipverify: {{ $storage.swift.insecureskipverify }} - {{- end }} - {{- if $storage.swift.chunksize }} - chunksize: {{ $storage.swift.chunksize }} - {{- end }} - {{- if $storage.swift.prefix }} - prefix: {{ $storage.swift.prefix }} - {{- end }} - {{- if $storage.swift.authversion }} - authversion: {{ $storage.swift.authversion }} - {{- end }} - {{- if $storage.swift.endpointtype }} - endpointtype: {{ $storage.swift.endpointtype }} - {{- end }} - {{- if $storage.swift.tempurlcontainerkey }} - tempurlcontainerkey: {{ $storage.swift.tempurlcontainerkey }} - {{- end }} - {{- if $storage.swift.tempurlmethods }} - tempurlmethods: {{ $storage.swift.tempurlmethods }} - {{- end }} - {{- else if eq $type "oss" }} - oss: - accesskeyid: {{ $storage.oss.accesskeyid }} - region: {{ $storage.oss.region }} - bucket: {{ $storage.oss.bucket }} - {{- if $storage.oss.endpoint }} - endpoint: {{ $storage.oss.bucket }}.{{ $storage.oss.endpoint }} - {{- end }} - {{- if $storage.oss.internal }} - internal: {{ $storage.oss.internal }} - {{- end }} - {{- if $storage.oss.encrypt }} - encrypt: {{ $storage.oss.encrypt }} - {{- end }} - {{- if $storage.oss.secure }} - secure: {{ $storage.oss.secure }} - {{- end }} - {{- if $storage.oss.chunksize }} - chunksize: {{ $storage.oss.chunksize }} - {{- end }} - {{- if $storage.oss.rootdirectory }} - rootdirectory: {{ $storage.oss.rootdirectory }} - {{- end }} - {{- end }} - cache: - layerinfo: redis - maintenance: - uploadpurging: - {{- if .Values.registry.upload_purging.enabled }} - enabled: true - age: {{ .Values.registry.upload_purging.age }} - interval: {{ .Values.registry.upload_purging.interval }} - dryrun: {{ .Values.registry.upload_purging.dryrun }} - {{- else }} - enabled: false - {{- end }} - delete: - enabled: true - redirect: - disable: {{ $storage.disableredirect }} - redis: - addr: {{ template "harbor.redis.addr" . }} - {{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }} - sentinelMasterSet: {{ template "harbor.redis.masterSet" . }} - {{- end }} - db: {{ template "harbor.redis.dbForRegistry" . }} - {{- if not (eq (include "harbor.redis.password" .) "") }} - password: {{ template "harbor.redis.password" . }} - {{- end }} - readtimeout: 10s - writetimeout: 10s - dialtimeout: 10s - pool: - maxidle: 100 - maxactive: 500 - idletimeout: 60s - http: - addr: :{{ template "harbor.registry.containerPort" . }} - relativeurls: {{ .Values.registry.relativeurls }} - {{- if .Values.internalTLS.enabled }} - tls: - certificate: /etc/harbor/ssl/registry/tls.crt - key: /etc/harbor/ssl/registry/tls.key - minimumtls: tls1.2 - {{- end }} - # set via environment variable - # secret: placeholder - debug: - {{- if .Values.metrics.enabled}} - addr: :{{ .Values.metrics.registry.port }} - prometheus: - enabled: true - path: {{ .Values.metrics.registry.path }} - {{- else }} - addr: localhost:5001 - {{- end }} - auth: - htpasswd: - realm: harbor-registry-basic-realm - path: /etc/registry/passwd - validation: - disabled: true - compatibility: - schema1: - enabled: true - - {{- if .Values.registry.middleware.enabled }} - {{- $middleware := .Values.registry.middleware }} - {{- $middlewareType := $middleware.type }} - {{- if eq $middlewareType "cloudFront" }} - middleware: - storage: - - name: cloudfront - options: - baseurl: {{ $middleware.cloudFront.baseurl }} - privatekey: /etc/registry/pk.pem - keypairid: {{ $middleware.cloudFront.keypairid }} - duration: {{ $middleware.cloudFront.duration }} - ipfilteredby: {{ $middleware.cloudFront.ipfilteredby }} - {{- end }} - {{- end }} - ctl-config.yml: |+ - --- - {{- if .Values.internalTLS.enabled }} - protocol: "https" - port: 8443 - https_config: - cert: "/etc/harbor/ssl/registry/tls.crt" - key: "/etc/harbor/ssl/registry/tls.key" - {{- else }} - protocol: "http" - port: 8080 - {{- end }} - log_level: {{ .Values.logLevel }} - registry_config: "/etc/registry/config.yml" diff --git a/charts/harbor/harbor/1.14.2/templates/registry/registry-dpl.yaml b/charts/harbor/harbor/1.14.2/templates/registry/registry-dpl.yaml deleted file mode 100644 index dc4a833477..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/registry/registry-dpl.yaml +++ /dev/null @@ -1,419 +0,0 @@ -{{- $storage := .Values.persistence.imageChartStorage }} -{{- $type := $storage.type }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - replicas: {{ .Values.registry.replicas }} - revisionHistoryLimit: {{ .Values.registry.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: registry - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: registry -{{- if .Values.registry.podLabels }} -{{ toYaml .Values.registry.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/registry/registry-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.registry.podAnnotations }} -{{ toYaml .Values.registry.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - fsGroupChangePolicy: OnRootMismatch -{{- if .Values.registry.serviceAccountName }} - serviceAccountName: {{ .Values.registry.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.registry.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: registry -{{- end }} -{{- end }} - containers: - - name: registry - image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.registry.resources }} - resources: -{{ toYaml .Values.registry.registry.resources | indent 10 }} -{{- end }} - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: "{{ template "harbor.registry" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.registry.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registry.containerPort" . }} - - containerPort: 5001 - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-htpasswd - mountPath: /etc/registry/passwd - subPath: passwd - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - mountPath: /etc/registry/pk.pem - subPath: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - - name: registryctl - image: {{ .Values.registry.controller.image.repository }}:{{ .Values.registry.controller.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.controller.resources }} - resources: -{{ toYaml .Values.registry.controller.resources | indent 10 }} -{{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.registryCtl" . }}" - - secretRef: - name: "{{ template "harbor.registry" . }}" - - secretRef: - name: "{{ template "harbor.registryCtl" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.controller.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registryctl.containerPort" . }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: registry-htpasswd - secret: - {{- if not .Values.registry.credentials.existingSecret }} - secretName: {{ template "harbor.registry" . }}-htpasswd - {{ else }} - secretName: {{ .Values.registry.credentials.existingSecret }} - {{- end }} - items: - - key: REGISTRY_HTPASSWD - path: passwd - - name: registry-config - configMap: - name: "{{ template "harbor.registry" . }}" - - name: registry-data - {{- if and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "filesystem") }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.registry.existingClaim | default (include "harbor.registry" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.registry.secretName" . }} - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - secret: - {{- if and (eq $type "gcs") $storage.gcs.existingSecret }} - secretName: {{ $storage.gcs.existingSecret }} - {{- else }} - secretName: {{ template "harbor.registry" . }} - {{- end }} - items: - - key: GCS_KEY_DATA - path: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - secret: - secretName: {{ .Values.persistence.imageChartStorage.caBundleSecretName }} - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - secret: - secretName: {{ .Values.registry.middleware.cloudFront.privateKeySecret }} - items: - - key: CLOUDFRONT_KEY_DATA - path: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.registry.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.registry.priorityClassName }} - priorityClassName: {{ .Values.registry.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/registry/registry-pvc.yaml b/charts/harbor/harbor/1.14.2/templates/registry/registry-pvc.yaml deleted file mode 100644 index 2112e22877..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/registry/registry-pvc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.persistence.enabled }} -{{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} -{{- if and (not $registry.existingClaim) (eq .Values.persistence.imageChartStorage.type "filesystem") }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.registry" . }} - annotations: - {{- range $key, $value := $registry.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry -spec: - accessModes: - - {{ $registry.accessMode }} - resources: - requests: - storage: {{ $registry.size }} - {{- if $registry.storageClass }} - {{- if eq "-" $registry.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $registry.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/registry/registry-secret.yaml b/charts/harbor/harbor/1.14.2/templates/registry/registry-secret.yaml deleted file mode 100644 index e853a9cbec..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/registry/registry-secret.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.registry" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.registry.existingSecret }} - REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (include "harbor.secretKeyHelper" (dict "key" "REGISTRY_HTTP_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.redis.external.existingSecret }} - REGISTRY_REDIS_PASSWORD: {{ include "harbor.redis.password" . | b64enc | quote }} - {{- end }} - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if and (eq $type "azure") (not $storage.azure.existingSecret) }} - REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }} - {{- else if and (and (eq $type "gcs") (not $storage.gcs.existingSecret)) (not $storage.gcs.useWorkloadIdentity) }} - GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }} - {{- else if eq $type "s3" }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.accesskey) }} - REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }} - {{- end }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.secretkey) }} - REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "swift") (not ($storage.swift.existingSecret)) }} - REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }} - {{- if $storage.swift.secretkey }} - REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }} - {{- end }} - {{- if $storage.swift.accesskey }} - REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "oss") ((not ($storage.oss.existingSecret))) }} - REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }} - {{- end }} -{{- if not .Values.registry.credentials.existingSecret }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}-htpasswd" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if .Values.registry.credentials.htpasswdString }} - REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswdString | b64enc | quote }} - {{- else }} - REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/registry/registry-svc.yaml b/charts/harbor/harbor/1.14.2/templates/registry/registry-svc.yaml deleted file mode 100644 index 749690ea03..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/registry/registry-svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }} - port: {{ template "harbor.registry.servicePort" . }} - - - name: {{ ternary "https-controller" "http-controller" .Values.internalTLS.enabled }} - port: {{ template "harbor.registryctl.servicePort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.registry.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/registry/registry-tls.yaml b/charts/harbor/harbor/1.14.2/templates/registry/registry-tls.yaml deleted file mode 100644 index 9d1862c417..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/registry/registry-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.registry.crt\" is required!" .Values.internalTLS.registry.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.registry.key\" is required!" .Values.internalTLS.registry.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/registry/registryctl-cm.yaml b/charts/harbor/harbor/1.14.2/templates/registry/registryctl-cm.yaml deleted file mode 100644 index 87aa5ffe24..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/registry/registryctl-cm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- template "harbor.traceEnvsForRegistryCtl" . }} diff --git a/charts/harbor/harbor/1.14.2/templates/registry/registryctl-secret.yaml b/charts/harbor/harbor/1.14.2/templates/registry/registryctl-secret.yaml deleted file mode 100644 index 70097703e9..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/registry/registryctl-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- template "harbor.traceJaegerPassword" . }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.14.2/templates/trivy/trivy-secret.yaml b/charts/harbor/harbor/1.14.2/templates/trivy/trivy-secret.yaml deleted file mode 100644 index 84652c7498..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/trivy/trivy-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.trivy.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - redisURL: {{ include "harbor.redis.urlForTrivy" . | b64enc }} - gitHubToken: {{ .Values.trivy.gitHubToken | default "" | b64enc | quote }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/trivy/trivy-sts.yaml b/charts/harbor/harbor/1.14.2/templates/trivy/trivy-sts.yaml deleted file mode 100644 index 7ee4e1068f..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/trivy/trivy-sts.yaml +++ /dev/null @@ -1,224 +0,0 @@ -{{- if .Values.trivy.enabled }} -{{- $trivy := .Values.persistence.persistentVolumeClaim.trivy }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: trivy -spec: - replicas: {{ .Values.trivy.replicas }} - serviceName: {{ template "harbor.trivy" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: trivy - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: trivy -{{- if .Values.trivy.podLabels }} -{{ toYaml .Values.trivy.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/trivy/trivy-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/trivy/trivy-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.trivy.podAnnotations }} -{{ toYaml .Values.trivy.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} -{{- end }} -{{- if .Values.trivy.serviceAccountName }} - serviceAccountName: {{ .Values.trivy.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }} -{{- with .Values.trivy.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: trivy -{{- end }} -{{- end }} - containers: - - name: trivy - image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - securityContext: - privileged: false - allowPrivilegeEscalation: false - env: - {{- if has "trivy" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - - name: "SCANNER_LOG_LEVEL" - value: {{ .Values.logLevel | quote }} - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: {{ .Values.trivy.debugMode | quote }} - - name: "SCANNER_TRIVY_VULN_TYPE" - value: {{ .Values.trivy.vulnType | quote }} - - name: "SCANNER_TRIVY_TIMEOUT" - value: {{ .Values.trivy.timeout | quote }} - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: {{ .Values.trivy.severity | quote }} - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: {{ .Values.trivy.ignoreUnfixed | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: {{ .Values.trivy.skipUpdate | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_JAVA_DB_UPDATE" - value: {{ .Values.trivy.skipJavaDBUpdate | default false | quote }} - - name: "SCANNER_TRIVY_OFFLINE_SCAN" - value: {{ .Values.trivy.offlineScan | default false | quote }} - - name: "SCANNER_TRIVY_SECURITY_CHECKS" - value: {{ .Values.trivy.securityCheck | quote }} - - name: "SCANNER_TRIVY_INSECURE" - value: {{ .Values.trivy.insecure | default false | quote }} - - name: SCANNER_API_SERVER_ADDR - value: ":{{ template "harbor.trivy.containerPort" . }}" - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: SCANNER_API_SERVER_TLS_KEY - value: /etc/harbor/ssl/trivy/tls.key - - name: SCANNER_API_SERVER_TLS_CERTIFICATE - value: /etc/harbor/ssl/trivy/tls.crt - {{- end }} - - name: "SCANNER_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL -{{- with .Values.trivy.extraEnvVars }} -{{- toYaml . | nindent 12 }} -{{- end }} - ports: - - name: api-server - containerPort: {{ template "harbor.trivy.containerPort" . }} - volumeMounts: - - name: data - mountPath: /home/scanner/.cache - subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} - readOnly: false - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - mountPath: /etc/harbor/ssl/trivy - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 10 }} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: -{{ toYaml .Values.trivy.resources | indent 12 }} - {{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }} - volumes: - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.trivy.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- if not .Values.persistence.enabled }} - - name: "data" - emptyDir: {} - {{- else if $trivy.existingClaim }} - - name: "data" - persistentVolumeClaim: - claimName: {{ $trivy.existingClaim }} - {{- end }} - {{- end }} - {{- with .Values.trivy.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.trivy.priorityClassName }} - priorityClassName: {{ .Values.trivy.priorityClassName }} - {{- end }} -{{- if and .Values.persistence.enabled (not $trivy.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $trivy.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $trivy.accessMode | quote }}] - {{- if $trivy.storageClass }} - {{- if (eq "-" $trivy.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $trivy.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $trivy.size | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/templates/trivy/trivy-svc.yaml b/charts/harbor/harbor/1.14.2/templates/trivy/trivy-svc.yaml deleted file mode 100644 index 24daf094e8..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/trivy/trivy-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{ if .Values.trivy.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.trivy" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-trivy" "http-trivy" .Values.internalTLS.enabled }} - protocol: TCP - port: {{ template "harbor.trivy.servicePort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: trivy -{{ end }} diff --git a/charts/harbor/harbor/1.14.2/templates/trivy/trivy-tls.yaml b/charts/harbor/harbor/1.14.2/templates/trivy/trivy-tls.yaml deleted file mode 100644 index a9c8330c37..0000000000 --- a/charts/harbor/harbor/1.14.2/templates/trivy/trivy-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.trivy.enabled .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.trivy.crt\" is required!" .Values.internalTLS.trivy.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.trivy.key\" is required!" .Values.internalTLS.trivy.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.14.2/values.yaml b/charts/harbor/harbor/1.14.2/values.yaml deleted file mode 100644 index 688b42c3ae..0000000000 --- a/charts/harbor/harbor/1.14.2/values.yaml +++ /dev/null @@ -1,992 +0,0 @@ -expose: - # Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" - # and fill the information in the corresponding section - type: ingress - tls: - # Enable TLS or not. - # Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" - # Note: if the "expose.type" is "ingress" and TLS is disabled, - # the port must be included in the command when pulling/pushing images. - # Refer to https://github.com/goharbor/harbor/issues/5291 for details. - enabled: true - # The source of the tls certificate. Set as "auto", "secret" - # or "none" and fill the information in the corresponding section - # 1) auto: generate the tls certificate automatically - # 2) secret: read the tls certificate from the specified secret. - # The tls certificate can be generated manually or by cert manager - # 3) none: configure no tls certificate for the ingress. If the default - # tls certificate is configured in the ingress controller, choose this option - certSource: auto - auto: - # The common name used to generate the certificate, it's necessary - # when the type isn't "ingress" - commonName: "" - secret: - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - secretName: "" - ingress: - hosts: - core: core.harbor.domain - # set to the type of ingress controller if it has specific requirements. - # leave as `default` for most ingress controllers. - # set to `gce` if using the GCE ingress controller - # set to `ncp` if using the NCP (NSX-T Container Plugin) ingress controller - # set to `alb` if using the ALB ingress controller - # set to `f5-bigip` if using the F5 BIG-IP ingress controller - controller: default - ## Allow .Capabilities.KubeVersion.Version to be overridden while creating ingress - kubeVersionOverride: "" - className: "" - annotations: - # note different ingress controllers may require a different ssl-redirect annotation - # for Envoy, use ingress.kubernetes.io/force-ssl-redirect: "true" and remove the nginx lines below - ingress.kubernetes.io/ssl-redirect: "true" - ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - harbor: - # harbor ingress-specific annotations - annotations: {} - # harbor ingress-specific labels - labels: {} - clusterIP: - # The name of ClusterIP service - name: harbor - # The ip address of the ClusterIP service (leave empty for acquiring dynamic ip) - staticClusterIP: "" - # Annotations on the ClusterIP service - annotations: {} - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - nodePort: - # The name of NodePort service - name: harbor - ports: - http: - # The service port Harbor listens on when serving HTTP - port: 80 - # The node port Harbor listens on when serving HTTP - nodePort: 30002 - https: - # The service port Harbor listens on when serving HTTPS - port: 443 - # The node port Harbor listens on when serving HTTPS - nodePort: 30003 - loadBalancer: - # The name of LoadBalancer service - name: harbor - # Set the IP if the LoadBalancer supports assigning IP - IP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - annotations: {} - sourceRanges: [] - -# The external URL for Harbor core service. It is used to -# 1) populate the docker/helm commands showed on portal -# 2) populate the token service URL returned to docker client -# -# Format: protocol://domain[:port]. Usually: -# 1) if "expose.type" is "ingress", the "domain" should be -# the value of "expose.ingress.hosts.core" -# 2) if "expose.type" is "clusterIP", the "domain" should be -# the value of "expose.clusterIP.name" -# 3) if "expose.type" is "nodePort", the "domain" should be -# the IP address of k8s node -# -# If Harbor is deployed behind the proxy, set it as the URL of proxy -externalURL: https://core.harbor.domain - -# The internal TLS used for harbor components secure communicating. In order to enable https -# in each component tls cert files need to provided in advance. -internalTLS: - # If internal TLS enabled - enabled: false - # enable strong ssl ciphers (default: false) - strong_ssl_ciphers: false - # There are three ways to provide tls - # 1) "auto" will generate cert automatically - # 2) "manual" need provide cert file manually in following value - # 3) "secret" internal certificates from secret - certSource: "auto" - # The content of trust ca, only available when `certSource` is "manual" - trustCa: "" - # core related cert configuration - core: - # secret name for core's tls certs - secretName: "" - # Content of core's TLS cert file, only available when `certSource` is "manual" - crt: "" - # Content of core's TLS key file, only available when `certSource` is "manual" - key: "" - # jobservice related cert configuration - jobservice: - # secret name for jobservice's tls certs - secretName: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - key: "" - # registry related cert configuration - registry: - # secret name for registry's tls certs - secretName: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - key: "" - # portal related cert configuration - portal: - # secret name for portal's tls certs - secretName: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - key: "" - # trivy related cert configuration - trivy: - # secret name for trivy's tls certs - secretName: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - key: "" - -ipFamily: - # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component - ipv6: - enabled: true - # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component - ipv4: - enabled: true - -# The persistence is enabled by default and a default StorageClass -# is needed in the k8s cluster to provision volumes dynamically. -# Specify another StorageClass in the "storageClass" or set "existingClaim" -# if you already have existing persistent volumes to use -# -# For storing images and charts, you can also use "azure", "gcs", "s3", -# "swift" or "oss". Set it in the "imageChartStorage" section -persistence: - enabled: true - # Setting it to "keep" to avoid removing PVCs during a helm delete - # operation. Leaving it empty will delete PVCs after the chart deleted - # (this does not apply for PVCs that are created for internal database - # and redis components, i.e. they are never deleted automatically) - resourcePolicy: "keep" - persistentVolumeClaim: - registry: - # Use the existing PVC which must be created manually before bound, - # and specify the "subPath" if the PVC is shared with other components - existingClaim: "" - # Specify the "storageClass" used to provision the volume. Or the default - # StorageClass will be used (the default). - # Set it to "-" to disable dynamic provisioning - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - jobservice: - jobLog: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external database is used, the following settings for database will - # be ignored - database: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external Redis is used, the following settings for Redis will - # be ignored - redis: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - trivy: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - # Define which storage backend is used for registry to store - # images and charts. Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#storage - # for the detail. - imageChartStorage: - # Specify whether to disable `redirect` for images and chart storage, for - # backends which not supported it (such as using minio for `s3` storage type), please disable - # it. To disable redirects, simply set `disableredirect` to `true` instead. - # Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#redirect - # for the detail. - disableredirect: false - # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate. - # The secret must contain keys named "ca.crt" which will be injected into the trust store - # of registry's containers. - # caBundleSecretName: - - # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift", - # "oss" and fill the information needed in the corresponding section. The type - # must be "filesystem" if you want to use persistent volumes for registry - type: filesystem - filesystem: - rootdirectory: /storage - #maxthreads: 100 - azure: - accountname: accountname - accountkey: base64encodedaccountkey - container: containername - #realm: core.windows.net - # To use existing secret, the key must be AZURE_STORAGE_ACCESS_KEY - existingSecret: "" - gcs: - bucket: bucketname - # The base64 encoded json file which contains the key - encodedkey: base64-encoded-json-key-file - #rootdirectory: /gcs/object/name/prefix - #chunksize: "5242880" - # To use existing secret, the key must be GCS_KEY_DATA - existingSecret: "" - useWorkloadIdentity: false - s3: - # Set an existing secret for S3 accesskey and secretkey - # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry - #existingSecret: "" - region: us-west-1 - bucket: bucketname - #accesskey: awsaccesskey - #secretkey: awssecretkey - #regionendpoint: http://myobjects.local - #encrypt: false - #keyid: mykeyid - #secure: true - #skipverify: false - #v4auth: true - #chunksize: "5242880" - #rootdirectory: /s3/object/name/prefix - #storageclass: STANDARD - #multipartcopychunksize: "33554432" - #multipartcopymaxconcurrency: 100 - #multipartcopythresholdsize: "33554432" - swift: - authurl: https://storage.myprovider.com/v3/auth - username: username - password: password - container: containername - # keys in existing secret must be REGISTRY_STORAGE_SWIFT_PASSWORD, REGISTRY_STORAGE_SWIFT_SECRETKEY, REGISTRY_STORAGE_SWIFT_ACCESSKEY - existingSecret: "" - #region: fr - #tenant: tenantname - #tenantid: tenantid - #domain: domainname - #domainid: domainid - #trustid: trustid - #insecureskipverify: false - #chunksize: 5M - #prefix: - #secretkey: secretkey - #accesskey: accesskey - #authversion: 3 - #endpointtype: public - #tempurlcontainerkey: false - #tempurlmethods: - oss: - accesskeyid: accesskeyid - accesskeysecret: accesskeysecret - region: regionname - bucket: bucketname - # key in existingSecret must be REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - existingSecret: "" - #endpoint: endpoint - #internal: false - #encrypt: false - #secure: true - #chunksize: 10M - #rootdirectory: rootdirectory - -imagePullPolicy: IfNotPresent - -# Use this set to assign a list of default pullSecrets -imagePullSecrets: -# - name: docker-registry-secret -# - name: internal-registry-secret - -# The update strategy for deployments with persistent volumes(jobservice, registry): "RollingUpdate" or "Recreate" -# Set it as "Recreate" when "RWM" for volumes isn't supported -updateStrategy: - type: RollingUpdate - -# debug, info, warning, error or fatal -logLevel: info - -# The initial password of Harbor admin. Change it from portal after launching Harbor -# or give an existing secret for it -# key in secret is given via (default to HARBOR_ADMIN_PASSWORD) -# existingSecretAdminPassword: -existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD -harborAdminPassword: "Harbor12345" - -# The name of the secret which contains key named "ca.crt". Setting this enables the -# download link on portal to download the CA certificate when the certificate isn't -# generated automatically -caSecretName: "" - -# The secret key used for encryption. Must be a string of 16 chars. -secretKey: "not-a-secure-key" -# If using existingSecretSecretKey, the key must be secretKey -existingSecretSecretKey: "" - -# The proxy settings for updating trivy vulnerabilities from the Internet and replicating -# artifacts from/to the registries that cannot be reached directly -proxy: - httpProxy: - httpsProxy: - noProxy: 127.0.0.1,localhost,.local,.internal - components: - - core - - jobservice - - trivy - -# Run the migration job via helm hook -enableMigrateHelmHook: false - -# The custom ca bundle secret, the secret must contain key named "ca.crt" -# which will be injected into the trust store for core, jobservice, registry, trivy components -# caBundleSecretName: "" - -## UAA Authentication Options -# If you're using UAA for authentication behind a self-signed -# certificate you will need to provide the CA Cert. -# Set uaaSecretName below to provide a pre-created secret that -# contains a base64 encoded CA Certificate named `ca.crt`. -# uaaSecretName: - -# If service exposed via "ingress", the Nginx will not be used -nginx: - image: - repository: goharbor/nginx-photon - tag: v2.10.2 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -portal: - image: - repository: goharbor/harbor-portal - tag: v2.10.2 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - -core: - image: - repository: goharbor/harbor-core - tag: v2.10.2 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - ## Startup probe values - startupProbe: - enabled: true - initialDelaySeconds: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## User settings configuration json string - configureUserSettings: - # The provider for updating project quota(usage), there are 2 options, redis or db. - # By default it is implemented by db but you can configure it to redis which - # can improve the performance of high concurrent pushing to the same project, - # and reduce the database connections spike and occupies. - # Using redis will bring up some delay for quota usage updation for display, so only - # suggest switch provider to redis if you were ran into the db connections spike around - # the scenario of high concurrent pushing to same project, no improvment for other scenes. - quotaUpdateProvider: db # Or redis - # Secret is used when core server communicates with other components. - # If a secret key is not specified, Helm will generate one. Alternatively set existingSecret to use an existing secret - # Must be a string of 16 chars. - secret: "" - # Fill in the name of a kubernetes secret if you want to use your own - # If using existingSecret, the key must be secret - existingSecret: "" - # Fill the name of a kubernetes secret if you want to use your own - # TLS certificate and private key for token encryption/decryption. - # The secret must contain keys named: - # "tls.key" - the private key - # "tls.crt" - the certificate - secretName: "" - # If not specifying a preexisting secret, a secret can be created from tokenKey and tokenCert and used instead. - # If none of secretName, tokenKey, and tokenCert are specified, an ephemeral key and certificate will be autogenerated. - # tokenKey and tokenCert must BOTH be set or BOTH unset. - # The tokenKey value is formatted as a multiline string containing a PEM-encoded RSA key, indented one more than tokenKey on the following line. - tokenKey: | - # If tokenKey is set, the value of tokenCert must be set as a PEM-encoded certificate signed by tokenKey, and supplied as a multiline string, indented one more than tokenCert on the following line. - tokenCert: | - # The XSRF key. Will be generated automatically if it isn't specified - xsrfKey: "" - # If using existingSecret, the key is defined by core.existingXsrfSecretKey - existingXsrfSecret: "" - # If using existingSecret, the key - existingXsrfSecretKey: CSRF_KEY - ## The priority class to run the pod as - priorityClassName: - # The time duration for async update artifact pull_time and repository - # pull_count, the unit is second. Will be 10 seconds if it isn't set. - # eg. artifactPullAsyncFlushDuration: 10 - artifactPullAsyncFlushDuration: - gdpr: - deleteUser: false - auditLogsCompliant: false - -jobservice: - image: - repository: goharbor/harbor-jobservice - tag: v2.10.2 - replicas: 1 - revisionHistoryLimit: 10 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - maxJobWorkers: 10 - # The logger for jobs: "file", "database" or "stdout" - jobLoggers: - - file - # - database - # - stdout - # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days - notification: - webhook_job_max_retry: 3 - webhook_job_http_client_timeout: 3 # in seconds - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: 24 - # the max time for execution in running state without new task created - max_dangling_hours: 168 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - # Secret is used when job service communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the job service secret - existingSecretKey: JOBSERVICE_SECRET - ## The priority class to run the pod as - priorityClassName: - -registry: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - registry: - image: - repository: goharbor/registry-photon - tag: v2.10.2 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - controller: - image: - repository: goharbor/harbor-registryctl - tag: v2.10.2 - - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - replicas: 1 - revisionHistoryLimit: 10 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # Secret is used to secure the upload state from client - # and registry storage backend. - # See: https://github.com/distribution/distribution/blob/main/docs/configuration.md#http - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the registry service secret - existingSecretKey: REGISTRY_HTTP_SECRET - # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. - relativeurls: false - credentials: - username: "harbor_registry_user" - password: "harbor_registry_password" - # If using existingSecret, the key must be REGISTRY_PASSWD and REGISTRY_HTPASSWD - existingSecret: "" - # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. - # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string - htpasswdString: "" - middleware: - enabled: false - type: cloudFront - cloudFront: - baseurl: example.cloudfront.net - keypairid: KEYPAIRID - duration: 3000s - ipfilteredby: none - # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key - # that allows access to CloudFront - privateKeySecret: "my-secret" - # enable purge _upload directories - upload_purging: - enabled: true - # remove files in _upload directories which exist for a period of time, default is one week. - age: 168h - # the interval of the purge operations - interval: 24h - dryrun: false - -trivy: - # enabled the flag to enable Trivy scanner - enabled: true - image: - # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon - # tag the tag for Trivy adapter image - tag: v2.10.2 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # replicas the number of Pod replicas - replicas: 1 - # debugMode the flag to enable Trivy debug mode with more verbose scanning log - debugMode: false - # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`. - vulnType: "os,library" - # severity a comma-separated list of severities to be checked - severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - # ignoreUnfixed the flag to display only fixed vulnerabilities - ignoreUnfixed: false - # insecure the flag to skip verifying registry certificate - insecure: false - # gitHubToken the GitHub access token to download Trivy DB - # - # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases. - # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached - # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update - # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one. - # Currently, the database is updated every 12 hours and published as a new release to GitHub. - # - # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough - # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000 - # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult - # https://developer.github.com/v3/#rate-limiting - # - # You can create a GitHub token by following the instructions in - # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - gitHubToken: "" - # skipUpdate the flag to disable Trivy DB downloads from GitHub - # - # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues. - # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the - # `/home/scanner/.cache/trivy/db/trivy.db` path. - skipUpdate: false - # skipJavaDBUpdate If the flag is enabled you have to manually download the `trivy-java.db` file and mount it in the - # `/home/scanner/.cache/trivy/java-db/trivy-java.db` path - # - skipJavaDBUpdate: false - # The offlineScan option prevents Trivy from sending API requests to identify dependencies. - # - # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it. - # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't - # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode. - # It would work if all the dependencies are in local. - # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment. - offlineScan: false - # Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. Defaults to `vuln`. - securityCheck: "vuln" - # The duration to wait for scan completion - timeout: 5m0s - resources: - requests: - cpu: 200m - memory: 512Mi - limits: - cpu: 1 - memory: 1Gi - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -database: - # if external database is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-db - tag: v2.10.2 - # The initial superuser password for internal database - password: "changeit" - # The size limit for Shared memory, pgSQL use it for shared_buffer - # More details see: - # https://github.com/goharbor/harbor/issues/15034 - shmSizeLimit: 512Mi - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - # The timeout used in livenessProbe; 1 to 5 seconds - livenessProbe: - timeoutSeconds: 1 - # The timeout used in readinessProbe; 1 to 5 seconds - readinessProbe: - timeoutSeconds: 1 - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - initContainer: - migrator: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - permissions: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - external: - host: "192.168.0.1" - port: "5432" - username: "user" - password: "password" - coreDatabase: "registry" - # if using existing secret, the key must be "password" - existingSecret: "" - # "disable" - No SSL - # "require" - Always SSL (skip verification) - # "verify-ca" - Always SSL (verify that the certificate presented by the - # server was signed by a trusted CA) - # "verify-full" - Always SSL (verify that the certification presented by the - # server was signed by a trusted CA and the server host name matches the one - # in the certificate) - sslmode: "disable" - # The maximum number of connections in the idle connection pool per pod (core+exporter). - # If it <=0, no idle connections are retained. - maxIdleConns: 100 - # The maximum number of open connections to the database per pod (core+exporter). - # If it <= 0, then there is no limit on the number of open connections. - # Note: the default number of connections is 1024 for postgre of harbor. - maxOpenConns: 900 - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -redis: - # if external Redis is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/redis-photon - tag: v2.10.2 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # # jobserviceDatabaseIndex defaults to "1" - # # registryDatabaseIndex defaults to "2" - # # trivyAdapterIndex defaults to "5" - # # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - external: - # support redis, redis+sentinel - # addr for redis: : - # addr for redis+sentinel: :,:,: - addr: "192.168.0.2:6379" - # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel - sentinelMasterSet: "" - # The "coreDatabaseIndex" must be "0" as the library Harbor - # used doesn't support configuring it - # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - coreDatabaseIndex: "0" - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - # username field can be an empty string, and it will be authenticated against the default user - username: "" - password: "" - # If using existingSecret, the key must be REDIS_PASSWORD - existingSecret: "" - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -exporter: - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - image: - repository: goharbor/harbor-exporter - tag: v2.10.2 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - cacheDuration: 23 - cacheCleanInterval: 14400 - ## The priority class to run the pod as - priorityClassName: - -metrics: - enabled: false - core: - path: /metrics - port: 8001 - registry: - path: /metrics - port: 8001 - jobservice: - path: /metrics - port: 8001 - exporter: - path: /metrics - port: 8001 - ## Create prometheus serviceMonitor to scrape harbor metrics. - ## This requires the monitoring.coreos.com/v1 CRD. Please see - ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md - ## - serviceMonitor: - enabled: false - additionalLabels: {} - # Scrape interval. If not set, the Prometheus default scrape interval is used. - interval: "" - # Metric relabel configs to apply to samples before ingestion. - metricRelabelings: - [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - # Relabel configs to apply to samples before ingestion. - relabelings: - [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] - # separator: ; - # regex: ^(.*)$ - # targetLabel: nodename - # replacement: $1 - # action: replace - -trace: - enabled: false - # trace provider: jaeger or otel - # jaeger should be 1.26+ - provider: jaeger - # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth - sample_rate: 1 - # namespace used to differentiate different harbor services - # namespace: - # attributes is a key value dict contains user defined attributes used to initialize trace provider - # attributes: - # application: harbor - jaeger: - # jaeger supports two modes: - # collector mode(uncomment endpoint and uncomment username, password if needed) - # agent mode(uncomment agent_host and agent_port) - endpoint: http://hostname:14268/api/traces - # username: - # password: - # agent_host: hostname - # export trace data by jaeger.thrift in compact mode - # agent_port: 6831 - otel: - endpoint: hostname:4318 - url_path: /v1/traces - compression: false - insecure: true - # timeout is in seconds - timeout: 10 - -# cache layer configurations -# if this feature enabled, harbor will cache the resource -# `project/project_metadata/repository/artifact/manifest` in the redis -# which help to improve the performance of high concurrent pulling manifest. -cache: - # default is not enabled. - enabled: false - # default keep cache for one day. - expireHours: 24 diff --git a/charts/harbor/harbor/1.15.0/.helmignore b/charts/harbor/harbor/1.15.0/.helmignore deleted file mode 100644 index b4424fd59b..0000000000 --- a/charts/harbor/harbor/1.15.0/.helmignore +++ /dev/null @@ -1,6 +0,0 @@ -.github/* -docs/* -.git/* -.gitignore -CONTRIBUTING.md -test/* \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/Chart.yaml b/charts/harbor/harbor/1.15.0/Chart.yaml deleted file mode 100644 index 044f3b1b10..0000000000 --- a/charts/harbor/harbor/1.15.0/Chart.yaml +++ /dev/null @@ -1,29 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor -apiVersion: v1 -appVersion: 2.11.0 -description: An open source trusted cloud native registry that stores, signs, and - scans content -home: https://goharbor.io -icon: https://raw.githubusercontent.com/goharbor/website/main/static/img/logos/harbor-icon-color.png -keywords: -- docker -- registry -- harbor -maintainers: -- email: yan-yw.wang@broadcom.com - name: Yan Wang -- email: wenkai.yin@broadcom.com - name: Wenkai Yin -- email: miner.yang@broadcom.com - name: Miner Yang -- email: shengwen.yu@broadcom.com - name: Shengwen Yu -name: harbor -sources: -- https://github.com/goharbor/harbor -- https://github.com/goharbor/harbor-helm -version: 1.15.0 diff --git a/charts/harbor/harbor/1.15.0/LICENSE b/charts/harbor/harbor/1.15.0/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/charts/harbor/harbor/1.15.0/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/charts/harbor/harbor/1.15.0/README.md b/charts/harbor/harbor/1.15.0/README.md deleted file mode 100644 index a78cfa6700..0000000000 --- a/charts/harbor/harbor/1.15.0/README.md +++ /dev/null @@ -1,422 +0,0 @@ -# Helm Chart for Harbor - -**Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be found [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. - -This repository, including the issues, focuses on deploying Harbor chart via helm. For functionality issues or Harbor questions, please open issues on [goharbor/harbor](https://github.com/goharbor/harbor) - -## Introduction - -This [Helm](https://github.com/kubernetes/helm) chart installs [Harbor](https://github.com/goharbor/harbor) in a Kubernetes cluster. Welcome to [contribute](CONTRIBUTING.md) to Helm Chart for Harbor. - -## Prerequisites - -- Kubernetes cluster 1.20+ -- Helm v3.2.0+ - -## Installation - -### Add Helm repository - -```bash -helm repo add harbor https://helm.goharbor.io -``` - -### Configure the chart - -The following items can be set via `--set` flag during installation or configured by editing the `values.yaml` directly (need to download the chart first). - -#### Configure how to expose Harbor service - -- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. - **Notes:** if TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to issue [#5291](https://github.com/goharbor/harbor/issues/5291) for details. -- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. -- **NodePort**: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. -- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. - -#### Configure the external URL - -The external URL for Harbor core service is used to: - -1. populate the docker/helm commands showed on portal -2. populate the token service URL returned to docker client - -Format: `protocol://domain[:port]`. Usually: - -- if service exposed via `Ingress`, the `domain` should be the value of `expose.ingress.hosts.core` -- if service exposed via `ClusterIP`, the `domain` should be the value of `expose.clusterIP.name` -- if service exposed via `NodePort`, the `domain` should be the IP address of one Kubernetes node -- if service exposed via `LoadBalancer`, set the `domain` as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider - -If Harbor is deployed behind the proxy, set it as the URL of proxy. - -#### Configure how to persist data - -- **Disable**: The data does not survive the termination of a pod. -- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you already have existing persistent volumes to use. -- **External Storage(only for images and charts)**: For images and charts, the external storages are supported: `azure`, `gcs`, `s3` `swift` and `oss`. - -#### Configure the other items listed in [configuration](#configuration) section - -### Install the chart - -Install the Harbor helm chart with a release name `my-release`: -```bash -helm install my-release harbor/harbor -``` - -## Uninstallation - -To uninstall/delete the `my-release` deployment: -```bash -helm uninstall my-release -``` - -## Configuration - -The following table lists the configurable parameters of the Harbor chart and the default values. - -| Parameter | Description | Default | -|-----------------------------------------------------------------------| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| **Expose** | | | -| `expose.type` | How to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` | -| `expose.tls.enabled` | Enable TLS or not. Delete the `ssl-redirect` annotations in `expose.ingress.annotations` when TLS is disabled and `expose.type` is `ingress`. Note: if the `expose.type` is `ingress` and TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to https://github.com/goharbor/harbor/issues/5291 for details. | `true` | -| `expose.tls.certSource` | The source of the TLS certificate. Set as `auto`, `secret` or `none` and fill the information in the corresponding section: 1) auto: generate the TLS certificate automatically 2) secret: read the TLS certificate from the specified secret. The TLS certificate can be generated manually or by cert manager 3) none: configure no TLS certificate for the ingress. If the default TLS certificate is configured in the ingress controller, choose this option | `auto` | -| `expose.tls.auto.commonName` | The common name used to generate the certificate, it's necessary when the type isn't `ingress` | | -| `expose.tls.secret.secretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key | | -| `expose.ingress.hosts.core` | The host of Harbor core service in ingress rule | `core.harbor.domain` | -| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce`, `alb`, `f5-bigip` and `ncp` | `default` | -| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | | -| `expose.ingress.annotations` | The annotations used commonly for ingresses | | -| `expose.ingress.labels` | The labels specific to ingress | {} | -| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` | -| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} | -| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.clusterIP.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.clusterIP.annotations` | The annotations used commonly for clusterIP | | -| `expose.clusterIP.labels` | The labels specific to clusterIP | {} | -| `expose.nodePort.name` | The name of NodePort service | `harbor` | -| `expose.nodePort.ports.http.port` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.nodePort.ports.http.nodePort` | The node port Harbor listens on when serving HTTP | `30002` | -| `expose.nodePort.ports.https.port` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.ports.https.nodePort` | The node port Harbor listens on when serving HTTPS | `30003` | -| `expose.nodePort.annotations` | The annotations used commonly for nodePort | | -| `expose.nodePort.labels` | The labels specific to nodePort | {} | -| `expose.loadBalancer.name` | The name of service | `harbor` | -| `expose.loadBalancer.IP` | The IP of the loadBalancer. It only works when loadBalancer supports assigning IP | `""` | -| `expose.loadBalancer.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.loadBalancer.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `30002` | -| `expose.loadBalancer.annotations` | The annotations attached to the loadBalancer service | {} | -| `expose.loadBalancer.labels` | The labels specific to loadBalancer | {} | -| `expose.loadBalancer.sourceRanges` | List of IP address ranges to assign to loadBalancerSourceRanges | [] | -| **Internal TLS** | | | -| `internalTLS.enabled` | Enable TLS for the components (core, jobservice, portal, registry, trivy) | `false` | -| `internalTLS.strong_ssl_ciphers` | Enable strong ssl ciphers for nginx and portal | `false` -| `internalTLS.certSource` | Method to provide TLS for the components, options are `auto`, `manual`, `secret`. | `auto` | -| `internalTLS.trustCa` | The content of trust CA, only available when `certSource` is `manual`. **Note**: all the internal certificates of the components must be issued by this CA | | -| `internalTLS.core.secretName` | The secret name for core component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.core.crt` | Content of core's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.core.key` | Content of core's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.secretName` | The secret name for jobservice component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.jobservice.crt` | Content of jobservice's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.key` | Content of jobservice's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.registry.secretName` | The secret name for registry component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.registry.crt` | Content of registry's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.registry.key` | Content of registry's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.portal.secretName` | The secret name for portal component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.portal.crt` | Content of portal's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.portal.key` | Content of portal's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.secretName` | The secret name for trivy component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.trivy.crt` | Content of trivy's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.key` | Content of trivy's TLS key file, only available when `certSource` is `manual` | | -| **IPFamily** | | | -| `ipFamily.ipv4.enabled` | if cluster is ipv4 enabled, all ipv4 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| `ipFamily.ipv6.enabled` | if cluster is ipv6 enabled, all ipv6 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| **Persistence** | | | -| `persistence.enabled` | Enable the data persistence or not | `true` | -| `persistence.resourcePolicy` | Setting it to `keep` to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted. Does not affect PVCs created for internal database and redis components. | `keep` | -| `persistence.persistentVolumeClaim.registry.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.registry.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.registry.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.registry.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.registry.size` | The size of the volume | `5Gi` | -| `persistence.persistentVolumeClaim.registry.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.database.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.subPath` | The sub path used in the volume. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.accessMode` | The access mode of the volume. If external database is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.database.size` | The size of the volume. If external database is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.database.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.redis.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.subPath` | The sub path used in the volume. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.accessMode` | The access mode of the volume. If external Redis is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.redis.size` | The size of the volume. If external Redis is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.redis.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.trivy.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.trivy.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.trivy.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.trivy.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.trivy.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.trivy.annotations` | The annotations of the volume | | -| `persistence.imageChartStorage.disableredirect` | The configuration for managing redirects from content backends. For backends which not supported it (such as using minio for `s3` storage type), please set it to `true` to disable redirects. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect) for more details | `false` | -| `persistence.imageChartStorage.caBundleSecretName` | Specify the `caBundleSecretName` if the storage service uses a self-signed certificate. The secret must contain keys named `ca.crt` which will be injected into the trust store of registry's and containers. | | -| `persistence.imageChartStorage.type` | The type of storage for images and charts: `filesystem`, `azure`, `gcs`, `s3`, `swift` or `oss`. The type must be `filesystem` if you want to use persistent volumes for registry. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#storage) for more details | `filesystem` | -| `persistence.imageChartStorage.gcs.existingSecret` | An existing secret containing the gcs service account json key. The key must be gcs-key.json. | `""` | -| `persistence.imageChartStorage.gcs.useWorkloadIdentity` | A boolean to allow the use of workloadidentity in a GKE cluster. To use it, create a kubernetes service account and set the name in the key `serviceAccountName` of each component, then allow automounting the service account. | `false` | -| **General** | | | -| `externalURL` | The external URL for Harbor core service | `https://core.harbor.domain` | -| `caBundleSecretName` | The custom CA bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for core, jobservice, registry, trivy components. | | -| `uaaSecretName` | If using external UAA auth which has a self signed cert, you can provide a pre-created secret containing it under the key `ca.crt`. | | -| `imagePullPolicy` | The image pull policy | | -| `imagePullSecrets` | The imagePullSecrets names for all deployments | | -| `updateStrategy.type` | The update strategy for deployments with persistent volumes(jobservice, registry): `RollingUpdate` or `Recreate`. Set it as `Recreate` when `RWM` for volumes isn't supported | `RollingUpdate` | -| `logLevel` | The log level: `debug`, `info`, `warning`, `error` or `fatal` | `info` | -| `harborAdminPassword` | The initial password of Harbor admin. Change it from portal after launching Harbor | `Harbor12345` | -| `existingSecretAdminPassword` | The name of secret where admin password can be found. | | -| `existingSecretAdminPasswordKey` | The name of the key in the secret where to find harbor admin password Harbor | `HARBOR_ADMIN_PASSWORD` | -| `caSecretName` | The name of the secret which contains key named `ca.crt`. Setting this enables the download link on portal to download the CA certificate when the certificate isn't generated automatically | | -| `secretKey` | The key used for encryption. Must be a string of 16 chars | `not-a-secure-key` | -| `existingSecretSecretKey` | An existing secret containing the encoding secretKey | `""` | -| `proxy.httpProxy` | The URL of the HTTP proxy server | | -| `proxy.httpsProxy` | The URL of the HTTPS proxy server | | -| `proxy.noProxy` | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal | -| `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | -| `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | -| **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | -| `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | -| `nginx.image.tag` | Image tag | `dev` | -| `nginx.replicas` | The replica count | `1` | -| `nginx.revisionHistoryLimit` | The revision history limit | `10` | -| `nginx.resources` | The [resources] to allocate for container | undefined | -| `nginx.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `nginx.nodeSelector` | Node labels for pod assignment | `{}` | -| `nginx.tolerations` | Tolerations for pod assignment | `[]` | -| `nginx.affinity` | Node/Pod affinities | `{}` | -| `nginx.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | -| `nginx.priorityClassName` | The priority class to run the pod as | | -| **Portal** | | | -| `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | -| `portal.image.tag` | Tag for portal image | `dev` | -| `portal.replicas` | The replica count | `1` | -| `portal.revisionHistoryLimit` | The revision history limit | `10` | -| `portal.resources` | The [resources] to allocate for container | undefined | -| `portal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `portal.nodeSelector` | Node labels for pod assignment | `{}` | -| `portal.tolerations` | Tolerations for pod assignment | `[]` | -| `portal.affinity` | Node/Pod affinities | `{}` | -| `portal.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` | -| `portal.serviceAnnotations` | Annotations to add to the portal service | `{}` | -| `portal.priorityClassName` | The priority class to run the pod as | | -| `portal.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **Core** | | | -| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | -| `core.image.tag` | Tag for Harbor core image | `dev` | -| `core.replicas` | The replica count | `1` | -| `core.revisionHistoryLimit` | The revision history limit | `10` | -| `core.startupProbe.initialDelaySeconds` | The initial delay in seconds for the startup probe | `10` | -| `core.resources` | The [resources] to allocate for container | undefined | -| `core.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `core.nodeSelector` | Node labels for pod assignment | `{}` | -| `core.tolerations` | Tolerations for pod assignment | `[]` | -| `core.affinity` | Node/Pod affinities | `{}` | -| `core.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `core.podAnnotations` | Annotations to add to the core pod | `{}` | -| `core.serviceAnnotations` | Annotations to add to the core service | `{}` | -| `core.configureUserSettings` | A JSON string to set in the environment variable `CONFIG_OVERWRITE_JSON` to configure user settings. See the [official docs](https://goharbor.io/docs/latest/install-config/configure-user-settings-cli/#configure-users-settings-using-an-environment-variable). | | -| `core.quotaUpdateProvider` | The provider for updating project quota(usage), there are 2 options, redis or db. By default it is implemented by db but you can configure it to redis which can improve the performance of high concurrent pushing to the same project, and reduce the database connections spike and occupies. Using redis will bring up some delay for quota usage updation for display, so only suggest switch provider to redis if you were ran into the db connections spike around the scenario of high concurrent pushing to same project, no improvment for other scenes. | `db` | -| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `core.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate and private key for token encryption/decryption. The secret must contain keys named: `tls.crt` - the certificate and `tls.key` - the private key. The default key pair will be used if it isn't set | | -| `core.tokenKey` | PEM-formatted RSA private key used to sign service tokens. Only used if `core.secretName` is unset. If set, `core.tokenCert` MUST also be set. | | -| `core.tokenCert` | PEM-formatted certificate signed by `core.tokenKey` used to validate service tokens. Only used if `core.secretName` is unset. If set, `core.tokenKey` MUST also be set. | | -| `core.xsrfKey` | The XSRF key. Will be generated automatically if it isn't specified | | -| `core.priorityClassName` | The priority class to run the pod as | | -| `core.artifactPullAsyncFlushDuration` | The time duration for async update artifact pull_time and repository pull_count | | -| `core.gdpr.deleteUser` | Enable GDPR compliant user delete | `false` | -| `core.gdpr.auditLogsCompliant` | Enable GDPR compliant for audit logs by changing username to its CRC32 value if that user was deleted from the system | `false` | -| `core.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **Jobservice** | | | -| `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | -| `jobservice.image.tag` | Tag for jobservice image | `dev` | -| `jobservice.replicas` | The replica count | `1` | -| `jobservice.revisionHistoryLimit` | The revision history limit | `10` | -| `jobservice.maxJobWorkers` | The max job workers | `10` | -| `jobservice.jobLoggers` | The loggers for jobs: `file`, `database` or `stdout` | `[file]` | -| `jobservice.loggerSweeperDuration` | The jobLogger sweeper duration in days (ignored if `jobLoggers` is set to `stdout`) | `14` | -| `jobservice.notification.webhook_job_max_retry` | The maximum retry of webhook sending notifications | `3` | -| `jobservice.notification.webhook_job_http_client_timeout` | The http client timeout value of webhook sending notifications | `3` | -| `jobservice.reaper.max_update_hours` | the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 | `24` | -| `jobservice.reaper.max_dangling_hours` | the max time for execution in running state without new task created | `168` | -| `jobservice.resources` | The [resources] to allocate for container | undefined | -| `jobservice.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `jobservice.nodeSelector` | Node labels for pod assignment | `{}` | -| `jobservice.tolerations` | Tolerations for pod assignment | `[]` | -| `jobservice.affinity` | Node/Pod affinities | `{}` | -| `jobservice.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` | -| `jobservice.priorityClassName` | The priority class to run the pod as | | -| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `jobservice.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **Registry** | | | -| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | -| `registry.registry.image.tag` | Tag for registry image | `dev` | -| `registry.registry.resources` | The [resources] to allocate for container | undefined | -| `registry.controller.image.repository` | Repository for registry controller image | `goharbor/harbor-registryctl` | -| `registry.controller.image.tag` | Tag for registry controller image | `dev` | -| `registry.controller.resources` | The [resources] to allocate for container | undefined | -| `registry.replicas` | The replica count | `1` | -| `registry.revisionHistoryLimit` | The revision history limit | `10` | -| `registry.nodeSelector` | Node labels for pod assignment | `{}` | -| `registry.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `registry.tolerations` | Tolerations for pod assignment | `[]` | -| `registry.affinity` | Node/Pod affinities | `{}` | -| `registry.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | | -| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` | -| `registry.priorityClassName` | The priority class to run the pod as | | -| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `registry.credentials.username` | The username that harbor core uses internally to access the registry instance. Together with the `registry.credentials.password`, a htpasswd is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` | -| `registry.credentials.password` | The password that harbor core uses internally to access the registry instance. Together with the `registry.credentials.username`, a htpasswd is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). It is suggested you update this value before installation. | `harbor_registry_password` | -| `registry.credentials.existingSecret` | An existing secret containing the password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). The key must be `REGISTRY_PASSWD` | `""` | -| `registry.credentials.htpasswdString` | Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. | undefined | -| `registry.relativeurls` | If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. Needed if harbor is behind a reverse proxy | `false` | -| `registry.upload_purging.enabled` | If true, enable purge _upload directories | `true` | -| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` | -| `registry.upload_purging.interval` | The interval of the purge operations | `24h` | -| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` | -| `registry.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **[Trivy][trivy]** | | | -| `trivy.enabled` | The flag to enable Trivy scanner | `true` | -| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` | -| `trivy.image.tag` | Tag for Trivy adapter image | `dev` | -| `trivy.resources` | The [resources] to allocate for Trivy adapter container | | -| `trivy.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `trivy.replicas` | The number of Pod replicas | `1` | -| `trivy.debugMode` | The flag to enable Trivy debug mode | `false` | -| `trivy.vulnType` | Comma-separated list of vulnerability types. Possible values `os` and `library`. | `os,library` | -| `trivy.severity` | Comma-separated list of severities to be checked | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | -| `trivy.ignoreUnfixed` | The flag to display only fixed vulnerabilities | `false` | -| `trivy.insecure` | The flag to skip verifying registry certificate | `false` | -| `trivy.skipUpdate` | The flag to disable [Trivy DB][trivy-db] downloads from GitHub | `false` | -| `trivy.skipJavaDBUpdate` | If the flag is enabled you have to manually download the `trivy-java.db` file [Trivy Java DB][trivy-java-db] and mount it in the `/home/scanner/.cache/trivy/java-db/trivy-java.db` path | `false` | -| `trivy.offlineScan` | The flag prevents Trivy from sending API requests to identify dependencies. | `false` | -| `trivy.securityCheck` | Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. | `vuln` | -| `trivy.timeout` | The duration to wait for scan completion | `5m0s` | -| `trivy.gitHubToken` | The GitHub access token to download [Trivy DB][trivy-db] (see [GitHub rate limiting][trivy-rate-limiting]) | | -| `trivy.priorityClassName` | The priority class to run the pod as | | -| `trivy.topologySpreadConstraints` | The priority class to run the pod as | | -| `trivy.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **Database** | | | -| `database.type` | If external database is used, set it to `external` | `internal` | -| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` | -| `database.internal.image.tag` | Tag for database image | `dev` | -| `database.internal.password` | The password for database | `changeit` | -| `database.internal.shmSizeLimit` | The limit for the size of shared memory for internal PostgreSQL, conventionally it's around 50% of the memory limit of the container | `512Mi` | -| `database.internal.resources` | The [resources] to allocate for container | undefined | -| `database.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `database.internal.initContainer.migrator.resources` | The [resources] to allocate for the database migrator initContainer | undefined | -| `database.internal.initContainer.permissions.resources` | The [resources] to allocate for the database permissions initContainer | undefined | -| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `database.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `database.internal.affinity` | Node/Pod affinities | `{}` | -| `database.internal.priorityClassName` | The priority class to run the pod as | | -| `database.internal.livenessProbe.timeoutSeconds` | The timeout used in liveness probe; 1 to 5 seconds | 1 | -| `database.internal.readinessProbe.timeoutSeconds` | The timeout used in readiness probe; 1 to 5 seconds | 1 | -| `database.internal.extrInitContainers` | Extra init containers to be run before the database's container starts. | `[]` | -| `database.external.host` | The hostname of external database | `192.168.0.1` | -| `database.external.port` | The port of external database | `5432` | -| `database.external.username` | The username of external database | `user` | -| `database.external.password` | The password of external database | `password` | -| `database.external.coreDatabase` | The database used by core service | `registry` | -| `database.external.existingSecret` | An existing password containing the database password. the key must be `password`. | `""` | -| `database.external.sslmode` | Connection method of external database (require, verify-full, verify-ca, disable) | `disable` | -| `database.maxIdleConns` | The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained. | `50` | -| `database.maxOpenConns` | The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections. | `100` | -| `database.podAnnotations` | Annotations to add to the database pod | `{}` | -| **Redis** | | | -| `redis.type` | If external redis is used, set it to `external` | `internal` | -| `redis.internal.image.repository` | Repository for redis image | `goharbor/redis-photon` | -| `redis.internal.image.tag` | Tag for redis image | `dev` | -| `redis.internal.resources` | The [resources] to allocate for container | undefined | -| `redis.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `redis.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `redis.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `redis.internal.affinity` | Node/Pod affinities | `{}` | -| `redis.internal.priorityClassName` | The priority class to run the pod as | | -| `redis.internal.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.internal.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.internal.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.internal.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.internal.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.internal.initContainers` | Init containers to be run before the redis's container starts. | `[]` | -| `redis.external.addr` | The addr of external Redis: :. When using sentinel, it should be :,:,: | `192.168.0.2:6379` | -| `redis.external.sentinelMasterSet` | The name of the set of Redis instances to monitor | | -| `redis.external.coreDatabaseIndex` | The database index for core | `0` | -| `redis.external.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.external.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.external.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.external.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.external.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.username` | The username of external Redis | | -| `redis.external.password` | The password of external Redis | | -| `redis.external.existingSecret` | Use an existing secret to connect to redis. The key must be `REDIS_PASSWORD`. | `""` | -| `redis.podAnnotations` | Annotations to add to the redis pod | `{}` | -| **Exporter** | | | -| `exporter.replicas` | The replica count | `1` | -| `exporter.revisionHistoryLimit` | The revision history limit | `10` | -| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` | -| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` | -| `exporter.image.tag` | Tag for exporter image | `dev` | -| `exporter.nodeSelector` | Node labels for pod assignment | `{}` | -| `exporter.tolerations` | Tolerations for pod assignment | `[]` | -| `exporter.affinity` | Node/Pod affinities | `{}` | -| `exporter.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `exporter.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `exporter.cacheDuration` | the cache duration for information that exporter collected from Harbor | `30` | -| `exporter.cacheCleanInterval` | cache clean interval for information that exporter collected from Harbor | `14400` | -| `exporter.priorityClassName` | The priority class to run the pod as | | -| **Metrics** | | | -| `metrics.enabled` | if enable harbor metrics | `false` | -| `metrics.core.path` | the url path for core metrics | `/metrics` | -| `metrics.core.port` | the port for core metrics | `8001` | -| `metrics.registry.path` | the url path for registry metrics | `/metrics` | -| `metrics.registry.port` | the port for registry metrics | `8001` | -| `metrics.exporter.path` | the url path for exporter metrics | `/metrics` | -| `metrics.exporter.port` | the port for exporter metrics | `8001` | -| `metrics.serviceMonitor.enabled` | create prometheus serviceMonitor. Requires prometheus CRD's | `false` | -| `metrics.serviceMonitor.additionalLabels` | additional labels to upsert to the manifest | `""` | -| `metrics.serviceMonitor.interval` | scrape period for harbor metrics | `""` | -| `metrics.serviceMonitor.metricRelabelings` | metrics relabel to add/mod/del before ingestion | `[]` | -| `metrics.serviceMonitor.relabelings` | relabels to add/mod/del to sample before scrape | `[]` | -| **Trace** | | | -| `trace.enabled` | Enable tracing or not | `false` | -| `trace.provider` | The tracing provider: `jaeger` or `otel`. `jaeger` should be 1.26+ | `jaeger` | -| `trace.sample_rate` | Set `sample_rate` to 1 if you want sampling 100% of trace data; set 0.5 if you want sampling 50% of trace data, and so forth | `1` | -| `trace.namespace` | Namespace used to differentiate different harbor services | | -| `trace.attributes` | `attributes` is a key value dict contains user defined attributes used to initialize trace provider | | -| `trace.jaeger.endpoint` | The endpoint of jaeger | `http://hostname:14268/api/traces` | -| `trace.jaeger.username` | The username of jaeger | | -| `trace.jaeger.password` | The password of jaeger | | -| `trace.jaeger.agent_host` | The agent host of jaeger | | -| `trace.jaeger.agent_port` | The agent port of jaeger | `6831` | -| `trace.otel.endpoint` | The endpoint of otel | `hostname:4318` | -| `trace.otel.url_path` | The URL path of otel | `/v1/traces` | -| `trace.otel.compression` | Whether enable compression or not for otel | `false` | -| `trace.otel.insecure` | Whether establish insecure connection or not for otel | `true` | -| `trace.otel.timeout` | The timeout in seconds of otel | `10` | -| **Cache** | | | -| `cache.enabled` | Enable cache layer or not | `false` | -| `cache.expireHours` | The expire hours of cache layer | `24` | - -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[trivy]: https://github.com/aquasecurity/trivy -[trivy-db]: https://github.com/aquasecurity/trivy-db -[trivy-java-db]: https://github.com/aquasecurity/trivy-java-db -[trivy-rate-limiting]: https://github.com/aquasecurity/trivy#github-rate-limiting diff --git a/charts/harbor/harbor/1.15.0/templates/NOTES.txt b/charts/harbor/harbor/1.15.0/templates/NOTES.txt deleted file mode 100644 index 0980c08a35..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }} -For more details, please visit https://github.com/goharbor/harbor diff --git a/charts/harbor/harbor/1.15.0/templates/_helpers.tpl b/charts/harbor/harbor/1.15.0/templates/_helpers.tpl deleted file mode 100644 index f6249b3993..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/_helpers.tpl +++ /dev/null @@ -1,581 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "harbor.name" -}} -{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "harbor.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "harbor" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Helm required labels: legacy */}} -{{- define "harbor.legacy.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* Helm required labels */}} -{{- define "harbor.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -app.kubernetes.io/instance: {{ .Release.Name }} -app.kubernetes.io/name: {{ include "harbor.name" . }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -app.kubernetes.io/part-of: {{ include "harbor.name" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -{{- end -}} - -{{/* matchLabels */}} -{{- define "harbor.matchLabels" -}} -release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* Helper for printing values from existing secrets*/}} -{{- define "harbor.secretKeyHelper" -}} - {{- if and (not (empty .data)) (hasKey .data .key) }} - {{- index .data .key | b64dec -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCert" -}} - {{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForIngress" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (eq .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForNginx" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (ne .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.host" -}} - {{- if eq .Values.database.type "internal" -}} - {{- template "harbor.database" . }} - {{- else -}} - {{- .Values.database.external.host -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.port" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "5432" -}} - {{- else -}} - {{- .Values.database.external.port -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.username" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "postgres" -}} - {{- else -}} - {{- .Values.database.external.username -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.rawPassword" -}} - {{- if eq .Values.database.type "internal" -}} - {{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.database" .) -}} - {{- if and (not (empty $existingSecret)) (hasKey $existingSecret.data "POSTGRES_PASSWORD") -}} - {{- .Values.database.internal.password | default (index $existingSecret.data "POSTGRES_PASSWORD" | b64dec) -}} - {{- else -}} - {{- .Values.database.internal.password -}} - {{- end -}} - {{- else -}} - {{- .Values.database.external.password -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.escapedRawPassword" -}} - {{- include "harbor.database.rawPassword" . | urlquery | replace "+" "%20" -}} -{{- end -}} - -{{- define "harbor.database.encryptedPassword" -}} - {{- include "harbor.database.rawPassword" . | b64enc | quote -}} -{{- end -}} - -{{- define "harbor.database.coreDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "registry" -}} - {{- else -}} - {{- .Values.database.external.coreDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.sslmode" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "disable" -}} - {{- else -}} - {{- .Values.database.external.sslmode -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.redis.scheme" -}} - {{- with .Values.redis }} - {{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }} - {{- end }} -{{- end -}} - -/*host:port*/ -{{- define "harbor.redis.addr" -}} - {{- with .Values.redis }} - {{- ternary (printf "%s:6379" (include "harbor.redis" $ )) .external.addr (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.masterSet" -}} - {{- with .Values.redis }} - {{- ternary .external.sentinelMasterSet "" (eq "redis+sentinel" (include "harbor.redis.scheme" $)) }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.password" -}} - {{- with .Values.redis }} - {{- ternary "" .external.password (eq .type "internal") }} - {{- end }} -{{- end -}} - - -{{- define "harbor.redis.pwdfromsecret" -}} - {{- (lookup "v1" "Secret" .Release.Namespace (.Values.redis.external.existingSecret)).data.REDIS_PASSWORD | b64dec }} -{{- end -}} - -{{- define "harbor.redis.cred" -}} - {{- with .Values.redis }} - {{- if (and (eq .type "external" ) (.external.existingSecret)) }} - {{- printf ":%s@" (include "harbor.redis.pwdfromsecret" $) }} - {{- else }} - {{- ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }} - {{- end }} - {{- end }} -{{- end -}} - -/*scheme://[:password@]host:port[/master_set]*/ -{{- define "harbor.redis.url" -}} - {{- with .Values.redis }} - {{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }} - {{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) (include "harbor.redis.cred" $) (include "harbor.redis.addr" $) $path -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCore" -}} - {{- with .Values.redis }} - {{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index*/ -{{- define "harbor.redis.urlForJobservice" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.jobserviceDatabaseIndex .external.jobserviceDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForRegistry" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForTrivy" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.trivyAdapterIndex .external.trivyAdapterIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForHarbor" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.harborDatabaseIndex .external.harborDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCache" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.cacheLayerDatabaseIndex .external.cacheLayerDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.dbForRegistry" -}} - {{- with .Values.redis }} - {{- ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.noProxy" -}} - {{- printf "%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}} -{{- end -}} - -{{- define "harbor.caBundleVolume" -}} -- name: ca-bundle-certs - secret: - secretName: {{ .Values.caBundleSecretName }} -{{- end -}} - -{{- define "harbor.caBundleVolumeMount" -}} -- name: ca-bundle-certs - mountPath: /harbor_cust_cert/custom-ca.crt - subPath: ca.crt -{{- end -}} - -{{/* scheme for all components because it only support http mode */}} -{{- define "harbor.component.scheme" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "https" -}} - {{- else -}} - {{- printf "http" -}} - {{- end -}} -{{- end -}} - -{{/* core component container port */}} -{{- define "harbor.core.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* core component service port */}} -{{- define "harbor.core.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component container port */}} -{{- define "harbor.jobservice.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component service port */}} -{{- define "harbor.jobservice.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* portal component container port */}} -{{- define "harbor.portal.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* portal component service port */}} -{{- define "harbor.portal.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* registry component container port */}} -{{- define "harbor.registry.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registry component service port */}} -{{- define "harbor.registry.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component container port */}} -{{- define "harbor.registryctl.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component service port */}} -{{- define "harbor.registryctl.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component container port */}} -{{- define "harbor.trivy.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component service port */}} -{{- define "harbor.trivy.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* CORE_URL */}} -{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}} -{{- define "harbor.coreURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}} -{{- end -}} - -{{/* JOBSERVICE_URL */}} -{{- define "harbor.jobserviceURL" -}} - {{- printf "%s://%s-jobservice" (include "harbor.component.scheme" .) (include "harbor.fullname" .) -}} -{{- end -}} - -{{/* PORTAL_URL */}} -{{- define "harbor.portalURL" -}} - {{- printf "%s://%s" (include "harbor.component.scheme" .) (include "harbor.portal" .) -}} -{{- end -}} - -{{/* REGISTRY_URL */}} -{{- define "harbor.registryURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registry.servicePort" .) -}} -{{- end -}} - -{{/* REGISTRY_CONTROLLER_URL */}} -{{- define "harbor.registryControllerURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registryctl.servicePort" .) -}} -{{- end -}} - -{{/* TOKEN_SERVICE_URL */}} -{{- define "harbor.tokenServiceURL" -}} - {{- printf "%s/service/token" (include "harbor.coreURL" .) -}} -{{- end -}} - -{{/* TRIVY_ADAPTER_URL */}} -{{- define "harbor.trivyAdapterURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}} -{{- end -}} - -{{- define "harbor.internalTLS.core.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.core.secretName -}} - {{- else -}} - {{- printf "%s-core-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.jobservice.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.jobservice.secretName -}} - {{- else -}} - {{- printf "%s-jobservice-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.portal.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.portal.secretName -}} - {{- else -}} - {{- printf "%s-portal-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.registry.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.registry.secretName -}} - {{- else -}} - {{- printf "%s-registry-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.trivy.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.trivy.secretName -}} - {{- else -}} - {{- printf "%s-trivy-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsCoreSecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsSecretForNginx" -}} - {{- if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.nginx" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.metricsPortName" -}} - {{- if .Values.internalTLS.enabled }} - {{- printf "https-metrics" -}} - {{- else -}} - {{- printf "http-metrics" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.traceEnvs" -}} - TRACE_ENABLED: "{{ .Values.trace.enabled }}" - TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}" - TRACE_NAMESPACE: "{{ .Values.trace.namespace }}" - {{- if .Values.trace.attributes }} - TRACE_ATTRIBUTES: {{ .Values.trace.attributes | toJson | squote }} - {{- end }} - {{- if eq .Values.trace.provider "jaeger" }} - TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}" - TRACE_JAEGER_USERNAME: "{{ .Values.trace.jaeger.username }}" - TRACE_JAEGER_AGENT_HOSTNAME: "{{ .Values.trace.jaeger.agent_host }}" - TRACE_JAEGER_AGENT_PORT: "{{ .Values.trace.jaeger.agent_port }}" - {{- else }} - TRACE_OTEL_ENDPOINT: "{{ .Values.trace.otel.endpoint }}" - TRACE_OTEL_URL_PATH: "{{ .Values.trace.otel.url_path }}" - TRACE_OTEL_COMPRESSION: "{{ .Values.trace.otel.compression }}" - TRACE_OTEL_INSECURE: "{{ .Values.trace.otel.insecure }}" - TRACE_OTEL_TIMEOUT: "{{ .Values.trace.otel.timeout }}" - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForCore" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-core" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForJobservice" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-jobservice" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForRegistryCtl" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-registryctl" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceJaegerPassword" -}} - {{- if and .Values.trace.enabled (eq .Values.trace.provider "jaeger") }} - TRACE_JAEGER_PASSWORD: "{{ .Values.trace.jaeger.password | default "" | b64enc }}" - {{- end }} -{{- end -}} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "harbor.ingress.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} diff --git a/charts/harbor/harbor/1.15.0/templates/core/core-cm.yaml b/charts/harbor/harbor/1.15.0/templates/core/core-cm.yaml deleted file mode 100644 index 93cab01b4c..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/core/core-cm.yaml +++ /dev/null @@ -1,90 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - app.conf: |+ - appname = Harbor - runmode = prod - enablegzip = true - - [prod] - httpport = {{ ternary "8443" "8080" .Values.internalTLS.enabled }} - PORT: "{{ ternary "8443" "8080" .Values.internalTLS.enabled }}" - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "{{ template "harbor.database.host" . }}" - POSTGRESQL_PORT: "{{ template "harbor.database.port" . }}" - POSTGRESQL_USERNAME: "{{ template "harbor.database.username" . }}" - POSTGRESQL_DATABASE: "{{ template "harbor.database.coreDatabase" . }}" - POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" - EXT_ENDPOINT: "{{ .Values.externalURL }}" - CORE_URL: "{{ template "harbor.coreURL" . }}" - JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - CORE_LOCAL_URL: "{{ ternary "https://127.0.0.1:8443" "http://127.0.0.1:8080" .Values.internalTLS.enabled }}" - WITH_TRIVY: {{ .Values.trivy.enabled | quote }} - TRIVY_ADAPTER_URL: "{{ template "harbor.trivyAdapterURL" . }}" - REGISTRY_STORAGE_PROVIDER_NAME: "{{ .Values.persistence.imageChartStorage.type }}" - LOG_LEVEL: "{{ .Values.logLevel }}" - CONFIG_PATH: "/etc/core/app.conf" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}" - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.harborDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.harborDatabaseIndex) }} - _REDIS_URL_HARBOR: "{{ template "harbor.redis.urlForHarbor" . }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} - PORTAL_URL: "{{ template "harbor.portalURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - {{- if .Values.uaaSecretName }} - UAA_CA_ROOT: "/etc/core/auth-ca/auth-ca.crt" - {{- end }} - {{- if has "core" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE: "docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory" - {{- if .Values.metrics.enabled}} - METRIC_ENABLE: "true" - METRIC_PATH: "{{ .Values.metrics.core.path }}" - METRIC_PORT: "{{ .Values.metrics.core.port }}" - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: core - {{- end }} - - {{- if hasKey .Values.core "gcTimeWindowHours" }} - #make the GC time window configurable for testing - GC_TIME_WINDOW_HOURS: "{{ .Values.core.gcTimeWindowHours }}" - {{- end }} - {{- template "harbor.traceEnvsForCore" . }} - - {{- if .Values.core.artifactPullAsyncFlushDuration }} - ARTIFACT_PULL_ASYNC_FLUSH_DURATION: {{ .Values.core.artifactPullAsyncFlushDuration | quote }} - {{- end }} - - {{- if .Values.core.gdpr}} - {{- if .Values.core.gdpr.deleteUser}} - GDPR_DELETE_USER: "true" - {{- end }} - {{- if .Values.core.gdpr.auditLogsCompliant}} - GDPR_AUDIT_LOGS: "true" - {{- end }} - {{- end }} - - {{- if .Values.cache.enabled }} - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - - {{- if .Values.core.quotaUpdateProvider }} - QUOTA_UPDATE_PROVIDER: "{{ .Values.core.quotaUpdateProvider }}" - {{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/core/core-dpl.yaml b/charts/harbor/harbor/1.15.0/templates/core/core-dpl.yaml deleted file mode 100644 index 2ee8fd59c2..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/core/core-dpl.yaml +++ /dev/null @@ -1,257 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: core - app.kubernetes.io/component: core -spec: - replicas: {{ .Values.core.replicas }} - revisionHistoryLimit: {{ .Values.core.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: core - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: core - app.kubernetes.io/component: core -{{- if .Values.core.podLabels }} -{{ toYaml .Values.core.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.core.podAnnotations }} -{{ toYaml .Values.core.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.core.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: core -{{- end }} -{{- end }} - {{- with .Values.core.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: core - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if .Values.core.startupProbe.enabled }} - startupProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 360 - initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} - periodSeconds: 10 - {{- end }} - livenessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/core/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/core/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/core/ca.crt - {{- end }} - {{- if .Values.database.external.existingSecret }} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} - {{- if .Values.core.existingXsrfSecret }} - - name: CSRF_KEY - valueFrom: - secretKeyRef: - name: {{ .Values.core.existingXsrfSecret }} - key: {{ .Values.core.existingXsrfSecretKey }} - {{- end }} -{{- with .Values.core.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - {{- if .Values.expose.tls.enabled }} - - name: ca-download - mountPath: /etc/core/ca - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - mountPath: /etc/core/auth-ca/auth-ca.crt - subPath: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - {{- end }} - - name: psc - mountPath: /etc/core/token - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} -{{- if .Values.core.resources }} - resources: -{{ toYaml .Values.core.resources | indent 10 }} -{{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - - name: secret-key - secret: - {{- if .Values.existingSecretSecretKey }} - secretName: {{ .Values.existingSecretSecretKey }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - items: - - key: secretKey - path: key - - name: token-service-private-key - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: ca-download - secret: - {{- if .Values.caSecretName }} - secretName: {{ .Values.caSecretName }} - {{- else if eq (include "harbor.autoGenCertForIngress" .) "true" }} - secretName: "{{ template "harbor.ingress" . }}" - {{- else if eq (include "harbor.autoGenCertForNginx" .) "true" }} - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - secret: - secretName: {{ .Values.uaaSecretName }} - items: - - key: ca.crt - path: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - - name: psc - emptyDir: {} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.core.priorityClassName }} - priorityClassName: {{ .Values.core.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/core/core-pre-upgrade-job.yaml b/charts/harbor/harbor/1.15.0/templates/core/core-pre-upgrade-job.yaml deleted file mode 100644 index ce0b13134d..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/core/core-pre-upgrade-job.yaml +++ /dev/null @@ -1,77 +0,0 @@ -{{- if .Values.enableMigrateHelmHook }} -apiVersion: batch/v1 -kind: Job -metadata: - name: migration-job - labels: -{{ include "harbor.labels" . | indent 4 }} - component: migrator - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-5" -spec: - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: migrator - spec: - restartPolicy: Never - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 120 - containers: - - name: core-job - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/harbor/harbor_core", "-mode=migrate"] - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - {{- if .Values.database.external.existingSecret }} - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/core/core-secret.yaml b/charts/harbor/harbor/1.15.0/templates/core/core-secret.yaml deleted file mode 100644 index 62a41fce80..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/core/core-secret.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.core" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.existingSecretSecretKey }} - secretKey: {{ .Values.secretKey | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingSecret }} - secret: {{ .Values.core.secret | default (include "harbor.secretKeyHelper" (dict "key" "secret" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.core.secretName }} - {{- $ca := genCA "harbor-token-ca" 365 }} - tls.key: {{ .Values.core.tokenKey | default $ca.Key | b64enc | quote }} - tls.crt: {{ .Values.core.tokenCert | default $ca.Cert | b64enc | quote }} - {{- end }} - {{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} - {{- end }} - {{- if not .Values.database.external.existingSecret }} - POSTGRESQL_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingXsrfSecret }} - CSRF_KEY: {{ .Values.core.xsrfKey | default (include "harbor.secretKeyHelper" (dict "key" "CSRF_KEY" "data" $existingSecret.data)) | default (randAlphaNum 32) | b64enc | quote }} - {{- end }} -{{- if .Values.core.configureUserSettings }} - CONFIG_OVERWRITE_JSON: {{ .Values.core.configureUserSettings | b64enc | quote }} -{{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.15.0/templates/core/core-svc.yaml b/charts/harbor/harbor/1.15.0/templates/core/core-svc.yaml deleted file mode 100644 index 0d2cfb2915..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/core/core-svc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.core.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - name: {{ ternary "https-web" "http-web" .Values.internalTLS.enabled }} - port: {{ template "harbor.core.servicePort" . }} - targetPort: {{ template "harbor.core.containerPort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.core.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: core diff --git a/charts/harbor/harbor/1.15.0/templates/core/core-tls.yaml b/charts/harbor/harbor/1.15.0/templates/core/core-tls.yaml deleted file mode 100644 index c52148f0d9..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/core/core-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.core.crt\" is required!" .Values.internalTLS.core.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.core.key\" is required!" .Values.internalTLS.core.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/database/database-secret.yaml b/charts/harbor/harbor/1.15.0/templates/database/database-secret.yaml deleted file mode 100644 index 864aff4a18..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/database/database-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - POSTGRES_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end -}} diff --git a/charts/harbor/harbor/1.15.0/templates/database/database-ss.yaml b/charts/harbor/harbor/1.15.0/templates/database/database-ss.yaml deleted file mode 100644 index 71c5eb1e08..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/database/database-ss.yaml +++ /dev/null @@ -1,162 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -{{- $database := .Values.persistence.persistentVolumeClaim.database -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: database - app.kubernetes.io/component: database -spec: - replicas: 1 - serviceName: "{{ template "harbor.database" . }}" - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: database - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: database - app.kubernetes.io/component: database -{{- if .Values.database.podLabels }} -{{ toYaml .Values.database.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} -{{- if .Values.database.podAnnotations }} -{{ toYaml .Values.database.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.database.internal.serviceAccountName }} - serviceAccountName: {{ .Values.database.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.database.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - # with "fsGroup" set, each time a volume is mounted, Kubernetes must recursively chown() and chmod() all the files and directories inside the volume - # this causes the postgresql reports the "data directory /var/lib/postgresql/data/pgdata has group or world access" issue when using some CSIs e.g. Ceph - # use this init container to correct the permission - # as "fsGroup" applied before the init container running, the container has enough permission to execute the command - - name: "data-permissions-ensurer" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - command: ["/bin/sh"] - args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"] -{{- if .Values.database.internal.initContainer.permissions.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.permissions.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - {{- with .Values.database.internal.extrInitContainers }} - {{- toYaml . | nindent 6 }} - {{- end }} - containers: - - name: database - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - livenessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.livenessProbe.timeoutSeconds }} - readinessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 1 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.readinessProbe.timeoutSeconds }} -{{- if .Values.database.internal.resources }} - resources: -{{ toYaml .Values.database.internal.resources | indent 10 }} -{{- end }} - envFrom: - - secretRef: - name: "{{ template "harbor.database" . }}" - env: - # put the data into a sub directory to avoid the permission issue in k8s with restricted psp enabled - # more detail refer to https://github.com/goharbor/harbor-helm/issues/756 - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" -{{- with .Values.database.internal.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - - name: shm-volume - mountPath: /dev/shm - volumes: - - name: shm-volume - emptyDir: - medium: Memory - sizeLimit: {{ .Values.database.internal.shmSizeLimit }} - {{- if not .Values.persistence.enabled }} - - name: "database-data" - emptyDir: {} - {{- else if $database.existingClaim }} - - name: "database-data" - persistentVolumeClaim: - claimName: {{ $database.existingClaim }} - {{- end -}} - {{- with .Values.database.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.database.internal.priorityClassName }} - priorityClassName: {{ .Values.database.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $database.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: -{{ include "harbor.legacy.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $database.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $database.accessMode | quote }}] - {{- if $database.storageClass }} - {{- if (eq "-" $database.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $database.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $database.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.15.0/templates/database/database-svc.yaml b/charts/harbor/harbor/1.15.0/templates/database/database-svc.yaml deleted file mode 100644 index 6475048cd9..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/database/database-svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 5432 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: database -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/exporter/exporter-cm-env.yaml b/charts/harbor/harbor/1.15.0/templates/exporter/exporter-cm-env.yaml deleted file mode 100644 index 0bf4e7d905..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/exporter/exporter-cm-env.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.exporter" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - LOG_LEVEL: "{{ .Values.logLevel }}" - HARBOR_EXPORTER_PORT: "{{ .Values.metrics.exporter.port }}" - HARBOR_EXPORTER_METRICS_PATH: "{{ .Values.metrics.exporter.path }}" - HARBOR_EXPORTER_METRICS_ENABLED: "{{ .Values.metrics.enabled }}" - HARBOR_EXPORTER_CACHE_TIME: "{{ .Values.exporter.cacheDuration }}" - HARBOR_EXPORTER_CACHE_CLEAN_INTERVAL: "{{ .Values.exporter.cacheCleanInterval }}" - HARBOR_METRIC_NAMESPACE: harbor - HARBOR_METRIC_SUBSYSTEM: exporter - HARBOR_REDIS_URL: "{{ template "harbor.redis.urlForJobservice" . }}" - HARBOR_REDIS_NAMESPACE: harbor_job_service_namespace - HARBOR_REDIS_TIMEOUT: "3600" - HARBOR_SERVICE_SCHEME: "{{ template "harbor.component.scheme" . }}" - HARBOR_SERVICE_HOST: "{{ template "harbor.core" . }}" - HARBOR_SERVICE_PORT: "{{ template "harbor.core.servicePort" . }}" - HARBOR_DATABASE_HOST: "{{ template "harbor.database.host" . }}" - HARBOR_DATABASE_PORT: "{{ template "harbor.database.port" . }}" - HARBOR_DATABASE_USERNAME: "{{ template "harbor.database.username" . }}" - HARBOR_DATABASE_DBNAME: "{{ template "harbor.database.coreDatabase" . }}" - HARBOR_DATABASE_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - HARBOR_DATABASE_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - HARBOR_DATABASE_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" -{{- end}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/exporter/exporter-dpl.yaml b/charts/harbor/harbor/1.15.0/templates/exporter/exporter-dpl.yaml deleted file mode 100644 index 01e9258ea9..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/exporter/exporter-dpl.yaml +++ /dev/null @@ -1,146 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: exporter - app.kubernetes.io/component: exporter -spec: - replicas: {{ .Values.exporter.replicas }} - revisionHistoryLimit: {{ .Values.exporter.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: exporter - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: exporter - app.kubernetes.io/component: exporter -{{- if .Values.exporter.podLabels }} -{{ toYaml .Values.exporter.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/exporter/exporter-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/exporter/exporter-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.exporter.podAnnotations }} -{{ toYaml .Values.exporter.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.exporter.serviceAccountName }} - serviceAccountName: {{ .Values.exporter.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.exporter.automountServiceAccountToken | default false }} -{{- with .Values.exporter.topologySpreadConstraints }} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: exporter -{{- end }} -{{- end }} - containers: - - name: exporter - image: {{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 30 - periodSeconds: 10 - args: ["-log-level", "{{ .Values.logLevel }}"] - envFrom: - - configMapRef: - name: "{{ template "harbor.exporter" . }}-env" - - secretRef: - name: "{{ template "harbor.exporter" . }}" - env: - {{- if .Values.database.external.existingSecret }} - - name: HARBOR_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} -{{- if .Values.exporter.resources }} - resources: -{{ toYaml .Values.exporter.resources | indent 10 }} -{{- end }} -{{- with .Values.exporter.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - ports: - - containerPort: {{ .Values.metrics.exporter.port }} - volumeMounts: - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - # There are some metric data are collectd from harbor core. - # When internal TLS is enabled, the Exporter need the CA file to collect these data. - {{- end }} - volumes: - - name: config - secret: - secretName: "{{ template "harbor.exporter" . }}" - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.exporter.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.exporter.priorityClassName }} - priorityClassName: {{ .Values.exporter.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.15.0/templates/exporter/exporter-secret.yaml b/charts/harbor/harbor/1.15.0/templates/exporter/exporter-secret.yaml deleted file mode 100644 index 434a1bf689..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/exporter/exporter-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: -{{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} -{{- end }} -{{- if not .Values.database.external.existingSecret }} - HARBOR_DATABASE_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/exporter/exporter-svc.yaml b/charts/harbor/harbor/1.15.0/templates/exporter/exporter-svc.yaml deleted file mode 100644 index 4a6f3fdec6..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/exporter/exporter-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.exporter" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.exporter.port }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: exporter -{{ end }} diff --git a/charts/harbor/harbor/1.15.0/templates/ingress/ingress.yaml b/charts/harbor/harbor/1.15.0/templates/ingress/ingress.yaml deleted file mode 100644 index 73472c6056..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/ingress/ingress.yaml +++ /dev/null @@ -1,142 +0,0 @@ -{{- if eq .Values.expose.type "ingress" }} -{{- $ingress := .Values.expose.ingress -}} -{{- $tls := .Values.expose.tls -}} -{{- if eq .Values.expose.ingress.controller "gce" }} - {{- $_ := set . "portal_path" "/*" -}} - {{- $_ := set . "api_path" "/api/*" -}} - {{- $_ := set . "service_path" "/service/*" -}} - {{- $_ := set . "v2_path" "/v2/*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/*" -}} - {{- $_ := set . "controller_path" "/c/*" -}} -{{- else if eq .Values.expose.ingress.controller "ncp" }} - {{- $_ := set . "portal_path" "/.*" -}} - {{- $_ := set . "api_path" "/api/.*" -}} - {{- $_ := set . "service_path" "/service/.*" -}} - {{- $_ := set . "v2_path" "/v2/.*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}} - {{- $_ := set . "controller_path" "/c/.*" -}} -{{- else }} - {{- $_ := set . "portal_path" "/" -}} - {{- $_ := set . "api_path" "/api/" -}} - {{- $_ := set . "service_path" "/service/" -}} - {{- $_ := set . "v2_path" "/v2/" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/" -}} - {{- $_ := set . "controller_path" "/c/" -}} -{{- end }} - ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.labels }} -{{ toYaml $ingress.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if .Values.internalTLS.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" -{{- end }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsCoreSecretForIngress" . }} - {{- if $ingress.hosts.core }} - hosts: - - {{ $ingress.hosts.core }} - {{- end }} - {{- end }} - rules: - - http: - paths: -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - - path: {{ .api_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - backend: - serviceName: {{ template "harbor.portal" . }} - servicePort: {{ template "harbor.portal.servicePort" . }} -{{- else }} - - path: {{ .api_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.portal" . }} - port: - number: {{ template "harbor.portal.servicePort" . }} -{{- end }} - {{- if $ingress.hosts.core }} - host: {{ $ingress.hosts.core }} - {{- end }} - -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/ingress/secret.yaml b/charts/harbor/harbor/1.15.0/templates/ingress/secret.yaml deleted file mode 100644 index 41507b3dd9..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/ingress/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForIngress" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cert := genSignedCert .Values.expose.ingress.hosts.core nil (list .Values.expose.ingress.hosts.core) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/internal/auto-tls.yaml b/charts/harbor/harbor/1.15.0/templates/internal/auto-tls.yaml deleted file mode 100644 index da5f5e2c7b..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/internal/auto-tls.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} -{{- $ca := genCA "harbor-internal-ca" 365 }} -{{- $coreCN := (include "harbor.core" .) }} -{{- $coreCrt := genSignedCert $coreCN (list "127.0.0.1") (list "localhost" $coreCN) 365 $ca }} -{{- $jsCN := (include "harbor.jobservice" .) }} -{{- $jsCrt := genSignedCert $jsCN nil (list $jsCN) 365 $ca }} -{{- $regCN := (include "harbor.registry" .) }} -{{- $regCrt := genSignedCert $regCN nil (list $regCN) 365 $ca }} -{{- $portalCN := (include "harbor.portal" .) }} -{{- $portalCrt := genSignedCert $portalCN nil (list $portalCN) 365 $ca }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $coreCrt.Cert | b64enc | quote }} - tls.key: {{ $coreCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $jsCrt.Cert | b64enc | quote }} - tls.key: {{ $jsCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $regCrt.Cert | b64enc | quote }} - tls.key: {{ $regCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $portalCrt.Cert | b64enc | quote }} - tls.key: {{ $portalCrt.Key | b64enc | quote }} - -{{- if and .Values.trivy.enabled}} ---- -{{- $trivyCN := (include "harbor.trivy" .) }} -{{- $trivyCrt := genSignedCert $trivyCN nil (list $trivyCN) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $trivyCrt.Cert | b64enc | quote }} - tls.key: {{ $trivyCrt.Key | b64enc | quote }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-cm-env.yaml b/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-cm-env.yaml deleted file mode 100644 index 8411c7a47c..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-cm-env.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - CORE_URL: "{{ template "harbor.coreURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - - JOBSERVICE_WEBHOOK_JOB_MAX_RETRY: "{{ .Values.jobservice.notification.webhook_job_max_retry }}" - JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT: "{{ .Values.jobservice.notification.webhook_job_http_client_timeout }}" - - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.metrics.enabled}} - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: jobservice - {{- end }} - {{- template "harbor.traceEnvsForJobservice" . }} - {{- if .Values.cache.enabled }} - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-cm.yaml b/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-cm.yaml deleted file mode 100644 index 8211c62209..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-cm.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - #Server listening port - protocol: "{{ template "harbor.component.scheme" . }}" - port: {{ template "harbor.jobservice.containerPort". }} - {{- if .Values.internalTLS.enabled }} - https_config: - cert: "/etc/harbor/ssl/jobservice/tls.crt" - key: "/etc/harbor/ssl/jobservice/tls.key" - {{- end }} - worker_pool: - workers: {{ .Values.jobservice.maxJobWorkers }} - backend: "redis" - redis_pool: - redis_url: "{{ template "harbor.redis.urlForJobservice" . }}" - namespace: "harbor_job_service_namespace" - idle_timeout_second: 3600 - job_loggers: - {{- if has "file" .Values.jobservice.jobLoggers }} - - name: "FILE" - level: {{ .Values.logLevel | upper }} - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - {{- end }} - {{- if has "database" .Values.jobservice.jobLoggers }} - - name: "DB" - level: {{ .Values.logLevel | upper }} - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - {{- end }} - {{- if has "stdout" .Values.jobservice.jobLoggers }} - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - {{- end }} - metric: - enabled: {{ .Values.metrics.enabled }} - path: {{ .Values.metrics.jobservice.path }} - port: {{ .Values.metrics.jobservice.port }} - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: {{ .Values.jobservice.reaper.max_update_hours }} - # the max time for execution in running state without new task created - max_dangling_hours: {{ .Values.jobservice.reaper.max_dangling_hours }} diff --git a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-dpl.yaml b/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-dpl.yaml deleted file mode 100644 index 1bb6690824..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-dpl.yaml +++ /dev/null @@ -1,182 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice - app.kubernetes.io/component: jobservice -spec: - replicas: {{ .Values.jobservice.replicas }} - revisionHistoryLimit: {{ .Values.jobservice.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: jobservice - app.kubernetes.io/component: jobservice -{{- if .Values.jobservice.podLabels }} -{{ toYaml .Values.jobservice.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} - checksum/configmap-env: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/jobservice/jobservice-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.jobservice.podAnnotations }} -{{ toYaml .Values.jobservice.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.jobservice.serviceAccountName }} - serviceAccountName: {{ .Values.jobservice.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.jobservice.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: jobservice -{{- end }} -{{- end }} - {{- with .Values.jobservice.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: jobservice - image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.jobservice.resources }} - resources: -{{ toYaml .Values.jobservice.resources | indent 10 }} -{{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - {{- if .Values.jobservice.existingSecret }} - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/jobservice/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/jobservice/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/jobservice/ca.crt - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} -{{- with .Values.jobservice.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.jobservice" . }}-env" - - secretRef: - name: "{{ template "harbor.jobservice" . }}" - ports: - - containerPort: {{ template "harbor.jobservice.containerPort" . }} - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.subPath }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - mountPath: /etc/harbor/ssl/jobservice - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: jobservice-config - configMap: - name: "{{ template "harbor.jobservice" . }}" - - name: job-logs - {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLoggers) }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim | default (include "harbor.jobservice" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.jobservice.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.jobservice.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.jobservice.priorityClassName }} - priorityClassName: {{ .Values.jobservice.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-pvc.yaml b/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-pvc.yaml deleted file mode 100644 index 3f7d00b671..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-pvc.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- $jobLog := .Values.persistence.persistentVolumeClaim.jobservice.jobLog -}} -{{- if and .Values.persistence.enabled (not $jobLog.existingClaim) (has "file" .Values.jobservice.jobLoggers) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.jobservice" . }} - annotations: - {{- range $key, $value := $jobLog.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice - app.kubernetes.io/component: jobservice -spec: - accessModes: - - {{ $jobLog.accessMode }} - resources: - requests: - storage: {{ $jobLog.size }} - {{- if $jobLog.storageClass }} - {{- if eq "-" $jobLog.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $jobLog.storageClass }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-secrets.yaml b/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-secrets.yaml deleted file mode 100644 index eeb00bde00..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-secrets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.jobservice" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.jobservice.existingSecret }} - JOBSERVICE_SECRET: {{ .Values.jobservice.secret | default (include "harbor.secretKeyHelper" (dict "key" "JOBSERVICE_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-svc.yaml b/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-svc.yaml deleted file mode 100644 index d2b7a47fd4..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-svc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }} - port: {{ template "harbor.jobservice.servicePort" . }} - targetPort: {{ template "harbor.jobservice.containerPort" . }} -{{- if .Values.metrics.enabled }} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.jobservice.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice diff --git a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-tls.yaml b/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-tls.yaml deleted file mode 100644 index 234cb39995..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/jobservice/jobservice-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.jobservice.crt\" is required!" .Values.internalTLS.jobservice.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.jobservice.key\" is required!" .Values.internalTLS.jobservice.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/metrics/metrics-svcmon.yaml b/charts/harbor/harbor/1.15.0/templates/metrics/metrics-svcmon.yaml deleted file mode 100644 index 1122ef01ef..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/metrics/metrics-svcmon.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "harbor.fullname" . }} - labels: {{ include "harbor.labels" . | nindent 4 }} -{{- if .Values.metrics.serviceMonitor.additionalLabels }} -{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} -{{- end }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: {{ template "harbor.metricsPortName" . }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - honorLabels: true -{{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.metrics.serviceMonitor.relabelings | indent 4 }} -{{- end }} - selector: - matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/nginx/configmap-http.yaml b/charts/harbor/harbor/1.15.0/templates/nginx/configmap-http.yaml deleted file mode 100644 index c4b8354d06..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/nginx/configmap-http.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server {{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled}} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end }} - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - proxy_send_timeout 900; - proxy_read_timeout 900; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/nginx/configmap-https.yaml b/charts/harbor/harbor/1.15.0/templates/nginx/configmap-https.yaml deleted file mode 100644 index 56c943a619..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/nginx/configmap-https.yaml +++ /dev/null @@ -1,187 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server "{{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}"; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8443 ssl; - {{- end }} - # server_name harbordomain.com; - server_tokens off; - # SSL - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - # Add extra headers - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; HttpOnly; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end}} - #server_name harbordomain.com; - return 301 https://$host$request_uri; - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/nginx/deployment.yaml b/charts/harbor/harbor/1.15.0/templates/nginx/deployment.yaml deleted file mode 100644 index 3abc941989..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/nginx/deployment.yaml +++ /dev/null @@ -1,132 +0,0 @@ -{{- if ne .Values.expose.type "ingress" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: nginx - app.kubernetes.io/component: nginx -spec: - replicas: {{ .Values.nginx.replicas }} - revisionHistoryLimit: {{ .Values.nginx.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: nginx - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: nginx - app.kubernetes.io/component: nginx -{{- if .Values.nginx.podLabels }} -{{ toYaml .Values.nginx.podLabels | indent 8 }} -{{- end }} - annotations: - {{- if not .Values.expose.tls.enabled }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} - {{- else }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-https.yaml") . | sha256sum }} - {{- end }} - {{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} - checksum/secret: {{ include (print $.Template.BasePath "/nginx/secret.yaml") . | sha256sum }} - {{- end }} -{{- if .Values.nginx.podAnnotations }} -{{ toYaml .Values.nginx.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- if .Values.nginx.serviceAccountName }} - serviceAccountName: {{ .Values.nginx.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.nginx.automountServiceAccountToken | default false }} -{{- with .Values.nginx.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: nginx -{{- end }} -{{- end }} - containers: - - name: nginx - image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - {{- $_ := set . "scheme" "HTTP" -}} - {{- $_ := set . "port" "8080" -}} - {{- if .Values.expose.tls.enabled }} - {{- $_ := set . "scheme" "HTTPS" -}} - {{- $_ := set . "port" "8443" -}} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.nginx.resources }} - resources: -{{ toYaml .Values.nginx.resources | indent 10 }} -{{- end }} -{{- with .Values.nginx.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - ports: - - containerPort: 8080 - {{- if .Values.expose.tls.enabled }} - - containerPort: 8443 - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.expose.tls.enabled }} - - name: certificate - mountPath: /etc/nginx/cert - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.nginx" . }} - {{- if .Values.expose.tls.enabled }} - - name: certificate - secret: - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- with .Values.nginx.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nginx.priorityClassName }} - priorityClassName: {{ .Values.nginx.priorityClassName }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/nginx/secret.yaml b/charts/harbor/harbor/1.15.0/templates/nginx/secret.yaml deleted file mode 100644 index c819c556d9..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/nginx/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cn := (required "The \"expose.tls.auto.commonName\" is required!" .Values.expose.tls.auto.commonName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if regexMatch `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` $cn }} - {{- $cert := genSignedCert $cn (list $cn) nil 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- else }} - {{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/nginx/service.yaml b/charts/harbor/harbor/1.15.0/templates/nginx/service.yaml deleted file mode 100644 index 691584ce02..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/nginx/service.yaml +++ /dev/null @@ -1,94 +0,0 @@ -{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }} -apiVersion: v1 -kind: Service -metadata: -{{- if eq .Values.expose.type "clusterIP" }} -{{- $clusterIP := .Values.expose.clusterIP }} - name: {{ $clusterIP.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if .Values.expose.clusterIP.labels }} -{{ toYaml $clusterIP.labels | indent 4 }} -{{- end }} -{{- with $clusterIP.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: ClusterIP - {{- if .Values.expose.clusterIP.staticClusterIP }} - clusterIP: {{ .Values.expose.clusterIP.staticClusterIP }} - {{- end }} - ports: - - name: http - port: {{ $clusterIP.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $clusterIP.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- else if eq .Values.expose.type "nodePort" }} -{{- $nodePort := .Values.expose.nodePort }} - name: {{ $nodePort.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if .Values.expose.nodePort.labels }} -{{ toYaml $nodePort.labels | indent 4 }} -{{- end }} -{{- with $nodePort.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: NodePort - ports: - - name: http - port: {{ $nodePort.ports.http.port }} - targetPort: 8080 - {{- if $nodePort.ports.http.nodePort }} - nodePort: {{ $nodePort.ports.http.nodePort }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $nodePort.ports.https.port }} - targetPort: 8443 - {{- if $nodePort.ports.https.nodePort }} - nodePort: {{ $nodePort.ports.https.nodePort }} - {{- end }} - {{- end }} -{{- else if eq .Values.expose.type "loadBalancer" }} -{{- $loadBalancer := .Values.expose.loadBalancer }} - name: {{ $loadBalancer.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if .Values.expose.loadBalancer.labels }} -{{ toYaml $loadBalancer.labels | indent 4 }} -{{- end }} -{{- with $loadBalancer.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: LoadBalancer - {{- with $loadBalancer.sourceRanges }} - loadBalancerSourceRanges: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $loadBalancer.IP }} - loadBalancerIP: {{ $loadBalancer.IP }} - {{- end }} - ports: - - name: http - port: {{ $loadBalancer.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $loadBalancer.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: nginx -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/portal/configmap.yaml b/charts/harbor/harbor/1.15.0/templates/portal/configmap.yaml deleted file mode 100644 index 7b2118e721..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/portal/configmap.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - events { - worker_connections 1024; - } - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - {{- if .Values.internalTLS.enabled }} - {{- if .Values.ipFamily.ipv4.enabled}} - listen {{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - # SSL - ssl_certificate /etc/harbor/ssl/portal/tls.crt; - ssl_certificate_key /etc/harbor/ssl/portal/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - {{- else }} - {{- if .Values.ipFamily.ipv4.enabled }} - listen {{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- end }} - server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location /devcenter-api-2.0 { - try_files $uri $uri/ /swagger-ui-index.html; - } - location / { - try_files $uri $uri/ /index.html; - } - location = /index.html { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - } - } diff --git a/charts/harbor/harbor/1.15.0/templates/portal/deployment.yaml b/charts/harbor/harbor/1.15.0/templates/portal/deployment.yaml deleted file mode 100644 index 4dea944382..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/portal/deployment.yaml +++ /dev/null @@ -1,123 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: portal - app.kubernetes.io/component: portal -spec: - replicas: {{ .Values.portal.replicas }} - revisionHistoryLimit: {{ .Values.portal.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: portal - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: portal - app.kubernetes.io/component: portal -{{- if .Values.portal.podLabels }} -{{ toYaml .Values.portal.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} -{{- end }} - checksum/configmap: {{ include (print $.Template.BasePath "/portal/configmap.yaml") . | sha256sum }} -{{- if .Values.portal.podAnnotations }} -{{ toYaml .Values.portal.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- if .Values.portal.serviceAccountName }} - serviceAccountName: {{ .Values.portal.serviceAccountName }} -{{- end }} - automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }} -{{- with .Values.portal.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: portal -{{- end }} -{{- end }} - {{- with .Values.portal.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: portal - image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} -{{- if .Values.portal.resources }} - resources: -{{ toYaml .Values.portal.resources | indent 10 }} -{{- end }} -{{- with .Values.portal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: {{ template "harbor.portal.containerPort" . }} - volumeMounts: - - name: portal-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - mountPath: /etc/harbor/ssl/portal - {{- end }} - volumes: - - name: portal-config - configMap: - name: "{{ template "harbor.portal" . }}" - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.portal.secretName" . }} - {{- end }} - {{- with .Values.portal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.portal.priorityClassName }} - priorityClassName: {{ .Values.portal.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/portal/service.yaml b/charts/harbor/harbor/1.15.0/templates/portal/service.yaml deleted file mode 100644 index d00026da46..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/portal/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.portal.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: {{ template "harbor.portal.servicePort" . }} - targetPort: {{ template "harbor.portal.containerPort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: portal diff --git a/charts/harbor/harbor/1.15.0/templates/portal/tls.yaml b/charts/harbor/harbor/1.15.0/templates/portal/tls.yaml deleted file mode 100644 index de63f4e813..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/portal/tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.portal.crt\" is required!" .Values.internalTLS.portal.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.portal.key\" is required!" .Values.internalTLS.portal.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/redis/service.yaml b/charts/harbor/harbor/1.15.0/templates/redis/service.yaml deleted file mode 100644 index 79c95c3e05..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/redis/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 6379 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: redis -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/redis/statefulset.yaml b/charts/harbor/harbor/1.15.0/templates/redis/statefulset.yaml deleted file mode 100644 index 1d37fb184b..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/redis/statefulset.yaml +++ /dev/null @@ -1,125 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -{{- $redis := .Values.persistence.persistentVolumeClaim.redis -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: redis - app.kubernetes.io/component: redis -spec: - replicas: 1 - serviceName: {{ template "harbor.redis" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: redis - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: redis - app.kubernetes.io/component: redis -{{- if .Values.redis.podLabels }} -{{ toYaml .Values.redis.podLabels | indent 8 }} -{{- end }} -{{- if .Values.redis.podAnnotations }} - annotations: -{{ toYaml .Values.redis.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.redis.internal.serviceAccountName }} - serviceAccountName: {{ .Values.redis.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.redis.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - {{- with .Values.redis.internal.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: redis - image: {{ .Values.redis.internal.image.repository }}:{{ .Values.redis.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.redis.internal.resources }} - resources: -{{ toYaml .Values.redis.internal.resources | indent 10 }} -{{- end }} -{{- with .Values.redis.internal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: {{ $redis.subPath }} - {{- if not .Values.persistence.enabled }} - volumes: - - name: data - emptyDir: {} - {{- else if $redis.existingClaim }} - volumes: - - name: data - persistentVolumeClaim: - claimName: {{ $redis.existingClaim }} - {{- end -}} - {{- with .Values.redis.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.redis.internal.priorityClassName }} - priorityClassName: {{ .Values.redis.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $redis.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.legacy.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $redis.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $redis.accessMode | quote }}] - {{- if $redis.storageClass }} - {{- if (eq "-" $redis.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $redis.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $redis.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.15.0/templates/registry/registry-cm.yaml b/charts/harbor/harbor/1.15.0/templates/registry/registry-cm.yaml deleted file mode 100644 index 4f7056c384..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/registry/registry-cm.yaml +++ /dev/null @@ -1,246 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - version: 0.1 - log: - {{- if eq .Values.logLevel "warning" }} - level: warn - {{- else if eq .Values.logLevel "fatal" }} - level: error - {{- else }} - level: {{ .Values.logLevel }} - {{- end }} - fields: - service: registry - storage: - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if eq $type "filesystem" }} - filesystem: - rootdirectory: {{ $storage.filesystem.rootdirectory }} - {{- if $storage.filesystem.maxthreads }} - maxthreads: {{ $storage.filesystem.maxthreads }} - {{- end }} - {{- else if eq $type "azure" }} - azure: - accountname: {{ $storage.azure.accountname }} - container: {{ $storage.azure.container }} - {{- if $storage.azure.realm }} - realm: {{ $storage.azure.realm }} - {{- end }} - {{- else if eq $type "gcs" }} - gcs: - bucket: {{ $storage.gcs.bucket }} - {{- if not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity }} - keyfile: /etc/registry/gcs-key.json - {{- end }} - {{- if $storage.gcs.rootdirectory }} - rootdirectory: {{ $storage.gcs.rootdirectory }} - {{- end }} - {{- if $storage.gcs.chunksize }} - chunksize: {{ $storage.gcs.chunksize }} - {{- end }} - {{- else if eq $type "s3" }} - s3: - region: {{ $storage.s3.region }} - bucket: {{ $storage.s3.bucket }} - {{- if $storage.s3.regionendpoint }} - regionendpoint: {{ $storage.s3.regionendpoint }} - {{- end }} - {{- if $storage.s3.encrypt }} - encrypt: {{ $storage.s3.encrypt }} - {{- end }} - {{- if $storage.s3.keyid }} - keyid: {{ $storage.s3.keyid }} - {{- end }} - {{- if $storage.s3.secure }} - secure: {{ $storage.s3.secure }} - {{- end }} - {{- if and $storage.s3.secure $storage.s3.skipverify }} - skipverify: {{ $storage.s3.skipverify }} - {{- end }} - {{- if $storage.s3.v4auth }} - v4auth: {{ $storage.s3.v4auth }} - {{- end }} - {{- if $storage.s3.chunksize }} - chunksize: {{ $storage.s3.chunksize }} - {{- end }} - {{- if $storage.s3.rootdirectory }} - rootdirectory: {{ $storage.s3.rootdirectory }} - {{- end }} - {{- if $storage.s3.storageclass }} - storageclass: {{ $storage.s3.storageclass }} - {{- end }} - {{- if $storage.s3.multipartcopychunksize }} - multipartcopychunksize: {{ $storage.s3.multipartcopychunksize }} - {{- end }} - {{- if $storage.s3.multipartcopymaxconcurrency }} - multipartcopymaxconcurrency: {{ $storage.s3.multipartcopymaxconcurrency }} - {{- end }} - {{- if $storage.s3.multipartcopythresholdsize }} - multipartcopythresholdsize: {{ $storage.s3.multipartcopythresholdsize }} - {{- end }} - {{- else if eq $type "swift" }} - swift: - authurl: {{ $storage.swift.authurl }} - username: {{ $storage.swift.username }} - container: {{ $storage.swift.container }} - {{- if $storage.swift.region }} - region: {{ $storage.swift.region }} - {{- end }} - {{- if $storage.swift.tenant }} - tenant: {{ $storage.swift.tenant }} - {{- end }} - {{- if $storage.swift.tenantid }} - tenantid: {{ $storage.swift.tenantid }} - {{- end }} - {{- if $storage.swift.domain }} - domain: {{ $storage.swift.domain }} - {{- end }} - {{- if $storage.swift.domainid }} - domainid: {{ $storage.swift.domainid }} - {{- end }} - {{- if $storage.swift.trustid }} - trustid: {{ $storage.swift.trustid }} - {{- end }} - {{- if $storage.swift.insecureskipverify }} - insecureskipverify: {{ $storage.swift.insecureskipverify }} - {{- end }} - {{- if $storage.swift.chunksize }} - chunksize: {{ $storage.swift.chunksize }} - {{- end }} - {{- if $storage.swift.prefix }} - prefix: {{ $storage.swift.prefix }} - {{- end }} - {{- if $storage.swift.authversion }} - authversion: {{ $storage.swift.authversion }} - {{- end }} - {{- if $storage.swift.endpointtype }} - endpointtype: {{ $storage.swift.endpointtype }} - {{- end }} - {{- if $storage.swift.tempurlcontainerkey }} - tempurlcontainerkey: {{ $storage.swift.tempurlcontainerkey }} - {{- end }} - {{- if $storage.swift.tempurlmethods }} - tempurlmethods: {{ $storage.swift.tempurlmethods }} - {{- end }} - {{- else if eq $type "oss" }} - oss: - accesskeyid: {{ $storage.oss.accesskeyid }} - region: {{ $storage.oss.region }} - bucket: {{ $storage.oss.bucket }} - {{- if $storage.oss.endpoint }} - endpoint: {{ $storage.oss.bucket }}.{{ $storage.oss.endpoint }} - {{- end }} - {{- if $storage.oss.internal }} - internal: {{ $storage.oss.internal }} - {{- end }} - {{- if $storage.oss.encrypt }} - encrypt: {{ $storage.oss.encrypt }} - {{- end }} - {{- if $storage.oss.secure }} - secure: {{ $storage.oss.secure }} - {{- end }} - {{- if $storage.oss.chunksize }} - chunksize: {{ $storage.oss.chunksize }} - {{- end }} - {{- if $storage.oss.rootdirectory }} - rootdirectory: {{ $storage.oss.rootdirectory }} - {{- end }} - {{- end }} - cache: - layerinfo: redis - maintenance: - uploadpurging: - {{- if .Values.registry.upload_purging.enabled }} - enabled: true - age: {{ .Values.registry.upload_purging.age }} - interval: {{ .Values.registry.upload_purging.interval }} - dryrun: {{ .Values.registry.upload_purging.dryrun }} - {{- else }} - enabled: false - {{- end }} - delete: - enabled: true - redirect: - disable: {{ $storage.disableredirect }} - redis: - addr: {{ template "harbor.redis.addr" . }} - {{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }} - sentinelMasterSet: {{ template "harbor.redis.masterSet" . }} - {{- end }} - db: {{ template "harbor.redis.dbForRegistry" . }} - {{- if not (eq (include "harbor.redis.password" .) "") }} - password: {{ template "harbor.redis.password" . }} - {{- end }} - readtimeout: 10s - writetimeout: 10s - dialtimeout: 10s - pool: - maxidle: 100 - maxactive: 500 - idletimeout: 60s - http: - addr: :{{ template "harbor.registry.containerPort" . }} - relativeurls: {{ .Values.registry.relativeurls }} - {{- if .Values.internalTLS.enabled }} - tls: - certificate: /etc/harbor/ssl/registry/tls.crt - key: /etc/harbor/ssl/registry/tls.key - minimumtls: tls1.2 - {{- end }} - # set via environment variable - # secret: placeholder - debug: - {{- if .Values.metrics.enabled}} - addr: :{{ .Values.metrics.registry.port }} - prometheus: - enabled: true - path: {{ .Values.metrics.registry.path }} - {{- else }} - addr: localhost:5001 - {{- end }} - auth: - htpasswd: - realm: harbor-registry-basic-realm - path: /etc/registry/passwd - validation: - disabled: true - compatibility: - schema1: - enabled: true - - {{- if .Values.registry.middleware.enabled }} - {{- $middleware := .Values.registry.middleware }} - {{- $middlewareType := $middleware.type }} - {{- if eq $middlewareType "cloudFront" }} - middleware: - storage: - - name: cloudfront - options: - baseurl: {{ $middleware.cloudFront.baseurl }} - privatekey: /etc/registry/pk.pem - keypairid: {{ $middleware.cloudFront.keypairid }} - duration: {{ $middleware.cloudFront.duration }} - ipfilteredby: {{ $middleware.cloudFront.ipfilteredby }} - {{- end }} - {{- end }} - ctl-config.yml: |+ - --- - {{- if .Values.internalTLS.enabled }} - protocol: "https" - port: 8443 - https_config: - cert: "/etc/harbor/ssl/registry/tls.crt" - key: "/etc/harbor/ssl/registry/tls.key" - {{- else }} - protocol: "http" - port: 8080 - {{- end }} - log_level: {{ .Values.logLevel }} - registry_config: "/etc/registry/config.yml" diff --git a/charts/harbor/harbor/1.15.0/templates/registry/registry-dpl.yaml b/charts/harbor/harbor/1.15.0/templates/registry/registry-dpl.yaml deleted file mode 100644 index 0965cf2e2a..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/registry/registry-dpl.yaml +++ /dev/null @@ -1,431 +0,0 @@ -{{- $storage := .Values.persistence.imageChartStorage }} -{{- $type := $storage.type }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry - app.kubernetes.io/component: registry -spec: - replicas: {{ .Values.registry.replicas }} - revisionHistoryLimit: {{ .Values.registry.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: registry - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: registry - app.kubernetes.io/component: registry -{{- if .Values.registry.podLabels }} -{{ toYaml .Values.registry.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/registry/registry-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.registry.podAnnotations }} -{{ toYaml .Values.registry.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - fsGroupChangePolicy: OnRootMismatch -{{- if .Values.registry.serviceAccountName }} - serviceAccountName: {{ .Values.registry.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.registry.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: registry -{{- end }} -{{- end }} - {{- with .Values.registry.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: registry - image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.registry.resources }} - resources: -{{ toYaml .Values.registry.registry.resources | indent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: "{{ template "harbor.registry" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.registry.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registry.containerPort" . }} - - containerPort: {{ ternary .Values.metrics.registry.port 5001 .Values.metrics.enabled }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-htpasswd - mountPath: /etc/registry/passwd - subPath: passwd - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - mountPath: /etc/registry/pk.pem - subPath: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - - name: registryctl - image: {{ .Values.registry.controller.image.repository }}:{{ .Values.registry.controller.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.controller.resources }} - resources: -{{ toYaml .Values.registry.controller.resources | indent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.registryCtl" . }}" - - secretRef: - name: "{{ template "harbor.registry" . }}" - - secretRef: - name: "{{ template "harbor.registryCtl" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.controller.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registryctl.containerPort" . }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: registry-htpasswd - secret: - {{- if not .Values.registry.credentials.existingSecret }} - secretName: {{ template "harbor.registry" . }}-htpasswd - {{ else }} - secretName: {{ .Values.registry.credentials.existingSecret }} - {{- end }} - items: - - key: REGISTRY_HTPASSWD - path: passwd - - name: registry-config - configMap: - name: "{{ template "harbor.registry" . }}" - - name: registry-data - {{- if and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "filesystem") }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.registry.existingClaim | default (include "harbor.registry" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.registry.secretName" . }} - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - secret: - {{- if and (eq $type "gcs") $storage.gcs.existingSecret }} - secretName: {{ $storage.gcs.existingSecret }} - {{- else }} - secretName: {{ template "harbor.registry" . }} - {{- end }} - items: - - key: GCS_KEY_DATA - path: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - secret: - secretName: {{ .Values.persistence.imageChartStorage.caBundleSecretName }} - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - secret: - secretName: {{ .Values.registry.middleware.cloudFront.privateKeySecret }} - items: - - key: CLOUDFRONT_KEY_DATA - path: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.registry.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.registry.priorityClassName }} - priorityClassName: {{ .Values.registry.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/registry/registry-pvc.yaml b/charts/harbor/harbor/1.15.0/templates/registry/registry-pvc.yaml deleted file mode 100644 index 5d6d4d3ddf..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/registry/registry-pvc.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.persistence.enabled }} -{{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} -{{- if and (not $registry.existingClaim) (eq .Values.persistence.imageChartStorage.type "filesystem") }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.registry" . }} - annotations: - {{- range $key, $value := $registry.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry - app.kubernetes.io/component: registry -spec: - accessModes: - - {{ $registry.accessMode }} - resources: - requests: - storage: {{ $registry.size }} - {{- if $registry.storageClass }} - {{- if eq "-" $registry.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $registry.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/registry/registry-secret.yaml b/charts/harbor/harbor/1.15.0/templates/registry/registry-secret.yaml deleted file mode 100644 index e853a9cbec..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/registry/registry-secret.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.registry" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.registry.existingSecret }} - REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (include "harbor.secretKeyHelper" (dict "key" "REGISTRY_HTTP_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.redis.external.existingSecret }} - REGISTRY_REDIS_PASSWORD: {{ include "harbor.redis.password" . | b64enc | quote }} - {{- end }} - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if and (eq $type "azure") (not $storage.azure.existingSecret) }} - REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }} - {{- else if and (and (eq $type "gcs") (not $storage.gcs.existingSecret)) (not $storage.gcs.useWorkloadIdentity) }} - GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }} - {{- else if eq $type "s3" }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.accesskey) }} - REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }} - {{- end }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.secretkey) }} - REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "swift") (not ($storage.swift.existingSecret)) }} - REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }} - {{- if $storage.swift.secretkey }} - REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }} - {{- end }} - {{- if $storage.swift.accesskey }} - REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "oss") ((not ($storage.oss.existingSecret))) }} - REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }} - {{- end }} -{{- if not .Values.registry.credentials.existingSecret }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}-htpasswd" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if .Values.registry.credentials.htpasswdString }} - REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswdString | b64enc | quote }} - {{- else }} - REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/registry/registry-svc.yaml b/charts/harbor/harbor/1.15.0/templates/registry/registry-svc.yaml deleted file mode 100644 index 749690ea03..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/registry/registry-svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }} - port: {{ template "harbor.registry.servicePort" . }} - - - name: {{ ternary "https-controller" "http-controller" .Values.internalTLS.enabled }} - port: {{ template "harbor.registryctl.servicePort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.registry.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/registry/registry-tls.yaml b/charts/harbor/harbor/1.15.0/templates/registry/registry-tls.yaml deleted file mode 100644 index 9d1862c417..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/registry/registry-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.registry.crt\" is required!" .Values.internalTLS.registry.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.registry.key\" is required!" .Values.internalTLS.registry.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/registry/registryctl-cm.yaml b/charts/harbor/harbor/1.15.0/templates/registry/registryctl-cm.yaml deleted file mode 100644 index 87aa5ffe24..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/registry/registryctl-cm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- template "harbor.traceEnvsForRegistryCtl" . }} diff --git a/charts/harbor/harbor/1.15.0/templates/registry/registryctl-secret.yaml b/charts/harbor/harbor/1.15.0/templates/registry/registryctl-secret.yaml deleted file mode 100644 index 70097703e9..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/registry/registryctl-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- template "harbor.traceJaegerPassword" . }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.0/templates/trivy/trivy-secret.yaml b/charts/harbor/harbor/1.15.0/templates/trivy/trivy-secret.yaml deleted file mode 100644 index 84652c7498..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/trivy/trivy-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.trivy.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - redisURL: {{ include "harbor.redis.urlForTrivy" . | b64enc }} - gitHubToken: {{ .Values.trivy.gitHubToken | default "" | b64enc | quote }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/trivy/trivy-sts.yaml b/charts/harbor/harbor/1.15.0/templates/trivy/trivy-sts.yaml deleted file mode 100644 index c876ba3878..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/trivy/trivy-sts.yaml +++ /dev/null @@ -1,230 +0,0 @@ -{{- if .Values.trivy.enabled }} -{{- $trivy := .Values.persistence.persistentVolumeClaim.trivy }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: trivy - app.kubernetes.io/component: trivy -spec: - replicas: {{ .Values.trivy.replicas }} - serviceName: {{ template "harbor.trivy" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: trivy - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: trivy - app.kubernetes.io/component: trivy -{{- if .Values.trivy.podLabels }} -{{ toYaml .Values.trivy.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/trivy/trivy-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/trivy/trivy-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.trivy.podAnnotations }} -{{ toYaml .Values.trivy.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} -{{- end }} -{{- if .Values.trivy.serviceAccountName }} - serviceAccountName: {{ .Values.trivy.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }} -{{- with .Values.trivy.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: trivy -{{- end }} -{{- end }} - {{- with .Values.trivy.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: trivy - image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 12 }} - {{- end }} - env: - {{- if has "trivy" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - - name: "SCANNER_LOG_LEVEL" - value: {{ .Values.logLevel | quote }} - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: {{ .Values.trivy.debugMode | quote }} - - name: "SCANNER_TRIVY_VULN_TYPE" - value: {{ .Values.trivy.vulnType | quote }} - - name: "SCANNER_TRIVY_TIMEOUT" - value: {{ .Values.trivy.timeout | quote }} - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: {{ .Values.trivy.severity | quote }} - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: {{ .Values.trivy.ignoreUnfixed | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: {{ .Values.trivy.skipUpdate | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_JAVA_DB_UPDATE" - value: {{ .Values.trivy.skipJavaDBUpdate | default false | quote }} - - name: "SCANNER_TRIVY_OFFLINE_SCAN" - value: {{ .Values.trivy.offlineScan | default false | quote }} - - name: "SCANNER_TRIVY_SECURITY_CHECKS" - value: {{ .Values.trivy.securityCheck | quote }} - - name: "SCANNER_TRIVY_INSECURE" - value: {{ .Values.trivy.insecure | default false | quote }} - - name: SCANNER_API_SERVER_ADDR - value: ":{{ template "harbor.trivy.containerPort" . }}" - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: SCANNER_API_SERVER_TLS_KEY - value: /etc/harbor/ssl/trivy/tls.key - - name: SCANNER_API_SERVER_TLS_CERTIFICATE - value: /etc/harbor/ssl/trivy/tls.crt - {{- end }} - - name: "SCANNER_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL -{{- with .Values.trivy.extraEnvVars }} -{{- toYaml . | nindent 12 }} -{{- end }} - ports: - - name: api-server - containerPort: {{ template "harbor.trivy.containerPort" . }} - volumeMounts: - - name: data - mountPath: /home/scanner/.cache - subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} - readOnly: false - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - mountPath: /etc/harbor/ssl/trivy - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 10 }} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: -{{ toYaml .Values.trivy.resources | indent 12 }} - {{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }} - volumes: - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.trivy.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- if not .Values.persistence.enabled }} - - name: "data" - emptyDir: {} - {{- else if $trivy.existingClaim }} - - name: "data" - persistentVolumeClaim: - claimName: {{ $trivy.existingClaim }} - {{- end }} - {{- end }} - {{- with .Values.trivy.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.trivy.priorityClassName }} - priorityClassName: {{ .Values.trivy.priorityClassName }} - {{- end }} -{{- if and .Values.persistence.enabled (not $trivy.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.legacy.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $trivy.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $trivy.accessMode | quote }}] - {{- if $trivy.storageClass }} - {{- if (eq "-" $trivy.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $trivy.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $trivy.size | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/templates/trivy/trivy-svc.yaml b/charts/harbor/harbor/1.15.0/templates/trivy/trivy-svc.yaml deleted file mode 100644 index 24daf094e8..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/trivy/trivy-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{ if .Values.trivy.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.trivy" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-trivy" "http-trivy" .Values.internalTLS.enabled }} - protocol: TCP - port: {{ template "harbor.trivy.servicePort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: trivy -{{ end }} diff --git a/charts/harbor/harbor/1.15.0/templates/trivy/trivy-tls.yaml b/charts/harbor/harbor/1.15.0/templates/trivy/trivy-tls.yaml deleted file mode 100644 index a9c8330c37..0000000000 --- a/charts/harbor/harbor/1.15.0/templates/trivy/trivy-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.trivy.enabled .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.trivy.crt\" is required!" .Values.internalTLS.trivy.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.trivy.key\" is required!" .Values.internalTLS.trivy.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.0/values.yaml b/charts/harbor/harbor/1.15.0/values.yaml deleted file mode 100644 index 529ec928b7..0000000000 --- a/charts/harbor/harbor/1.15.0/values.yaml +++ /dev/null @@ -1,1058 +0,0 @@ -expose: - # Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" - # and fill the information in the corresponding section - type: ingress - tls: - # Enable TLS or not. - # Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" - # Note: if the "expose.type" is "ingress" and TLS is disabled, - # the port must be included in the command when pulling/pushing images. - # Refer to https://github.com/goharbor/harbor/issues/5291 for details. - enabled: true - # The source of the tls certificate. Set as "auto", "secret" - # or "none" and fill the information in the corresponding section - # 1) auto: generate the tls certificate automatically - # 2) secret: read the tls certificate from the specified secret. - # The tls certificate can be generated manually or by cert manager - # 3) none: configure no tls certificate for the ingress. If the default - # tls certificate is configured in the ingress controller, choose this option - certSource: auto - auto: - # The common name used to generate the certificate, it's necessary - # when the type isn't "ingress" - commonName: "" - secret: - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - secretName: "" - ingress: - hosts: - core: core.harbor.domain - # set to the type of ingress controller if it has specific requirements. - # leave as `default` for most ingress controllers. - # set to `gce` if using the GCE ingress controller - # set to `ncp` if using the NCP (NSX-T Container Plugin) ingress controller - # set to `alb` if using the ALB ingress controller - # set to `f5-bigip` if using the F5 BIG-IP ingress controller - controller: default - ## Allow .Capabilities.KubeVersion.Version to be overridden while creating ingress - kubeVersionOverride: "" - className: "" - annotations: - # note different ingress controllers may require a different ssl-redirect annotation - # for Envoy, use ingress.kubernetes.io/force-ssl-redirect: "true" and remove the nginx lines below - ingress.kubernetes.io/ssl-redirect: "true" - ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - # ingress-specific labels - labels: {} - clusterIP: - # The name of ClusterIP service - name: harbor - # The ip address of the ClusterIP service (leave empty for acquiring dynamic ip) - staticClusterIP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - # Annotations on the ClusterIP service - annotations: {} - # ClusterIP-specific labels - labels: {} - nodePort: - # The name of NodePort service - name: harbor - ports: - http: - # The service port Harbor listens on when serving HTTP - port: 80 - # The node port Harbor listens on when serving HTTP - nodePort: 30002 - https: - # The service port Harbor listens on when serving HTTPS - port: 443 - # The node port Harbor listens on when serving HTTPS - nodePort: 30003 - # Annotations on the nodePort service - annotations: {} - # nodePort-specific labels - labels: {} - loadBalancer: - # The name of LoadBalancer service - name: harbor - # Set the IP if the LoadBalancer supports assigning IP - IP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - # Annotations on the loadBalancer service - annotations: {} - # loadBalancer-specific labels - labels: {} - sourceRanges: [] - -# The external URL for Harbor core service. It is used to -# 1) populate the docker/helm commands showed on portal -# 2) populate the token service URL returned to docker client -# -# Format: protocol://domain[:port]. Usually: -# 1) if "expose.type" is "ingress", the "domain" should be -# the value of "expose.ingress.hosts.core" -# 2) if "expose.type" is "clusterIP", the "domain" should be -# the value of "expose.clusterIP.name" -# 3) if "expose.type" is "nodePort", the "domain" should be -# the IP address of k8s node -# -# If Harbor is deployed behind the proxy, set it as the URL of proxy -externalURL: https://core.harbor.domain - -# The persistence is enabled by default and a default StorageClass -# is needed in the k8s cluster to provision volumes dynamically. -# Specify another StorageClass in the "storageClass" or set "existingClaim" -# if you already have existing persistent volumes to use -# -# For storing images and charts, you can also use "azure", "gcs", "s3", -# "swift" or "oss". Set it in the "imageChartStorage" section -persistence: - enabled: true - # Setting it to "keep" to avoid removing PVCs during a helm delete - # operation. Leaving it empty will delete PVCs after the chart deleted - # (this does not apply for PVCs that are created for internal database - # and redis components, i.e. they are never deleted automatically) - resourcePolicy: "keep" - persistentVolumeClaim: - registry: - # Use the existing PVC which must be created manually before bound, - # and specify the "subPath" if the PVC is shared with other components - existingClaim: "" - # Specify the "storageClass" used to provision the volume. Or the default - # StorageClass will be used (the default). - # Set it to "-" to disable dynamic provisioning - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - jobservice: - jobLog: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external database is used, the following settings for database will - # be ignored - database: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external Redis is used, the following settings for Redis will - # be ignored - redis: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - trivy: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - # Define which storage backend is used for registry to store - # images and charts. Refer to - # https://github.com/distribution/distribution/blob/main/docs/content/about/configuration.md#storage - # for the detail. - imageChartStorage: - # Specify whether to disable `redirect` for images and chart storage, for - # backends which not supported it (such as using minio for `s3` storage type), please disable - # it. To disable redirects, simply set `disableredirect` to `true` instead. - # Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#redirect - # for the detail. - disableredirect: false - # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate. - # The secret must contain keys named "ca.crt" which will be injected into the trust store - # of registry's containers. - # caBundleSecretName: - - # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift", - # "oss" and fill the information needed in the corresponding section. The type - # must be "filesystem" if you want to use persistent volumes for registry - type: filesystem - filesystem: - rootdirectory: /storage - #maxthreads: 100 - azure: - accountname: accountname - accountkey: base64encodedaccountkey - container: containername - #realm: core.windows.net - # To use existing secret, the key must be AZURE_STORAGE_ACCESS_KEY - existingSecret: "" - gcs: - bucket: bucketname - # The base64 encoded json file which contains the key - encodedkey: base64-encoded-json-key-file - #rootdirectory: /gcs/object/name/prefix - #chunksize: "5242880" - # To use existing secret, the key must be GCS_KEY_DATA - existingSecret: "" - useWorkloadIdentity: false - s3: - # Set an existing secret for S3 accesskey and secretkey - # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry - #existingSecret: "" - region: us-west-1 - bucket: bucketname - #accesskey: awsaccesskey - #secretkey: awssecretkey - #regionendpoint: http://myobjects.local - #encrypt: false - #keyid: mykeyid - #secure: true - #skipverify: false - #v4auth: true - #chunksize: "5242880" - #rootdirectory: /s3/object/name/prefix - #storageclass: STANDARD - #multipartcopychunksize: "33554432" - #multipartcopymaxconcurrency: 100 - #multipartcopythresholdsize: "33554432" - swift: - authurl: https://storage.myprovider.com/v3/auth - username: username - password: password - container: containername - # keys in existing secret must be REGISTRY_STORAGE_SWIFT_PASSWORD, REGISTRY_STORAGE_SWIFT_SECRETKEY, REGISTRY_STORAGE_SWIFT_ACCESSKEY - existingSecret: "" - #region: fr - #tenant: tenantname - #tenantid: tenantid - #domain: domainname - #domainid: domainid - #trustid: trustid - #insecureskipverify: false - #chunksize: 5M - #prefix: - #secretkey: secretkey - #accesskey: accesskey - #authversion: 3 - #endpointtype: public - #tempurlcontainerkey: false - #tempurlmethods: - oss: - accesskeyid: accesskeyid - accesskeysecret: accesskeysecret - region: regionname - bucket: bucketname - # key in existingSecret must be REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - existingSecret: "" - #endpoint: endpoint - #internal: false - #encrypt: false - #secure: true - #chunksize: 10M - #rootdirectory: rootdirectory - -# The initial password of Harbor admin. Change it from portal after launching Harbor -# or give an existing secret for it -# key in secret is given via (default to HARBOR_ADMIN_PASSWORD) -# existingSecretAdminPassword: -existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD -harborAdminPassword: "Harbor12345" - -# The internal TLS used for harbor components secure communicating. In order to enable https -# in each component tls cert files need to provided in advance. -internalTLS: - # If internal TLS enabled - enabled: false - # enable strong ssl ciphers (default: false) - strong_ssl_ciphers: false - # There are three ways to provide tls - # 1) "auto" will generate cert automatically - # 2) "manual" need provide cert file manually in following value - # 3) "secret" internal certificates from secret - certSource: "auto" - # The content of trust ca, only available when `certSource` is "manual" - trustCa: "" - # core related cert configuration - core: - # secret name for core's tls certs - secretName: "" - # Content of core's TLS cert file, only available when `certSource` is "manual" - crt: "" - # Content of core's TLS key file, only available when `certSource` is "manual" - key: "" - # jobservice related cert configuration - jobservice: - # secret name for jobservice's tls certs - secretName: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - key: "" - # registry related cert configuration - registry: - # secret name for registry's tls certs - secretName: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - key: "" - # portal related cert configuration - portal: - # secret name for portal's tls certs - secretName: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - key: "" - # trivy related cert configuration - trivy: - # secret name for trivy's tls certs - secretName: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - key: "" - -ipFamily: - # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component - ipv6: - enabled: true - # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component - ipv4: - enabled: true - -imagePullPolicy: IfNotPresent - -# Use this set to assign a list of default pullSecrets -imagePullSecrets: -# - name: docker-registry-secret -# - name: internal-registry-secret - -# The update strategy for deployments with persistent volumes(jobservice, registry): "RollingUpdate" or "Recreate" -# Set it as "Recreate" when "RWM" for volumes isn't supported -updateStrategy: - type: RollingUpdate - -# debug, info, warning, error or fatal -logLevel: info - -# The name of the secret which contains key named "ca.crt". Setting this enables the -# download link on portal to download the CA certificate when the certificate isn't -# generated automatically -caSecretName: "" - -# The secret key used for encryption. Must be a string of 16 chars. -secretKey: "not-a-secure-key" -# If using existingSecretSecretKey, the key must be secretKey -existingSecretSecretKey: "" - -# The proxy settings for updating trivy vulnerabilities from the Internet and replicating -# artifacts from/to the registries that cannot be reached directly -proxy: - httpProxy: - httpsProxy: - noProxy: 127.0.0.1,localhost,.local,.internal - components: - - core - - jobservice - - trivy - -# Run the migration job via helm hook -enableMigrateHelmHook: false - -# The custom ca bundle secret, the secret must contain key named "ca.crt" -# which will be injected into the trust store for core, jobservice, registry, trivy components -# caBundleSecretName: "" - -## UAA Authentication Options -# If you're using UAA for authentication behind a self-signed -# certificate you will need to provide the CA Cert. -# Set uaaSecretName below to provide a pre-created secret that -# contains a base64 encoded CA Certificate named `ca.crt`. -# uaaSecretName: - -metrics: - enabled: false - core: - path: /metrics - port: 8001 - registry: - path: /metrics - port: 8001 - jobservice: - path: /metrics - port: 8001 - exporter: - path: /metrics - port: 8001 - ## Create prometheus serviceMonitor to scrape harbor metrics. - ## This requires the monitoring.coreos.com/v1 CRD. Please see - ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md - ## - serviceMonitor: - enabled: false - additionalLabels: {} - # Scrape interval. If not set, the Prometheus default scrape interval is used. - interval: "" - # Metric relabel configs to apply to samples before ingestion. - metricRelabelings: - [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - # Relabel configs to apply to samples before ingestion. - relabelings: - [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] - # separator: ; - # regex: ^(.*)$ - # targetLabel: nodename - # replacement: $1 - # action: replace - -trace: - enabled: false - # trace provider: jaeger or otel - # jaeger should be 1.26+ - provider: jaeger - # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth - sample_rate: 1 - # namespace used to differentiate different harbor services - # namespace: - # attributes is a key value dict contains user defined attributes used to initialize trace provider - # attributes: - # application: harbor - jaeger: - # jaeger supports two modes: - # collector mode(uncomment endpoint and uncomment username, password if needed) - # agent mode(uncomment agent_host and agent_port) - endpoint: http://hostname:14268/api/traces - # username: - # password: - # agent_host: hostname - # export trace data by jaeger.thrift in compact mode - # agent_port: 6831 - otel: - endpoint: hostname:4318 - url_path: /v1/traces - compression: false - insecure: true - # timeout is in seconds - timeout: 10 - -# cache layer configurations -# if this feature enabled, harbor will cache the resource -# `project/project_metadata/repository/artifact/manifest` in the redis -# which help to improve the performance of high concurrent pulling manifest. -cache: - # default is not enabled. - enabled: false - # default keep cache for one day. - expireHours: 24 - -## set Container Security Context to comply with PSP restricted policy if necessary -## each of the conatiner will apply the same security context -## containerSecurityContext:{} is initially an empty yaml that you could edit it on demand, we just filled with a common template for convenience -containerSecurityContext: - privileged: false - allowPrivilegeEscalation: false - seccompProfile: - type: RuntimeDefault - runAsNonRoot: true - capabilities: - drop: - - ALL - -# If service exposed via "ingress", the Nginx will not be used -nginx: - image: - repository: goharbor/nginx-photon - tag: v2.11.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -portal: - image: - repository: goharbor/harbor-portal - tag: v2.11.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - -core: - image: - repository: goharbor/harbor-core - tag: v2.11.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - ## Startup probe values - startupProbe: - enabled: true - initialDelaySeconds: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - ## User settings configuration json string - configureUserSettings: - # The provider for updating project quota(usage), there are 2 options, redis or db. - # By default it is implemented by db but you can configure it to redis which - # can improve the performance of high concurrent pushing to the same project, - # and reduce the database connections spike and occupies. - # Using redis will bring up some delay for quota usage updation for display, so only - # suggest switch provider to redis if you were ran into the db connections spike around - # the scenario of high concurrent pushing to same project, no improvment for other scenes. - quotaUpdateProvider: db # Or redis - # Secret is used when core server communicates with other components. - # If a secret key is not specified, Helm will generate one. Alternatively set existingSecret to use an existing secret - # Must be a string of 16 chars. - secret: "" - # Fill in the name of a kubernetes secret if you want to use your own - # If using existingSecret, the key must be secret - existingSecret: "" - # Fill the name of a kubernetes secret if you want to use your own - # TLS certificate and private key for token encryption/decryption. - # The secret must contain keys named: - # "tls.key" - the private key - # "tls.crt" - the certificate - secretName: "" - # If not specifying a preexisting secret, a secret can be created from tokenKey and tokenCert and used instead. - # If none of secretName, tokenKey, and tokenCert are specified, an ephemeral key and certificate will be autogenerated. - # tokenKey and tokenCert must BOTH be set or BOTH unset. - # The tokenKey value is formatted as a multiline string containing a PEM-encoded RSA key, indented one more than tokenKey on the following line. - tokenKey: | - # If tokenKey is set, the value of tokenCert must be set as a PEM-encoded certificate signed by tokenKey, and supplied as a multiline string, indented one more than tokenCert on the following line. - tokenCert: | - # The XSRF key. Will be generated automatically if it isn't specified - xsrfKey: "" - # If using existingSecret, the key is defined by core.existingXsrfSecretKey - existingXsrfSecret: "" - # If using existingSecret, the key - existingXsrfSecretKey: CSRF_KEY - # The time duration for async update artifact pull_time and repository - # pull_count, the unit is second. Will be 10 seconds if it isn't set. - # eg. artifactPullAsyncFlushDuration: 10 - artifactPullAsyncFlushDuration: - gdpr: - deleteUser: false - auditLogsCompliant: false - -jobservice: - image: - repository: goharbor/harbor-jobservice - tag: v2.11.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - maxJobWorkers: 10 - # The logger for jobs: "file", "database" or "stdout" - jobLoggers: - - file - # - database - # - stdout - # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days - notification: - webhook_job_max_retry: 3 - webhook_job_http_client_timeout: 3 # in seconds - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: 24 - # the max time for execution in running state without new task created - max_dangling_hours: 168 - # Secret is used when job service communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the job service secret - existingSecretKey: JOBSERVICE_SECRET - -registry: - registry: - image: - repository: goharbor/registry-photon - tag: v2.11.0 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - controller: - image: - repository: goharbor/harbor-registryctl - tag: v2.11.0 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - # Secret is used to secure the upload state from client - # and registry storage backend. - # See: https://github.com/distribution/distribution/blob/main/docs/configuration.md#http - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the registry service secret - existingSecretKey: REGISTRY_HTTP_SECRET - # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. - relativeurls: false - credentials: - username: "harbor_registry_user" - password: "harbor_registry_password" - # If using existingSecret, the key must be REGISTRY_PASSWD and REGISTRY_HTPASSWD - existingSecret: "" - # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. - # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string - htpasswdString: "" - middleware: - enabled: false - type: cloudFront - cloudFront: - baseurl: example.cloudfront.net - keypairid: KEYPAIRID - duration: 3000s - ipfilteredby: none - # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key - # that allows access to CloudFront - privateKeySecret: "my-secret" - # enable purge _upload directories - upload_purging: - enabled: true - # remove files in _upload directories which exist for a period of time, default is one week. - age: 168h - # the interval of the purge operations - interval: 24h - dryrun: false - -trivy: - # enabled the flag to enable Trivy scanner - enabled: true - image: - # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon - # tag the tag for Trivy adapter image - tag: v2.11.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # replicas the number of Pod replicas - replicas: 1 - resources: - requests: - cpu: 200m - memory: 512Mi - limits: - cpu: 1 - memory: 1Gi - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - # debugMode the flag to enable Trivy debug mode with more verbose scanning log - debugMode: false - # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`. - vulnType: "os,library" - # severity a comma-separated list of severities to be checked - severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - # ignoreUnfixed the flag to display only fixed vulnerabilities - ignoreUnfixed: false - # insecure the flag to skip verifying registry certificate - insecure: false - # gitHubToken the GitHub access token to download Trivy DB - # - # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases. - # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached - # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update - # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one. - # Currently, the database is updated every 12 hours and published as a new release to GitHub. - # - # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough - # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000 - # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult - # https://developer.github.com/v3/#rate-limiting - # - # You can create a GitHub token by following the instructions in - # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - gitHubToken: "" - # skipUpdate the flag to disable Trivy DB downloads from GitHub - # - # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues. - # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the - # `/home/scanner/.cache/trivy/db/trivy.db` path. - skipUpdate: false - # skipJavaDBUpdate If the flag is enabled you have to manually download the `trivy-java.db` file and mount it in the - # `/home/scanner/.cache/trivy/java-db/trivy-java.db` path - # - skipJavaDBUpdate: false - # The offlineScan option prevents Trivy from sending API requests to identify dependencies. - # - # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it. - # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't - # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode. - # It would work if all the dependencies are in local. - # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment. - offlineScan: false - # Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. Defaults to `vuln`. - securityCheck: "vuln" - # The duration to wait for scan completion - timeout: 5m0s - -database: - # if external database is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - image: - repository: goharbor/harbor-db - tag: v2.11.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - # The timeout used in livenessProbe; 1 to 5 seconds - livenessProbe: - timeoutSeconds: 1 - # The timeout used in readinessProbe; 1 to 5 seconds - readinessProbe: - timeoutSeconds: 1 - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - extrInitContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - # The initial superuser password for internal database - password: "changeit" - # The size limit for Shared memory, pgSQL use it for shared_buffer - # More details see: - # https://github.com/goharbor/harbor/issues/15034 - shmSizeLimit: 512Mi - initContainer: - migrator: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - permissions: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - external: - host: "192.168.0.1" - port: "5432" - username: "user" - password: "password" - coreDatabase: "registry" - # if using existing secret, the key must be "password" - existingSecret: "" - # "disable" - No SSL - # "require" - Always SSL (skip verification) - # "verify-ca" - Always SSL (verify that the certificate presented by the - # server was signed by a trusted CA) - # "verify-full" - Always SSL (verify that the certification presented by the - # server was signed by a trusted CA and the server host name matches the one - # in the certificate) - sslmode: "disable" - # The maximum number of connections in the idle connection pool per pod (core+exporter). - # If it <=0, no idle connections are retained. - maxIdleConns: 100 - # The maximum number of open connections to the database per pod (core+exporter). - # If it <= 0, then there is no limit on the number of open connections. - # Note: the default number of connections is 1024 for harbor's postgres. - maxOpenConns: 900 - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -redis: - # if external Redis is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - image: - repository: goharbor/redis-photon - tag: v2.11.0 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - # # jobserviceDatabaseIndex defaults to "1" - # # registryDatabaseIndex defaults to "2" - # # trivyAdapterIndex defaults to "5" - # # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - external: - # support redis, redis+sentinel - # addr for redis: : - # addr for redis+sentinel: :,:,: - addr: "192.168.0.2:6379" - # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel - sentinelMasterSet: "" - # The "coreDatabaseIndex" must be "0" as the library Harbor - # used doesn't support configuring it - # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - coreDatabaseIndex: "0" - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - # username field can be an empty string, and it will be authenticated against the default user - username: "" - password: "" - # If using existingSecret, the key must be REDIS_PASSWORD - existingSecret: "" - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -exporter: - image: - repository: goharbor/harbor-exporter - tag: v2.11.0 - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - ## The priority class to run the pod as - priorityClassName: - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - cacheDuration: 23 - cacheCleanInterval: 14400 diff --git a/charts/harbor/harbor/1.15.1/.helmignore b/charts/harbor/harbor/1.15.1/.helmignore deleted file mode 100644 index b4424fd59b..0000000000 --- a/charts/harbor/harbor/1.15.1/.helmignore +++ /dev/null @@ -1,6 +0,0 @@ -.github/* -docs/* -.git/* -.gitignore -CONTRIBUTING.md -test/* \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/Chart.yaml b/charts/harbor/harbor/1.15.1/Chart.yaml deleted file mode 100644 index 32f6cd1f68..0000000000 --- a/charts/harbor/harbor/1.15.1/Chart.yaml +++ /dev/null @@ -1,30 +0,0 @@ -annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor -apiVersion: v1 -appVersion: 2.11.1 -description: An open source trusted cloud native registry that stores, signs, and - scans content -home: https://goharbor.io -icon: file://assets/icons/harbor.png -keywords: -- docker -- registry -- harbor -kubeVersion: '>=1.20-0' -maintainers: -- email: yan-yw.wang@broadcom.com - name: Yan Wang -- email: wenkai.yin@broadcom.com - name: Wenkai Yin -- email: miner.yang@broadcom.com - name: Miner Yang -- email: shengwen.yu@broadcom.com - name: Shengwen Yu -name: harbor -sources: -- https://github.com/goharbor/harbor -- https://github.com/goharbor/harbor-helm -version: 1.15.1 diff --git a/charts/harbor/harbor/1.15.1/LICENSE b/charts/harbor/harbor/1.15.1/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/charts/harbor/harbor/1.15.1/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/charts/harbor/harbor/1.15.1/README.md b/charts/harbor/harbor/1.15.1/README.md deleted file mode 100644 index a78cfa6700..0000000000 --- a/charts/harbor/harbor/1.15.1/README.md +++ /dev/null @@ -1,422 +0,0 @@ -# Helm Chart for Harbor - -**Notes:** The master branch is in heavy development, please use the other stable versions instead. A highly available solution for Harbor based on chart can be found [here](docs/High%20Availability.md). And refer to the [guide](docs/Upgrade.md) to upgrade the existing deployment. - -This repository, including the issues, focuses on deploying Harbor chart via helm. For functionality issues or Harbor questions, please open issues on [goharbor/harbor](https://github.com/goharbor/harbor) - -## Introduction - -This [Helm](https://github.com/kubernetes/helm) chart installs [Harbor](https://github.com/goharbor/harbor) in a Kubernetes cluster. Welcome to [contribute](CONTRIBUTING.md) to Helm Chart for Harbor. - -## Prerequisites - -- Kubernetes cluster 1.20+ -- Helm v3.2.0+ - -## Installation - -### Add Helm repository - -```bash -helm repo add harbor https://helm.goharbor.io -``` - -### Configure the chart - -The following items can be set via `--set` flag during installation or configured by editing the `values.yaml` directly (need to download the chart first). - -#### Configure how to expose Harbor service - -- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. - **Notes:** if TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to issue [#5291](https://github.com/goharbor/harbor/issues/5291) for details. -- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. -- **NodePort**: Exposes the service on each Node’s IP at a static port (the NodePort). You’ll be able to contact the NodePort service, from outside the cluster, by requesting `NodeIP:NodePort`. -- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. - -#### Configure the external URL - -The external URL for Harbor core service is used to: - -1. populate the docker/helm commands showed on portal -2. populate the token service URL returned to docker client - -Format: `protocol://domain[:port]`. Usually: - -- if service exposed via `Ingress`, the `domain` should be the value of `expose.ingress.hosts.core` -- if service exposed via `ClusterIP`, the `domain` should be the value of `expose.clusterIP.name` -- if service exposed via `NodePort`, the `domain` should be the IP address of one Kubernetes node -- if service exposed via `LoadBalancer`, set the `domain` as your own domain name and add a CNAME record to map the domain name to the one you got from the cloud provider - -If Harbor is deployed behind the proxy, set it as the URL of proxy. - -#### Configure how to persist data - -- **Disable**: The data does not survive the termination of a pod. -- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you already have existing persistent volumes to use. -- **External Storage(only for images and charts)**: For images and charts, the external storages are supported: `azure`, `gcs`, `s3` `swift` and `oss`. - -#### Configure the other items listed in [configuration](#configuration) section - -### Install the chart - -Install the Harbor helm chart with a release name `my-release`: -```bash -helm install my-release harbor/harbor -``` - -## Uninstallation - -To uninstall/delete the `my-release` deployment: -```bash -helm uninstall my-release -``` - -## Configuration - -The following table lists the configurable parameters of the Harbor chart and the default values. - -| Parameter | Description | Default | -|-----------------------------------------------------------------------| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | -| **Expose** | | | -| `expose.type` | How to expose the service: `ingress`, `clusterIP`, `nodePort` or `loadBalancer`, other values will be ignored and the creation of service will be skipped. | `ingress` | -| `expose.tls.enabled` | Enable TLS or not. Delete the `ssl-redirect` annotations in `expose.ingress.annotations` when TLS is disabled and `expose.type` is `ingress`. Note: if the `expose.type` is `ingress` and TLS is disabled, the port must be included in the command when pulling/pushing images. Refer to https://github.com/goharbor/harbor/issues/5291 for details. | `true` | -| `expose.tls.certSource` | The source of the TLS certificate. Set as `auto`, `secret` or `none` and fill the information in the corresponding section: 1) auto: generate the TLS certificate automatically 2) secret: read the TLS certificate from the specified secret. The TLS certificate can be generated manually or by cert manager 3) none: configure no TLS certificate for the ingress. If the default TLS certificate is configured in the ingress controller, choose this option | `auto` | -| `expose.tls.auto.commonName` | The common name used to generate the certificate, it's necessary when the type isn't `ingress` | | -| `expose.tls.secret.secretName` | The name of secret which contains keys named: `tls.crt` - the certificate; `tls.key` - the private key | | -| `expose.ingress.hosts.core` | The host of Harbor core service in ingress rule | `core.harbor.domain` | -| `expose.ingress.controller` | The ingress controller type. Currently supports `default`, `gce`, `alb`, `f5-bigip` and `ncp` | `default` | -| `expose.ingress.kubeVersionOverride` | Allows the ability to override the kubernetes version used while templating the ingress | | -| `expose.ingress.annotations` | The annotations used commonly for ingresses | | -| `expose.ingress.labels` | The labels specific to ingress | {} | -| `expose.clusterIP.name` | The name of ClusterIP service | `harbor` | -| `expose.clusterIP.annotations` | The annotations attached to the ClusterIP service | {} | -| `expose.clusterIP.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.clusterIP.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.clusterIP.annotations` | The annotations used commonly for clusterIP | | -| `expose.clusterIP.labels` | The labels specific to clusterIP | {} | -| `expose.nodePort.name` | The name of NodePort service | `harbor` | -| `expose.nodePort.ports.http.port` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.nodePort.ports.http.nodePort` | The node port Harbor listens on when serving HTTP | `30002` | -| `expose.nodePort.ports.https.port` | The service port Harbor listens on when serving HTTPS | `443` | -| `expose.nodePort.ports.https.nodePort` | The node port Harbor listens on when serving HTTPS | `30003` | -| `expose.nodePort.annotations` | The annotations used commonly for nodePort | | -| `expose.nodePort.labels` | The labels specific to nodePort | {} | -| `expose.loadBalancer.name` | The name of service | `harbor` | -| `expose.loadBalancer.IP` | The IP of the loadBalancer. It only works when loadBalancer supports assigning IP | `""` | -| `expose.loadBalancer.ports.httpPort` | The service port Harbor listens on when serving HTTP | `80` | -| `expose.loadBalancer.ports.httpsPort` | The service port Harbor listens on when serving HTTPS | `30002` | -| `expose.loadBalancer.annotations` | The annotations attached to the loadBalancer service | {} | -| `expose.loadBalancer.labels` | The labels specific to loadBalancer | {} | -| `expose.loadBalancer.sourceRanges` | List of IP address ranges to assign to loadBalancerSourceRanges | [] | -| **Internal TLS** | | | -| `internalTLS.enabled` | Enable TLS for the components (core, jobservice, portal, registry, trivy) | `false` | -| `internalTLS.strong_ssl_ciphers` | Enable strong ssl ciphers for nginx and portal | `false` -| `internalTLS.certSource` | Method to provide TLS for the components, options are `auto`, `manual`, `secret`. | `auto` | -| `internalTLS.trustCa` | The content of trust CA, only available when `certSource` is `manual`. **Note**: all the internal certificates of the components must be issued by this CA | | -| `internalTLS.core.secretName` | The secret name for core component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.core.crt` | Content of core's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.core.key` | Content of core's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.secretName` | The secret name for jobservice component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.jobservice.crt` | Content of jobservice's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.jobservice.key` | Content of jobservice's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.registry.secretName` | The secret name for registry component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.registry.crt` | Content of registry's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.registry.key` | Content of registry's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.portal.secretName` | The secret name for portal component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.portal.crt` | Content of portal's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.portal.key` | Content of portal's TLS key file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.secretName` | The secret name for trivy component, only available when `certSource` is `secret`. The secret must contain keys named: `ca.crt` - the CA certificate which is used to issue internal key and crt pair for components and all Harbor components must be issued by the same CA, `tls.crt` - the content of the TLS cert file, `tls.key` - the content of the TLS key file. | | -| `internalTLS.trivy.crt` | Content of trivy's TLS cert file, only available when `certSource` is `manual` | | -| `internalTLS.trivy.key` | Content of trivy's TLS key file, only available when `certSource` is `manual` | | -| **IPFamily** | | | -| `ipFamily.ipv4.enabled` | if cluster is ipv4 enabled, all ipv4 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| `ipFamily.ipv6.enabled` | if cluster is ipv6 enabled, all ipv6 related configs will set correspondingly, but currently it only affects the nginx related components | `true` | -| **Persistence** | | | -| `persistence.enabled` | Enable the data persistence or not | `true` | -| `persistence.resourcePolicy` | Setting it to `keep` to avoid removing PVCs during a helm delete operation. Leaving it empty will delete PVCs after the chart deleted. Does not affect PVCs created for internal database and redis components. | `keep` | -| `persistence.persistentVolumeClaim.registry.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.registry.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.registry.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.registry.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.registry.size` | The size of the volume | `5Gi` | -| `persistence.persistentVolumeClaim.registry.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.jobservice.jobLog.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.jobservice.jobLog.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.database.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.subPath` | The sub path used in the volume. If external database is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.database.accessMode` | The access mode of the volume. If external database is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.database.size` | The size of the volume. If external database is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.database.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.redis.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.subPath` | The sub path used in the volume. If external Redis is used, the setting will be ignored | | -| `persistence.persistentVolumeClaim.redis.accessMode` | The access mode of the volume. If external Redis is used, the setting will be ignored | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.redis.size` | The size of the volume. If external Redis is used, the setting will be ignored | `1Gi` | -| `persistence.persistentVolumeClaim.redis.annotations` | The annotations of the volume | | -| `persistence.persistentVolumeClaim.trivy.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | -| `persistence.persistentVolumeClaim.trivy.storageClass` | Specify the `storageClass` used to provision the volume. Or the default StorageClass will be used (the default). Set it to `-` to disable dynamic provisioning | | -| `persistence.persistentVolumeClaim.trivy.subPath` | The sub path used in the volume | | -| `persistence.persistentVolumeClaim.trivy.accessMode` | The access mode of the volume | `ReadWriteOnce` | -| `persistence.persistentVolumeClaim.trivy.size` | The size of the volume | `1Gi` | -| `persistence.persistentVolumeClaim.trivy.annotations` | The annotations of the volume | | -| `persistence.imageChartStorage.disableredirect` | The configuration for managing redirects from content backends. For backends which not supported it (such as using minio for `s3` storage type), please set it to `true` to disable redirects. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#redirect) for more details | `false` | -| `persistence.imageChartStorage.caBundleSecretName` | Specify the `caBundleSecretName` if the storage service uses a self-signed certificate. The secret must contain keys named `ca.crt` which will be injected into the trust store of registry's and containers. | | -| `persistence.imageChartStorage.type` | The type of storage for images and charts: `filesystem`, `azure`, `gcs`, `s3`, `swift` or `oss`. The type must be `filesystem` if you want to use persistent volumes for registry. Refer to the [guide](https://github.com/docker/distribution/blob/master/docs/configuration.md#storage) for more details | `filesystem` | -| `persistence.imageChartStorage.gcs.existingSecret` | An existing secret containing the gcs service account json key. The key must be gcs-key.json. | `""` | -| `persistence.imageChartStorage.gcs.useWorkloadIdentity` | A boolean to allow the use of workloadidentity in a GKE cluster. To use it, create a kubernetes service account and set the name in the key `serviceAccountName` of each component, then allow automounting the service account. | `false` | -| **General** | | | -| `externalURL` | The external URL for Harbor core service | `https://core.harbor.domain` | -| `caBundleSecretName` | The custom CA bundle secret name, the secret must contain key named "ca.crt" which will be injected into the trust store for core, jobservice, registry, trivy components. | | -| `uaaSecretName` | If using external UAA auth which has a self signed cert, you can provide a pre-created secret containing it under the key `ca.crt`. | | -| `imagePullPolicy` | The image pull policy | | -| `imagePullSecrets` | The imagePullSecrets names for all deployments | | -| `updateStrategy.type` | The update strategy for deployments with persistent volumes(jobservice, registry): `RollingUpdate` or `Recreate`. Set it as `Recreate` when `RWM` for volumes isn't supported | `RollingUpdate` | -| `logLevel` | The log level: `debug`, `info`, `warning`, `error` or `fatal` | `info` | -| `harborAdminPassword` | The initial password of Harbor admin. Change it from portal after launching Harbor | `Harbor12345` | -| `existingSecretAdminPassword` | The name of secret where admin password can be found. | | -| `existingSecretAdminPasswordKey` | The name of the key in the secret where to find harbor admin password Harbor | `HARBOR_ADMIN_PASSWORD` | -| `caSecretName` | The name of the secret which contains key named `ca.crt`. Setting this enables the download link on portal to download the CA certificate when the certificate isn't generated automatically | | -| `secretKey` | The key used for encryption. Must be a string of 16 chars | `not-a-secure-key` | -| `existingSecretSecretKey` | An existing secret containing the encoding secretKey | `""` | -| `proxy.httpProxy` | The URL of the HTTP proxy server | | -| `proxy.httpsProxy` | The URL of the HTTPS proxy server | | -| `proxy.noProxy` | The URLs that the proxy settings not apply to | 127.0.0.1,localhost,.local,.internal | -| `proxy.components` | The component list that the proxy settings apply to | core, jobservice, trivy | -| `enableMigrateHelmHook` | Run the migration job via helm hook, if it is true, the database migration will be separated from harbor-core, run with a preupgrade job migration-job | `false` | -| **Nginx** (if service exposed via `ingress`, Nginx will not be used) | | | -| `nginx.image.repository` | Image repository | `goharbor/nginx-photon` | -| `nginx.image.tag` | Image tag | `dev` | -| `nginx.replicas` | The replica count | `1` | -| `nginx.revisionHistoryLimit` | The revision history limit | `10` | -| `nginx.resources` | The [resources] to allocate for container | undefined | -| `nginx.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `nginx.nodeSelector` | Node labels for pod assignment | `{}` | -| `nginx.tolerations` | Tolerations for pod assignment | `[]` | -| `nginx.affinity` | Node/Pod affinities | `{}` | -| `nginx.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `nginx.podAnnotations` | Annotations to add to the nginx pod | `{}` | -| `nginx.priorityClassName` | The priority class to run the pod as | | -| **Portal** | | | -| `portal.image.repository` | Repository for portal image | `goharbor/harbor-portal` | -| `portal.image.tag` | Tag for portal image | `dev` | -| `portal.replicas` | The replica count | `1` | -| `portal.revisionHistoryLimit` | The revision history limit | `10` | -| `portal.resources` | The [resources] to allocate for container | undefined | -| `portal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `portal.nodeSelector` | Node labels for pod assignment | `{}` | -| `portal.tolerations` | Tolerations for pod assignment | `[]` | -| `portal.affinity` | Node/Pod affinities | `{}` | -| `portal.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `portal.podAnnotations` | Annotations to add to the portal pod | `{}` | -| `portal.serviceAnnotations` | Annotations to add to the portal service | `{}` | -| `portal.priorityClassName` | The priority class to run the pod as | | -| `portal.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **Core** | | | -| `core.image.repository` | Repository for Harbor core image | `goharbor/harbor-core` | -| `core.image.tag` | Tag for Harbor core image | `dev` | -| `core.replicas` | The replica count | `1` | -| `core.revisionHistoryLimit` | The revision history limit | `10` | -| `core.startupProbe.initialDelaySeconds` | The initial delay in seconds for the startup probe | `10` | -| `core.resources` | The [resources] to allocate for container | undefined | -| `core.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `core.nodeSelector` | Node labels for pod assignment | `{}` | -| `core.tolerations` | Tolerations for pod assignment | `[]` | -| `core.affinity` | Node/Pod affinities | `{}` | -| `core.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `core.podAnnotations` | Annotations to add to the core pod | `{}` | -| `core.serviceAnnotations` | Annotations to add to the core service | `{}` | -| `core.configureUserSettings` | A JSON string to set in the environment variable `CONFIG_OVERWRITE_JSON` to configure user settings. See the [official docs](https://goharbor.io/docs/latest/install-config/configure-user-settings-cli/#configure-users-settings-using-an-environment-variable). | | -| `core.quotaUpdateProvider` | The provider for updating project quota(usage), there are 2 options, redis or db. By default it is implemented by db but you can configure it to redis which can improve the performance of high concurrent pushing to the same project, and reduce the database connections spike and occupies. Using redis will bring up some delay for quota usage updation for display, so only suggest switch provider to redis if you were ran into the db connections spike around the scenario of high concurrent pushing to same project, no improvment for other scenes. | `db` | -| `core.secret` | Secret is used when core server communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `core.secretName` | Fill the name of a kubernetes secret if you want to use your own TLS certificate and private key for token encryption/decryption. The secret must contain keys named: `tls.crt` - the certificate and `tls.key` - the private key. The default key pair will be used if it isn't set | | -| `core.tokenKey` | PEM-formatted RSA private key used to sign service tokens. Only used if `core.secretName` is unset. If set, `core.tokenCert` MUST also be set. | | -| `core.tokenCert` | PEM-formatted certificate signed by `core.tokenKey` used to validate service tokens. Only used if `core.secretName` is unset. If set, `core.tokenKey` MUST also be set. | | -| `core.xsrfKey` | The XSRF key. Will be generated automatically if it isn't specified | | -| `core.priorityClassName` | The priority class to run the pod as | | -| `core.artifactPullAsyncFlushDuration` | The time duration for async update artifact pull_time and repository pull_count | | -| `core.gdpr.deleteUser` | Enable GDPR compliant user delete | `false` | -| `core.gdpr.auditLogsCompliant` | Enable GDPR compliant for audit logs by changing username to its CRC32 value if that user was deleted from the system | `false` | -| `core.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **Jobservice** | | | -| `jobservice.image.repository` | Repository for jobservice image | `goharbor/harbor-jobservice` | -| `jobservice.image.tag` | Tag for jobservice image | `dev` | -| `jobservice.replicas` | The replica count | `1` | -| `jobservice.revisionHistoryLimit` | The revision history limit | `10` | -| `jobservice.maxJobWorkers` | The max job workers | `10` | -| `jobservice.jobLoggers` | The loggers for jobs: `file`, `database` or `stdout` | `[file]` | -| `jobservice.loggerSweeperDuration` | The jobLogger sweeper duration in days (ignored if `jobLoggers` is set to `stdout`) | `14` | -| `jobservice.notification.webhook_job_max_retry` | The maximum retry of webhook sending notifications | `3` | -| `jobservice.notification.webhook_job_http_client_timeout` | The http client timeout value of webhook sending notifications | `3` | -| `jobservice.reaper.max_update_hours` | the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 | `24` | -| `jobservice.reaper.max_dangling_hours` | the max time for execution in running state without new task created | `168` | -| `jobservice.resources` | The [resources] to allocate for container | undefined | -| `jobservice.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `jobservice.nodeSelector` | Node labels for pod assignment | `{}` | -| `jobservice.tolerations` | Tolerations for pod assignment | `[]` | -| `jobservice.affinity` | Node/Pod affinities | `{}` | -| `jobservice.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `jobservice.podAnnotations` | Annotations to add to the jobservice pod | `{}` | -| `jobservice.priorityClassName` | The priority class to run the pod as | | -| `jobservice.secret` | Secret is used when job service communicates with other components. If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `jobservice.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **Registry** | | | -| `registry.registry.image.repository` | Repository for registry image | `goharbor/registry-photon` | -| `registry.registry.image.tag` | Tag for registry image | `dev` | -| `registry.registry.resources` | The [resources] to allocate for container | undefined | -| `registry.controller.image.repository` | Repository for registry controller image | `goharbor/harbor-registryctl` | -| `registry.controller.image.tag` | Tag for registry controller image | `dev` | -| `registry.controller.resources` | The [resources] to allocate for container | undefined | -| `registry.replicas` | The replica count | `1` | -| `registry.revisionHistoryLimit` | The revision history limit | `10` | -| `registry.nodeSelector` | Node labels for pod assignment | `{}` | -| `registry.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `registry.tolerations` | Tolerations for pod assignment | `[]` | -| `registry.affinity` | Node/Pod affinities | `{}` | -| `registry.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `registry.middleware` | Middleware is used to add support for a CDN between backend storage and `docker pull` recipient. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#middleware). | | -| `registry.podAnnotations` | Annotations to add to the registry pod | `{}` | -| `registry.priorityClassName` | The priority class to run the pod as | | -| `registry.secret` | Secret is used to secure the upload state from client and registry storage backend. See [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#http). If a secret key is not specified, Helm will generate one. Must be a string of 16 chars. | | -| `registry.credentials.username` | The username that harbor core uses internally to access the registry instance. Together with the `registry.credentials.password`, a htpasswd is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). | `harbor_registry_user` | -| `registry.credentials.password` | The password that harbor core uses internally to access the registry instance. Together with the `registry.credentials.username`, a htpasswd is created. This is an alternative to providing `registry.credentials.htpasswdString`. For more details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). It is suggested you update this value before installation. | `harbor_registry_password` | -| `registry.credentials.existingSecret` | An existing secret containing the password for accessing the registry instance, which is hosted by htpasswd auth mode. More details see [official docs](https://github.com/docker/distribution/blob/master/docs/configuration.md#htpasswd). The key must be `REGISTRY_PASSWD` | `""` | -| `registry.credentials.htpasswdString` | Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. | undefined | -| `registry.relativeurls` | If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. Needed if harbor is behind a reverse proxy | `false` | -| `registry.upload_purging.enabled` | If true, enable purge _upload directories | `true` | -| `registry.upload_purging.age` | Remove files in _upload directories which exist for a period of time, default is one week. | `168h` | -| `registry.upload_purging.interval` | The interval of the purge operations | `24h` | -| `registry.upload_purging.dryrun` | If true, enable dryrun for purging _upload, default false | `false` | -| `registry.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **[Trivy][trivy]** | | | -| `trivy.enabled` | The flag to enable Trivy scanner | `true` | -| `trivy.image.repository` | Repository for Trivy adapter image | `goharbor/trivy-adapter-photon` | -| `trivy.image.tag` | Tag for Trivy adapter image | `dev` | -| `trivy.resources` | The [resources] to allocate for Trivy adapter container | | -| `trivy.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `trivy.replicas` | The number of Pod replicas | `1` | -| `trivy.debugMode` | The flag to enable Trivy debug mode | `false` | -| `trivy.vulnType` | Comma-separated list of vulnerability types. Possible values `os` and `library`. | `os,library` | -| `trivy.severity` | Comma-separated list of severities to be checked | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | -| `trivy.ignoreUnfixed` | The flag to display only fixed vulnerabilities | `false` | -| `trivy.insecure` | The flag to skip verifying registry certificate | `false` | -| `trivy.skipUpdate` | The flag to disable [Trivy DB][trivy-db] downloads from GitHub | `false` | -| `trivy.skipJavaDBUpdate` | If the flag is enabled you have to manually download the `trivy-java.db` file [Trivy Java DB][trivy-java-db] and mount it in the `/home/scanner/.cache/trivy/java-db/trivy-java.db` path | `false` | -| `trivy.offlineScan` | The flag prevents Trivy from sending API requests to identify dependencies. | `false` | -| `trivy.securityCheck` | Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. | `vuln` | -| `trivy.timeout` | The duration to wait for scan completion | `5m0s` | -| `trivy.gitHubToken` | The GitHub access token to download [Trivy DB][trivy-db] (see [GitHub rate limiting][trivy-rate-limiting]) | | -| `trivy.priorityClassName` | The priority class to run the pod as | | -| `trivy.topologySpreadConstraints` | The priority class to run the pod as | | -| `trivy.initContainers` | Init containers to be run before the controller's container starts. | `[]` | -| **Database** | | | -| `database.type` | If external database is used, set it to `external` | `internal` | -| `database.internal.image.repository` | Repository for database image | `goharbor/harbor-db` | -| `database.internal.image.tag` | Tag for database image | `dev` | -| `database.internal.password` | The password for database | `changeit` | -| `database.internal.shmSizeLimit` | The limit for the size of shared memory for internal PostgreSQL, conventionally it's around 50% of the memory limit of the container | `512Mi` | -| `database.internal.resources` | The [resources] to allocate for container | undefined | -| `database.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `database.internal.initContainer.migrator.resources` | The [resources] to allocate for the database migrator initContainer | undefined | -| `database.internal.initContainer.permissions.resources` | The [resources] to allocate for the database permissions initContainer | undefined | -| `database.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `database.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `database.internal.affinity` | Node/Pod affinities | `{}` | -| `database.internal.priorityClassName` | The priority class to run the pod as | | -| `database.internal.livenessProbe.timeoutSeconds` | The timeout used in liveness probe; 1 to 5 seconds | 1 | -| `database.internal.readinessProbe.timeoutSeconds` | The timeout used in readiness probe; 1 to 5 seconds | 1 | -| `database.internal.extrInitContainers` | Extra init containers to be run before the database's container starts. | `[]` | -| `database.external.host` | The hostname of external database | `192.168.0.1` | -| `database.external.port` | The port of external database | `5432` | -| `database.external.username` | The username of external database | `user` | -| `database.external.password` | The password of external database | `password` | -| `database.external.coreDatabase` | The database used by core service | `registry` | -| `database.external.existingSecret` | An existing password containing the database password. the key must be `password`. | `""` | -| `database.external.sslmode` | Connection method of external database (require, verify-full, verify-ca, disable) | `disable` | -| `database.maxIdleConns` | The maximum number of connections in the idle connection pool. If it <=0, no idle connections are retained. | `50` | -| `database.maxOpenConns` | The maximum number of open connections to the database. If it <= 0, then there is no limit on the number of open connections. | `100` | -| `database.podAnnotations` | Annotations to add to the database pod | `{}` | -| **Redis** | | | -| `redis.type` | If external redis is used, set it to `external` | `internal` | -| `redis.internal.image.repository` | Repository for redis image | `goharbor/redis-photon` | -| `redis.internal.image.tag` | Tag for redis image | `dev` | -| `redis.internal.resources` | The [resources] to allocate for container | undefined | -| `redis.internal.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `redis.internal.nodeSelector` | Node labels for pod assignment | `{}` | -| `redis.internal.tolerations` | Tolerations for pod assignment | `[]` | -| `redis.internal.affinity` | Node/Pod affinities | `{}` | -| `redis.internal.priorityClassName` | The priority class to run the pod as | | -| `redis.internal.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.internal.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.internal.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.internal.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.internal.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.internal.initContainers` | Init containers to be run before the redis's container starts. | `[]` | -| `redis.external.addr` | The addr of external Redis: :. When using sentinel, it should be :,:,: | `192.168.0.2:6379` | -| `redis.external.sentinelMasterSet` | The name of the set of Redis instances to monitor | | -| `redis.external.coreDatabaseIndex` | The database index for core | `0` | -| `redis.external.jobserviceDatabaseIndex` | The database index for jobservice | `1` | -| `redis.external.registryDatabaseIndex` | The database index for registry | `2` | -| `redis.external.trivyAdapterIndex` | The database index for trivy adapter | `5` | -| `redis.external.harborDatabaseIndex` | The database index for harbor miscellaneous business logic | `0` | -| `redis.external.cacheLayerDatabaseIndex` | The database index for harbor cache layer | `0` | -| `redis.external.username` | The username of external Redis | | -| `redis.external.password` | The password of external Redis | | -| `redis.external.existingSecret` | Use an existing secret to connect to redis. The key must be `REDIS_PASSWORD`. | `""` | -| `redis.podAnnotations` | Annotations to add to the redis pod | `{}` | -| **Exporter** | | | -| `exporter.replicas` | The replica count | `1` | -| `exporter.revisionHistoryLimit` | The revision history limit | `10` | -| `exporter.podAnnotations` | Annotations to add to the exporter pod | `{}` | -| `exporter.image.repository` | Repository for redis image | `goharbor/harbor-exporter` | -| `exporter.image.tag` | Tag for exporter image | `dev` | -| `exporter.nodeSelector` | Node labels for pod assignment | `{}` | -| `exporter.tolerations` | Tolerations for pod assignment | `[]` | -| `exporter.affinity` | Node/Pod affinities | `{}` | -| `exporter.topologySpreadConstraints` | Constraints that define how Pods are spread across failure-domains like regions or availability zones | `[]` | -| `exporter.automountServiceAccountToken` | Mount serviceAccountToken? | `false` | -| `exporter.cacheDuration` | the cache duration for information that exporter collected from Harbor | `30` | -| `exporter.cacheCleanInterval` | cache clean interval for information that exporter collected from Harbor | `14400` | -| `exporter.priorityClassName` | The priority class to run the pod as | | -| **Metrics** | | | -| `metrics.enabled` | if enable harbor metrics | `false` | -| `metrics.core.path` | the url path for core metrics | `/metrics` | -| `metrics.core.port` | the port for core metrics | `8001` | -| `metrics.registry.path` | the url path for registry metrics | `/metrics` | -| `metrics.registry.port` | the port for registry metrics | `8001` | -| `metrics.exporter.path` | the url path for exporter metrics | `/metrics` | -| `metrics.exporter.port` | the port for exporter metrics | `8001` | -| `metrics.serviceMonitor.enabled` | create prometheus serviceMonitor. Requires prometheus CRD's | `false` | -| `metrics.serviceMonitor.additionalLabels` | additional labels to upsert to the manifest | `""` | -| `metrics.serviceMonitor.interval` | scrape period for harbor metrics | `""` | -| `metrics.serviceMonitor.metricRelabelings` | metrics relabel to add/mod/del before ingestion | `[]` | -| `metrics.serviceMonitor.relabelings` | relabels to add/mod/del to sample before scrape | `[]` | -| **Trace** | | | -| `trace.enabled` | Enable tracing or not | `false` | -| `trace.provider` | The tracing provider: `jaeger` or `otel`. `jaeger` should be 1.26+ | `jaeger` | -| `trace.sample_rate` | Set `sample_rate` to 1 if you want sampling 100% of trace data; set 0.5 if you want sampling 50% of trace data, and so forth | `1` | -| `trace.namespace` | Namespace used to differentiate different harbor services | | -| `trace.attributes` | `attributes` is a key value dict contains user defined attributes used to initialize trace provider | | -| `trace.jaeger.endpoint` | The endpoint of jaeger | `http://hostname:14268/api/traces` | -| `trace.jaeger.username` | The username of jaeger | | -| `trace.jaeger.password` | The password of jaeger | | -| `trace.jaeger.agent_host` | The agent host of jaeger | | -| `trace.jaeger.agent_port` | The agent port of jaeger | `6831` | -| `trace.otel.endpoint` | The endpoint of otel | `hostname:4318` | -| `trace.otel.url_path` | The URL path of otel | `/v1/traces` | -| `trace.otel.compression` | Whether enable compression or not for otel | `false` | -| `trace.otel.insecure` | Whether establish insecure connection or not for otel | `true` | -| `trace.otel.timeout` | The timeout in seconds of otel | `10` | -| **Cache** | | | -| `cache.enabled` | Enable cache layer or not | `false` | -| `cache.expireHours` | The expire hours of cache layer | `24` | - -[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -[trivy]: https://github.com/aquasecurity/trivy -[trivy-db]: https://github.com/aquasecurity/trivy-db -[trivy-java-db]: https://github.com/aquasecurity/trivy-java-db -[trivy-rate-limiting]: https://github.com/aquasecurity/trivy#github-rate-limiting diff --git a/charts/harbor/harbor/1.15.1/templates/NOTES.txt b/charts/harbor/harbor/1.15.1/templates/NOTES.txt deleted file mode 100644 index 0980c08a35..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Please wait for several minutes for Harbor deployment to complete. -Then you should be able to visit the Harbor portal at {{ .Values.externalURL }} -For more details, please visit https://github.com/goharbor/harbor diff --git a/charts/harbor/harbor/1.15.1/templates/_helpers.tpl b/charts/harbor/harbor/1.15.1/templates/_helpers.tpl deleted file mode 100644 index f6249b3993..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/_helpers.tpl +++ /dev/null @@ -1,581 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "harbor.name" -}} -{{- default "harbor" .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "harbor.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default "harbor" .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* Helm required labels: legacy */}} -{{- define "harbor.legacy.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* Helm required labels */}} -{{- define "harbor.labels" -}} -heritage: {{ .Release.Service }} -release: {{ .Release.Name }} -chart: {{ .Chart.Name }} -app: "{{ template "harbor.name" . }}" -app.kubernetes.io/instance: {{ .Release.Name }} -app.kubernetes.io/name: {{ include "harbor.name" . }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -app.kubernetes.io/part-of: {{ include "harbor.name" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -{{- end -}} - -{{/* matchLabels */}} -{{- define "harbor.matchLabels" -}} -release: {{ .Release.Name }} -app: "{{ template "harbor.name" . }}" -{{- end -}} - -{{/* Helper for printing values from existing secrets*/}} -{{- define "harbor.secretKeyHelper" -}} - {{- if and (not (empty .data)) (hasKey .data .key) }} - {{- index .data .key | b64dec -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCert" -}} - {{- if and .Values.expose.tls.enabled (eq .Values.expose.tls.certSource "auto") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForIngress" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (eq .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.autoGenCertForNginx" -}} - {{- if and (eq (include "harbor.autoGenCert" .) "true") (ne .Values.expose.type "ingress") -}} - {{- printf "true" -}} - {{- else -}} - {{- printf "false" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.host" -}} - {{- if eq .Values.database.type "internal" -}} - {{- template "harbor.database" . }} - {{- else -}} - {{- .Values.database.external.host -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.port" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "5432" -}} - {{- else -}} - {{- .Values.database.external.port -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.username" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "postgres" -}} - {{- else -}} - {{- .Values.database.external.username -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.rawPassword" -}} - {{- if eq .Values.database.type "internal" -}} - {{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.database" .) -}} - {{- if and (not (empty $existingSecret)) (hasKey $existingSecret.data "POSTGRES_PASSWORD") -}} - {{- .Values.database.internal.password | default (index $existingSecret.data "POSTGRES_PASSWORD" | b64dec) -}} - {{- else -}} - {{- .Values.database.internal.password -}} - {{- end -}} - {{- else -}} - {{- .Values.database.external.password -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.escapedRawPassword" -}} - {{- include "harbor.database.rawPassword" . | urlquery | replace "+" "%20" -}} -{{- end -}} - -{{- define "harbor.database.encryptedPassword" -}} - {{- include "harbor.database.rawPassword" . | b64enc | quote -}} -{{- end -}} - -{{- define "harbor.database.coreDatabase" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "registry" -}} - {{- else -}} - {{- .Values.database.external.coreDatabase -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.database.sslmode" -}} - {{- if eq .Values.database.type "internal" -}} - {{- printf "%s" "disable" -}} - {{- else -}} - {{- .Values.database.external.sslmode -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.redis.scheme" -}} - {{- with .Values.redis }} - {{- ternary "redis+sentinel" "redis" (and (eq .type "external" ) (not (not .external.sentinelMasterSet))) }} - {{- end }} -{{- end -}} - -/*host:port*/ -{{- define "harbor.redis.addr" -}} - {{- with .Values.redis }} - {{- ternary (printf "%s:6379" (include "harbor.redis" $ )) .external.addr (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.masterSet" -}} - {{- with .Values.redis }} - {{- ternary .external.sentinelMasterSet "" (eq "redis+sentinel" (include "harbor.redis.scheme" $)) }} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.password" -}} - {{- with .Values.redis }} - {{- ternary "" .external.password (eq .type "internal") }} - {{- end }} -{{- end -}} - - -{{- define "harbor.redis.pwdfromsecret" -}} - {{- (lookup "v1" "Secret" .Release.Namespace (.Values.redis.external.existingSecret)).data.REDIS_PASSWORD | b64dec }} -{{- end -}} - -{{- define "harbor.redis.cred" -}} - {{- with .Values.redis }} - {{- if (and (eq .type "external" ) (.external.existingSecret)) }} - {{- printf ":%s@" (include "harbor.redis.pwdfromsecret" $) }} - {{- else }} - {{- ternary (printf "%s:%s@" (.external.username | urlquery) (.external.password | urlquery)) "" (and (eq .type "external" ) (not (not .external.password))) }} - {{- end }} - {{- end }} -{{- end -}} - -/*scheme://[:password@]host:port[/master_set]*/ -{{- define "harbor.redis.url" -}} - {{- with .Values.redis }} - {{- $path := ternary "" (printf "/%s" (include "harbor.redis.masterSet" $)) (not (include "harbor.redis.masterSet" $)) }} - {{- printf "%s://%s%s%s" (include "harbor.redis.scheme" $) (include "harbor.redis.cred" $) (include "harbor.redis.addr" $) $path -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCore" -}} - {{- with .Values.redis }} - {{- $index := ternary "0" .external.coreDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index*/ -{{- define "harbor.redis.urlForJobservice" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.jobserviceDatabaseIndex .external.jobserviceDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForRegistry" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForTrivy" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.trivyAdapterIndex .external.trivyAdapterIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForHarbor" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.harborDatabaseIndex .external.harborDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -/*scheme://[:password@]addr/db_index?idle_timeout_seconds=30*/ -{{- define "harbor.redis.urlForCache" -}} - {{- with .Values.redis }} - {{- $index := ternary .internal.cacheLayerDatabaseIndex .external.cacheLayerDatabaseIndex (eq .type "internal") }} - {{- printf "%s/%s?idle_timeout_seconds=30" (include "harbor.redis.url" $) $index -}} - {{- end }} -{{- end -}} - -{{- define "harbor.redis.dbForRegistry" -}} - {{- with .Values.redis }} - {{- ternary .internal.registryDatabaseIndex .external.registryDatabaseIndex (eq .type "internal") }} - {{- end }} -{{- end -}} - -{{- define "harbor.portal" -}} - {{- printf "%s-portal" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.core" -}} - {{- printf "%s-core" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.redis" -}} - {{- printf "%s-redis" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.jobservice" -}} - {{- printf "%s-jobservice" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registry" -}} - {{- printf "%s-registry" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.registryCtl" -}} - {{- printf "%s-registryctl" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.database" -}} - {{- printf "%s-database" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.trivy" -}} - {{- printf "%s-trivy" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.nginx" -}} - {{- printf "%s-nginx" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.exporter" -}} - {{- printf "%s-exporter" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.ingress" -}} - {{- printf "%s-ingress" (include "harbor.fullname" .) -}} -{{- end -}} - -{{- define "harbor.noProxy" -}} - {{- printf "%s,%s,%s,%s,%s,%s,%s,%s" (include "harbor.core" .) (include "harbor.jobservice" .) (include "harbor.database" .) (include "harbor.registry" .) (include "harbor.portal" .) (include "harbor.trivy" .) (include "harbor.exporter" .) .Values.proxy.noProxy -}} -{{- end -}} - -{{- define "harbor.caBundleVolume" -}} -- name: ca-bundle-certs - secret: - secretName: {{ .Values.caBundleSecretName }} -{{- end -}} - -{{- define "harbor.caBundleVolumeMount" -}} -- name: ca-bundle-certs - mountPath: /harbor_cust_cert/custom-ca.crt - subPath: ca.crt -{{- end -}} - -{{/* scheme for all components because it only support http mode */}} -{{- define "harbor.component.scheme" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "https" -}} - {{- else -}} - {{- printf "http" -}} - {{- end -}} -{{- end -}} - -{{/* core component container port */}} -{{- define "harbor.core.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* core component service port */}} -{{- define "harbor.core.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component container port */}} -{{- define "harbor.jobservice.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* jobservice component service port */}} -{{- define "harbor.jobservice.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* portal component container port */}} -{{- define "harbor.portal.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* portal component service port */}} -{{- define "harbor.portal.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "443" -}} - {{- else -}} - {{- printf "80" -}} - {{- end -}} -{{- end -}} - -{{/* registry component container port */}} -{{- define "harbor.registry.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registry component service port */}} -{{- define "harbor.registry.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "5443" -}} - {{- else -}} - {{- printf "5000" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component container port */}} -{{- define "harbor.registryctl.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* registryctl component service port */}} -{{- define "harbor.registryctl.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component container port */}} -{{- define "harbor.trivy.containerPort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* trivy component service port */}} -{{- define "harbor.trivy.servicePort" -}} - {{- if .Values.internalTLS.enabled -}} - {{- printf "8443" -}} - {{- else -}} - {{- printf "8080" -}} - {{- end -}} -{{- end -}} - -{{/* CORE_URL */}} -{{/* port is included in this url as a workaround for issue https://github.com/aquasecurity/harbor-scanner-trivy/issues/108 */}} -{{- define "harbor.coreURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.core" .) (include "harbor.core.servicePort" .) -}} -{{- end -}} - -{{/* JOBSERVICE_URL */}} -{{- define "harbor.jobserviceURL" -}} - {{- printf "%s://%s-jobservice" (include "harbor.component.scheme" .) (include "harbor.fullname" .) -}} -{{- end -}} - -{{/* PORTAL_URL */}} -{{- define "harbor.portalURL" -}} - {{- printf "%s://%s" (include "harbor.component.scheme" .) (include "harbor.portal" .) -}} -{{- end -}} - -{{/* REGISTRY_URL */}} -{{- define "harbor.registryURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registry.servicePort" .) -}} -{{- end -}} - -{{/* REGISTRY_CONTROLLER_URL */}} -{{- define "harbor.registryControllerURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.registry" .) (include "harbor.registryctl.servicePort" .) -}} -{{- end -}} - -{{/* TOKEN_SERVICE_URL */}} -{{- define "harbor.tokenServiceURL" -}} - {{- printf "%s/service/token" (include "harbor.coreURL" .) -}} -{{- end -}} - -{{/* TRIVY_ADAPTER_URL */}} -{{- define "harbor.trivyAdapterURL" -}} - {{- printf "%s://%s:%s" (include "harbor.component.scheme" .) (include "harbor.trivy" .) (include "harbor.trivy.servicePort" .) -}} -{{- end -}} - -{{- define "harbor.internalTLS.core.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.core.secretName -}} - {{- else -}} - {{- printf "%s-core-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.jobservice.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.jobservice.secretName -}} - {{- else -}} - {{- printf "%s-jobservice-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.portal.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.portal.secretName -}} - {{- else -}} - {{- printf "%s-portal-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.registry.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.registry.secretName -}} - {{- else -}} - {{- printf "%s-registry-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.internalTLS.trivy.secretName" -}} - {{- if eq .Values.internalTLS.certSource "secret" -}} - {{- .Values.internalTLS.trivy.secretName -}} - {{- else -}} - {{- printf "%s-trivy-internal-tls" (include "harbor.fullname" .) -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsCoreSecretForIngress" -}} - {{- if eq .Values.expose.tls.certSource "none" -}} - {{- printf "" -}} - {{- else if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.ingress" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.tlsSecretForNginx" -}} - {{- if eq .Values.expose.tls.certSource "secret" -}} - {{- .Values.expose.tls.secret.secretName -}} - {{- else -}} - {{- include "harbor.nginx" . -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.metricsPortName" -}} - {{- if .Values.internalTLS.enabled }} - {{- printf "https-metrics" -}} - {{- else -}} - {{- printf "http-metrics" -}} - {{- end -}} -{{- end -}} - -{{- define "harbor.traceEnvs" -}} - TRACE_ENABLED: "{{ .Values.trace.enabled }}" - TRACE_SAMPLE_RATE: "{{ .Values.trace.sample_rate }}" - TRACE_NAMESPACE: "{{ .Values.trace.namespace }}" - {{- if .Values.trace.attributes }} - TRACE_ATTRIBUTES: {{ .Values.trace.attributes | toJson | squote }} - {{- end }} - {{- if eq .Values.trace.provider "jaeger" }} - TRACE_JAEGER_ENDPOINT: "{{ .Values.trace.jaeger.endpoint }}" - TRACE_JAEGER_USERNAME: "{{ .Values.trace.jaeger.username }}" - TRACE_JAEGER_AGENT_HOSTNAME: "{{ .Values.trace.jaeger.agent_host }}" - TRACE_JAEGER_AGENT_PORT: "{{ .Values.trace.jaeger.agent_port }}" - {{- else }} - TRACE_OTEL_ENDPOINT: "{{ .Values.trace.otel.endpoint }}" - TRACE_OTEL_URL_PATH: "{{ .Values.trace.otel.url_path }}" - TRACE_OTEL_COMPRESSION: "{{ .Values.trace.otel.compression }}" - TRACE_OTEL_INSECURE: "{{ .Values.trace.otel.insecure }}" - TRACE_OTEL_TIMEOUT: "{{ .Values.trace.otel.timeout }}" - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForCore" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-core" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForJobservice" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-jobservice" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceEnvsForRegistryCtl" -}} - {{- if .Values.trace.enabled }} - TRACE_SERVICE_NAME: "harbor-registryctl" - {{ include "harbor.traceEnvs" . }} - {{- end }} -{{- end -}} - -{{- define "harbor.traceJaegerPassword" -}} - {{- if and .Values.trace.enabled (eq .Values.trace.provider "jaeger") }} - TRACE_JAEGER_PASSWORD: "{{ .Values.trace.jaeger.password | default "" | b64enc }}" - {{- end }} -{{- end -}} - -{{/* Allow KubeVersion to be overridden. */}} -{{- define "harbor.ingress.kubeVersion" -}} - {{- default .Capabilities.KubeVersion.Version .Values.expose.ingress.kubeVersionOverride -}} -{{- end -}} diff --git a/charts/harbor/harbor/1.15.1/templates/core/core-cm.yaml b/charts/harbor/harbor/1.15.1/templates/core/core-cm.yaml deleted file mode 100644 index 93cab01b4c..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/core/core-cm.yaml +++ /dev/null @@ -1,90 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - app.conf: |+ - appname = Harbor - runmode = prod - enablegzip = true - - [prod] - httpport = {{ ternary "8443" "8080" .Values.internalTLS.enabled }} - PORT: "{{ ternary "8443" "8080" .Values.internalTLS.enabled }}" - DATABASE_TYPE: "postgresql" - POSTGRESQL_HOST: "{{ template "harbor.database.host" . }}" - POSTGRESQL_PORT: "{{ template "harbor.database.port" . }}" - POSTGRESQL_USERNAME: "{{ template "harbor.database.username" . }}" - POSTGRESQL_DATABASE: "{{ template "harbor.database.coreDatabase" . }}" - POSTGRESQL_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - POSTGRESQL_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - POSTGRESQL_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" - EXT_ENDPOINT: "{{ .Values.externalURL }}" - CORE_URL: "{{ template "harbor.coreURL" . }}" - JOBSERVICE_URL: "{{ template "harbor.jobserviceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - CORE_LOCAL_URL: "{{ ternary "https://127.0.0.1:8443" "http://127.0.0.1:8080" .Values.internalTLS.enabled }}" - WITH_TRIVY: {{ .Values.trivy.enabled | quote }} - TRIVY_ADAPTER_URL: "{{ template "harbor.trivyAdapterURL" . }}" - REGISTRY_STORAGE_PROVIDER_NAME: "{{ .Values.persistence.imageChartStorage.type }}" - LOG_LEVEL: "{{ .Values.logLevel }}" - CONFIG_PATH: "/etc/core/app.conf" - CHART_CACHE_DRIVER: "redis" - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - _REDIS_URL_REG: "{{ template "harbor.redis.urlForRegistry" . }}" - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.harborDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.harborDatabaseIndex) }} - _REDIS_URL_HARBOR: "{{ template "harbor.redis.urlForHarbor" . }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} - PORTAL_URL: "{{ template "harbor.portalURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - {{- if .Values.uaaSecretName }} - UAA_CA_ROOT: "/etc/core/auth-ca/auth-ca.crt" - {{- end }} - {{- if has "core" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE: "docker-hub,harbor,azure-acr,aws-ecr,google-gcr,quay,docker-registry,github-ghcr,jfrog-artifactory" - {{- if .Values.metrics.enabled}} - METRIC_ENABLE: "true" - METRIC_PATH: "{{ .Values.metrics.core.path }}" - METRIC_PORT: "{{ .Values.metrics.core.port }}" - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: core - {{- end }} - - {{- if hasKey .Values.core "gcTimeWindowHours" }} - #make the GC time window configurable for testing - GC_TIME_WINDOW_HOURS: "{{ .Values.core.gcTimeWindowHours }}" - {{- end }} - {{- template "harbor.traceEnvsForCore" . }} - - {{- if .Values.core.artifactPullAsyncFlushDuration }} - ARTIFACT_PULL_ASYNC_FLUSH_DURATION: {{ .Values.core.artifactPullAsyncFlushDuration | quote }} - {{- end }} - - {{- if .Values.core.gdpr}} - {{- if .Values.core.gdpr.deleteUser}} - GDPR_DELETE_USER: "true" - {{- end }} - {{- if .Values.core.gdpr.auditLogsCompliant}} - GDPR_AUDIT_LOGS: "true" - {{- end }} - {{- end }} - - {{- if .Values.cache.enabled }} - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - - {{- if .Values.core.quotaUpdateProvider }} - QUOTA_UPDATE_PROVIDER: "{{ .Values.core.quotaUpdateProvider }}" - {{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/core/core-dpl.yaml b/charts/harbor/harbor/1.15.1/templates/core/core-dpl.yaml deleted file mode 100644 index 2ee8fd59c2..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/core/core-dpl.yaml +++ /dev/null @@ -1,257 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: core - app.kubernetes.io/component: core -spec: - replicas: {{ .Values.core.replicas }} - revisionHistoryLimit: {{ .Values.core.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: core - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: core - app.kubernetes.io/component: core -{{- if .Values.core.podLabels }} -{{ toYaml .Values.core.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.core.podAnnotations }} -{{ toYaml .Values.core.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.core.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.core.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: core -{{- end }} -{{- end }} - {{- with .Values.core.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: core - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if .Values.core.startupProbe.enabled }} - startupProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 360 - initialDelaySeconds: {{ .Values.core.startupProbe.initialDelaySeconds }} - periodSeconds: 10 - {{- end }} - livenessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v2.0/ping - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.core.containerPort" . }} - failureThreshold: 2 - periodSeconds: 10 - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/core/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/core/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/core/ca.crt - {{- end }} - {{- if .Values.database.external.existingSecret }} - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} - {{- if .Values.core.existingXsrfSecret }} - - name: CSRF_KEY - valueFrom: - secretKeyRef: - name: {{ .Values.core.existingXsrfSecret }} - key: {{ .Values.core.existingXsrfSecretKey }} - {{- end }} -{{- with .Values.core.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - ports: - - containerPort: {{ template "harbor.core.containerPort" . }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - - name: secret-key - mountPath: /etc/core/key - subPath: key - - name: token-service-private-key - mountPath: /etc/core/private_key.pem - subPath: tls.key - {{- if .Values.expose.tls.enabled }} - - name: ca-download - mountPath: /etc/core/ca - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - mountPath: /etc/core/auth-ca/auth-ca.crt - subPath: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - {{- end }} - - name: psc - mountPath: /etc/core/token - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} -{{- if .Values.core.resources }} - resources: -{{ toYaml .Values.core.resources | indent 10 }} -{{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - - name: secret-key - secret: - {{- if .Values.existingSecretSecretKey }} - secretName: {{ .Values.existingSecretSecretKey }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - items: - - key: secretKey - path: key - - name: token-service-private-key - secret: - {{- if .Values.core.secretName }} - secretName: {{ .Values.core.secretName }} - {{- else }} - secretName: {{ template "harbor.core" . }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: ca-download - secret: - {{- if .Values.caSecretName }} - secretName: {{ .Values.caSecretName }} - {{- else if eq (include "harbor.autoGenCertForIngress" .) "true" }} - secretName: "{{ template "harbor.ingress" . }}" - {{- else if eq (include "harbor.autoGenCertForNginx" .) "true" }} - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- end }} - {{- if .Values.uaaSecretName }} - - name: auth-ca-cert - secret: - secretName: {{ .Values.uaaSecretName }} - items: - - key: ca.crt - path: auth-ca.crt - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - - name: psc - emptyDir: {} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.core.priorityClassName }} - priorityClassName: {{ .Values.core.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/core/core-pre-upgrade-job.yaml b/charts/harbor/harbor/1.15.1/templates/core/core-pre-upgrade-job.yaml deleted file mode 100644 index ce0b13134d..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/core/core-pre-upgrade-job.yaml +++ /dev/null @@ -1,77 +0,0 @@ -{{- if .Values.enableMigrateHelmHook }} -apiVersion: batch/v1 -kind: Job -metadata: - name: migration-job - labels: -{{ include "harbor.labels" . | indent 4 }} - component: migrator - annotations: - # This is what defines this resource as a hook. Without this line, the - # job is considered part of the release. - "helm.sh/hook": pre-upgrade - "helm.sh/hook-weight": "-5" -spec: - template: - metadata: - labels: -{{ include "harbor.matchLabels" . | indent 8 }} - component: migrator - spec: - restartPolicy: Never - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.core.serviceAccountName }} - serviceAccountName: {{ .Values.core.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - terminationGracePeriodSeconds: 120 - containers: - - name: core-job - image: {{ .Values.core.image.repository }}:{{ .Values.core.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - command: ["/harbor/harbor_core", "-mode=migrate"] - envFrom: - - configMapRef: - name: "{{ template "harbor.core" . }}" - - secretRef: - name: "{{ template "harbor.core" . }}" - {{- if .Values.database.external.existingSecret }} - env: - - name: POSTGRESQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/core/app.conf - subPath: app.conf - volumes: - - name: config - configMap: - name: {{ template "harbor.core" . }} - items: - - key: app.conf - path: app.conf - {{- with .Values.core.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.core.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/core/core-secret.yaml b/charts/harbor/harbor/1.15.1/templates/core/core-secret.yaml deleted file mode 100644 index 62a41fce80..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/core/core-secret.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.core" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.existingSecretSecretKey }} - secretKey: {{ .Values.secretKey | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingSecret }} - secret: {{ .Values.core.secret | default (include "harbor.secretKeyHelper" (dict "key" "secret" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.core.secretName }} - {{- $ca := genCA "harbor-token-ca" 365 }} - tls.key: {{ .Values.core.tokenKey | default $ca.Key | b64enc | quote }} - tls.crt: {{ .Values.core.tokenCert | default $ca.Cert | b64enc | quote }} - {{- end }} - {{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} - {{- end }} - {{- if not .Values.database.external.existingSecret }} - POSTGRESQL_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- if not .Values.core.existingXsrfSecret }} - CSRF_KEY: {{ .Values.core.xsrfKey | default (include "harbor.secretKeyHelper" (dict "key" "CSRF_KEY" "data" $existingSecret.data)) | default (randAlphaNum 32) | b64enc | quote }} - {{- end }} -{{- if .Values.core.configureUserSettings }} - CONFIG_OVERWRITE_JSON: {{ .Values.core.configureUserSettings | b64enc | quote }} -{{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.15.1/templates/core/core-svc.yaml b/charts/harbor/harbor/1.15.1/templates/core/core-svc.yaml deleted file mode 100644 index 0d2cfb2915..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/core/core-svc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.core" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.core.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - name: {{ ternary "https-web" "http-web" .Values.internalTLS.enabled }} - port: {{ template "harbor.core.servicePort" . }} - targetPort: {{ template "harbor.core.containerPort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.core.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: core diff --git a/charts/harbor/harbor/1.15.1/templates/core/core-tls.yaml b/charts/harbor/harbor/1.15.1/templates/core/core-tls.yaml deleted file mode 100644 index c52148f0d9..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/core/core-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.core.crt\" is required!" .Values.internalTLS.core.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.core.key\" is required!" .Values.internalTLS.core.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/database/database-secret.yaml b/charts/harbor/harbor/1.15.1/templates/database/database-secret.yaml deleted file mode 100644 index 864aff4a18..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/database/database-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - POSTGRES_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end -}} diff --git a/charts/harbor/harbor/1.15.1/templates/database/database-ss.yaml b/charts/harbor/harbor/1.15.1/templates/database/database-ss.yaml deleted file mode 100644 index 71c5eb1e08..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/database/database-ss.yaml +++ /dev/null @@ -1,162 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -{{- $database := .Values.persistence.persistentVolumeClaim.database -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: database - app.kubernetes.io/component: database -spec: - replicas: 1 - serviceName: "{{ template "harbor.database" . }}" - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: database - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: database - app.kubernetes.io/component: database -{{- if .Values.database.podLabels }} -{{ toYaml .Values.database.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }} -{{- if .Values.database.podAnnotations }} -{{ toYaml .Values.database.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.database.internal.serviceAccountName }} - serviceAccountName: {{ .Values.database.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.database.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - initContainers: - # with "fsGroup" set, each time a volume is mounted, Kubernetes must recursively chown() and chmod() all the files and directories inside the volume - # this causes the postgresql reports the "data directory /var/lib/postgresql/data/pgdata has group or world access" issue when using some CSIs e.g. Ceph - # use this init container to correct the permission - # as "fsGroup" applied before the init container running, the container has enough permission to execute the command - - name: "data-permissions-ensurer" - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - command: ["/bin/sh"] - args: ["-c", "chmod -R 700 /var/lib/postgresql/data/pgdata || true"] -{{- if .Values.database.internal.initContainer.permissions.resources }} - resources: -{{ toYaml .Values.database.internal.initContainer.permissions.resources | indent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - {{- with .Values.database.internal.extrInitContainers }} - {{- toYaml . | nindent 6 }} - {{- end }} - containers: - - name: database - image: {{ .Values.database.internal.image.repository }}:{{ .Values.database.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - livenessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 300 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.livenessProbe.timeoutSeconds }} - readinessProbe: - exec: - command: - - /docker-healthcheck.sh - initialDelaySeconds: 1 - periodSeconds: 10 - timeoutSeconds: {{ .Values.database.internal.readinessProbe.timeoutSeconds }} -{{- if .Values.database.internal.resources }} - resources: -{{ toYaml .Values.database.internal.resources | indent 10 }} -{{- end }} - envFrom: - - secretRef: - name: "{{ template "harbor.database" . }}" - env: - # put the data into a sub directory to avoid the permission issue in k8s with restricted psp enabled - # more detail refer to https://github.com/goharbor/harbor-helm/issues/756 - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" -{{- with .Values.database.internal.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: database-data - mountPath: /var/lib/postgresql/data - subPath: {{ $database.subPath }} - - name: shm-volume - mountPath: /dev/shm - volumes: - - name: shm-volume - emptyDir: - medium: Memory - sizeLimit: {{ .Values.database.internal.shmSizeLimit }} - {{- if not .Values.persistence.enabled }} - - name: "database-data" - emptyDir: {} - {{- else if $database.existingClaim }} - - name: "database-data" - persistentVolumeClaim: - claimName: {{ $database.existingClaim }} - {{- end -}} - {{- with .Values.database.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.database.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.database.internal.priorityClassName }} - priorityClassName: {{ .Values.database.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $database.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: "database-data" - labels: -{{ include "harbor.legacy.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $database.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $database.accessMode | quote }}] - {{- if $database.storageClass }} - {{- if (eq "-" $database.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $database.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $database.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.15.1/templates/database/database-svc.yaml b/charts/harbor/harbor/1.15.1/templates/database/database-svc.yaml deleted file mode 100644 index 6475048cd9..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/database/database-svc.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.database.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.database" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 5432 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: database -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/exporter/exporter-cm-env.yaml b/charts/harbor/harbor/1.15.1/templates/exporter/exporter-cm-env.yaml deleted file mode 100644 index 0bf4e7d905..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/exporter/exporter-cm-env.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.exporter" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - LOG_LEVEL: "{{ .Values.logLevel }}" - HARBOR_EXPORTER_PORT: "{{ .Values.metrics.exporter.port }}" - HARBOR_EXPORTER_METRICS_PATH: "{{ .Values.metrics.exporter.path }}" - HARBOR_EXPORTER_METRICS_ENABLED: "{{ .Values.metrics.enabled }}" - HARBOR_EXPORTER_CACHE_TIME: "{{ .Values.exporter.cacheDuration }}" - HARBOR_EXPORTER_CACHE_CLEAN_INTERVAL: "{{ .Values.exporter.cacheCleanInterval }}" - HARBOR_METRIC_NAMESPACE: harbor - HARBOR_METRIC_SUBSYSTEM: exporter - HARBOR_REDIS_URL: "{{ template "harbor.redis.urlForJobservice" . }}" - HARBOR_REDIS_NAMESPACE: harbor_job_service_namespace - HARBOR_REDIS_TIMEOUT: "3600" - HARBOR_SERVICE_SCHEME: "{{ template "harbor.component.scheme" . }}" - HARBOR_SERVICE_HOST: "{{ template "harbor.core" . }}" - HARBOR_SERVICE_PORT: "{{ template "harbor.core.servicePort" . }}" - HARBOR_DATABASE_HOST: "{{ template "harbor.database.host" . }}" - HARBOR_DATABASE_PORT: "{{ template "harbor.database.port" . }}" - HARBOR_DATABASE_USERNAME: "{{ template "harbor.database.username" . }}" - HARBOR_DATABASE_DBNAME: "{{ template "harbor.database.coreDatabase" . }}" - HARBOR_DATABASE_SSLMODE: "{{ template "harbor.database.sslmode" . }}" - HARBOR_DATABASE_MAX_IDLE_CONNS: "{{ .Values.database.maxIdleConns }}" - HARBOR_DATABASE_MAX_OPEN_CONNS: "{{ .Values.database.maxOpenConns }}" -{{- end}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/exporter/exporter-dpl.yaml b/charts/harbor/harbor/1.15.1/templates/exporter/exporter-dpl.yaml deleted file mode 100644 index 01e9258ea9..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/exporter/exporter-dpl.yaml +++ /dev/null @@ -1,146 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: exporter - app.kubernetes.io/component: exporter -spec: - replicas: {{ .Values.exporter.replicas }} - revisionHistoryLimit: {{ .Values.exporter.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: exporter - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: exporter - app.kubernetes.io/component: exporter -{{- if .Values.exporter.podLabels }} -{{ toYaml .Values.exporter.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/exporter/exporter-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/exporter/exporter-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/core/core-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.exporter.podAnnotations }} -{{ toYaml .Values.exporter.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.exporter.serviceAccountName }} - serviceAccountName: {{ .Values.exporter.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.exporter.automountServiceAccountToken | default false }} -{{- with .Values.exporter.topologySpreadConstraints }} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: exporter -{{- end }} -{{- end }} - containers: - - name: exporter - image: {{ .Values.exporter.image.repository }}:{{ .Values.exporter.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - port: {{ .Values.metrics.exporter.port }} - initialDelaySeconds: 30 - periodSeconds: 10 - args: ["-log-level", "{{ .Values.logLevel }}"] - envFrom: - - configMapRef: - name: "{{ template "harbor.exporter" . }}-env" - - secretRef: - name: "{{ template "harbor.exporter" . }}" - env: - {{- if .Values.database.external.existingSecret }} - - name: HARBOR_DATABASE_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.database.external.existingSecret }} - key: password - {{- end }} - {{- if .Values.existingSecretAdminPassword }} - - name: HARBOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.existingSecretAdminPassword }} - key: {{ .Values.existingSecretAdminPasswordKey }} - {{- end }} -{{- if .Values.exporter.resources }} - resources: -{{ toYaml .Values.exporter.resources | indent 10 }} -{{- end }} -{{- with .Values.exporter.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - ports: - - containerPort: {{ .Values.metrics.exporter.port }} - volumeMounts: - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - mountPath: /etc/harbor/ssl/core - # There are some metric data are collectd from harbor core. - # When internal TLS is enabled, the Exporter need the CA file to collect these data. - {{- end }} - volumes: - - name: config - secret: - secretName: "{{ template "harbor.exporter" . }}" - {{- if .Values.internalTLS.enabled }} - - name: core-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.core.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.exporter.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.exporter.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.exporter.priorityClassName }} - priorityClassName: {{ .Values.exporter.priorityClassName }} - {{- end }} -{{ end }} diff --git a/charts/harbor/harbor/1.15.1/templates/exporter/exporter-secret.yaml b/charts/harbor/harbor/1.15.1/templates/exporter/exporter-secret.yaml deleted file mode 100644 index 434a1bf689..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/exporter/exporter-secret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.exporter" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: -{{- if not .Values.existingSecretAdminPassword }} - HARBOR_ADMIN_PASSWORD: {{ .Values.harborAdminPassword | b64enc | quote }} -{{- end }} -{{- if not .Values.database.external.existingSecret }} - HARBOR_DATABASE_PASSWORD: {{ template "harbor.database.encryptedPassword" . }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/exporter/exporter-svc.yaml b/charts/harbor/harbor/1.15.1/templates/exporter/exporter-svc.yaml deleted file mode 100644 index 4a6f3fdec6..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/exporter/exporter-svc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.metrics.enabled}} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.exporter" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.exporter.port }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: exporter -{{ end }} diff --git a/charts/harbor/harbor/1.15.1/templates/ingress/ingress.yaml b/charts/harbor/harbor/1.15.1/templates/ingress/ingress.yaml deleted file mode 100644 index 73472c6056..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/ingress/ingress.yaml +++ /dev/null @@ -1,142 +0,0 @@ -{{- if eq .Values.expose.type "ingress" }} -{{- $ingress := .Values.expose.ingress -}} -{{- $tls := .Values.expose.tls -}} -{{- if eq .Values.expose.ingress.controller "gce" }} - {{- $_ := set . "portal_path" "/*" -}} - {{- $_ := set . "api_path" "/api/*" -}} - {{- $_ := set . "service_path" "/service/*" -}} - {{- $_ := set . "v2_path" "/v2/*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/*" -}} - {{- $_ := set . "controller_path" "/c/*" -}} -{{- else if eq .Values.expose.ingress.controller "ncp" }} - {{- $_ := set . "portal_path" "/.*" -}} - {{- $_ := set . "api_path" "/api/.*" -}} - {{- $_ := set . "service_path" "/service/.*" -}} - {{- $_ := set . "v2_path" "/v2/.*" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/.*" -}} - {{- $_ := set . "controller_path" "/c/.*" -}} -{{- else }} - {{- $_ := set . "portal_path" "/" -}} - {{- $_ := set . "api_path" "/api/" -}} - {{- $_ := set . "service_path" "/service/" -}} - {{- $_ := set . "v2_path" "/v2/" -}} - {{- $_ := set . "chartrepo_path" "/chartrepo/" -}} - {{- $_ := set . "controller_path" "/c/" -}} -{{- end }} - ---- -{{- if semverCompare "<1.14-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: extensions/v1beta1 -{{- else if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} -apiVersion: networking.k8s.io/v1beta1 -{{- else }} -apiVersion: networking.k8s.io/v1 -{{- end }} -kind: Ingress -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if $ingress.labels }} -{{ toYaml $ingress.labels | indent 4 }} -{{- end }} - annotations: -{{ toYaml $ingress.annotations | indent 4 }} -{{- if .Values.internalTLS.enabled }} - nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" -{{- end }} -{{- if eq .Values.expose.ingress.controller "ncp" }} - ncp/use-regex: "true" - {{- if $tls.enabled }} - ncp/http-redirect: "true" - {{- end }} -{{- end }} -spec: - {{- if $ingress.className }} - ingressClassName: {{ $ingress.className }} - {{- end }} - {{- if $tls.enabled }} - tls: - - secretName: {{ template "harbor.tlsCoreSecretForIngress" . }} - {{- if $ingress.hosts.core }} - hosts: - - {{ $ingress.hosts.core }} - {{- end }} - {{- end }} - rules: - - http: - paths: -{{- if semverCompare "<1.19-0" (include "harbor.ingress.kubeVersion" .) }} - - path: {{ .api_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - backend: - serviceName: {{ template "harbor.core" . }} - servicePort: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - backend: - serviceName: {{ template "harbor.portal" . }} - servicePort: {{ template "harbor.portal.servicePort" . }} -{{- else }} - - path: {{ .api_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .service_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .v2_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .chartrepo_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .controller_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.core" . }} - port: - number: {{ template "harbor.core.servicePort" . }} - - path: {{ .portal_path }} - pathType: Prefix - backend: - service: - name: {{ template "harbor.portal" . }} - port: - number: {{ template "harbor.portal.servicePort" . }} -{{- end }} - {{- if $ingress.hosts.core }} - host: {{ $ingress.hosts.core }} - {{- end }} - -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/ingress/secret.yaml b/charts/harbor/harbor/1.15.1/templates/ingress/secret.yaml deleted file mode 100644 index 41507b3dd9..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/ingress/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForIngress" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cert := genSignedCert .Values.expose.ingress.hosts.core nil (list .Values.expose.ingress.hosts.core) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.ingress" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/internal/auto-tls.yaml b/charts/harbor/harbor/1.15.1/templates/internal/auto-tls.yaml deleted file mode 100644 index da5f5e2c7b..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/internal/auto-tls.yaml +++ /dev/null @@ -1,81 +0,0 @@ -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} -{{- $ca := genCA "harbor-internal-ca" 365 }} -{{- $coreCN := (include "harbor.core" .) }} -{{- $coreCrt := genSignedCert $coreCN (list "127.0.0.1") (list "localhost" $coreCN) 365 $ca }} -{{- $jsCN := (include "harbor.jobservice" .) }} -{{- $jsCrt := genSignedCert $jsCN nil (list $jsCN) 365 $ca }} -{{- $regCN := (include "harbor.registry" .) }} -{{- $regCrt := genSignedCert $regCN nil (list $regCN) 365 $ca }} -{{- $portalCN := (include "harbor.portal" .) }} -{{- $portalCrt := genSignedCert $portalCN nil (list $portalCN) 365 $ca }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.core.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $coreCrt.Cert | b64enc | quote }} - tls.key: {{ $coreCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $jsCrt.Cert | b64enc | quote }} - tls.key: {{ $jsCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $regCrt.Cert | b64enc | quote }} - tls.key: {{ $regCrt.Key | b64enc | quote }} - ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $portalCrt.Cert | b64enc | quote }} - tls.key: {{ $portalCrt.Key | b64enc | quote }} - -{{- if and .Values.trivy.enabled}} ---- -{{- $trivyCN := (include "harbor.trivy" .) }} -{{- $trivyCrt := genSignedCert $trivyCN nil (list $trivyCN) 365 $ca }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ $ca.Cert | b64enc | quote }} - tls.crt: {{ $trivyCrt.Cert | b64enc | quote }} - tls.key: {{ $trivyCrt.Key | b64enc | quote }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-cm-env.yaml b/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-cm-env.yaml deleted file mode 100644 index 8411c7a47c..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-cm-env.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}-env" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - CORE_URL: "{{ template "harbor.coreURL" . }}" - TOKEN_SERVICE_URL: "{{ template "harbor.tokenServiceURL" . }}" - REGISTRY_URL: "{{ template "harbor.registryURL" . }}" - REGISTRY_CONTROLLER_URL: "{{ template "harbor.registryControllerURL" . }}" - REGISTRY_CREDENTIAL_USERNAME: "{{ .Values.registry.credentials.username }}" - - JOBSERVICE_WEBHOOK_JOB_MAX_RETRY: "{{ .Values.jobservice.notification.webhook_job_max_retry }}" - JOBSERVICE_WEBHOOK_JOB_HTTP_CLIENT_TIMEOUT: "{{ .Values.jobservice.notification.webhook_job_http_client_timeout }}" - - {{- if has "jobservice" .Values.proxy.components }} - HTTP_PROXY: "{{ .Values.proxy.httpProxy }}" - HTTPS_PROXY: "{{ .Values.proxy.httpsProxy }}" - NO_PROXY: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.metrics.enabled}} - METRIC_NAMESPACE: harbor - METRIC_SUBSYSTEM: jobservice - {{- end }} - {{- template "harbor.traceEnvsForJobservice" . }} - {{- if .Values.cache.enabled }} - _REDIS_URL_CORE: "{{ template "harbor.redis.urlForCore" . }}" - CACHE_ENABLED: "true" - CACHE_EXPIRE_HOURS: "{{ .Values.cache.expireHours }}" - {{- end }} - {{- if or (and (eq .Values.redis.type "internal") .Values.redis.internal.cacheLayerDatabaseIndex) (and (eq .Values.redis.type "external") .Values.redis.external.cacheLayerDatabaseIndex) }} - _REDIS_URL_CACHE_LAYER: "{{ template "harbor.redis.urlForCache" . }}" - {{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-cm.yaml b/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-cm.yaml deleted file mode 100644 index 8211c62209..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-cm.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - #Server listening port - protocol: "{{ template "harbor.component.scheme" . }}" - port: {{ template "harbor.jobservice.containerPort". }} - {{- if .Values.internalTLS.enabled }} - https_config: - cert: "/etc/harbor/ssl/jobservice/tls.crt" - key: "/etc/harbor/ssl/jobservice/tls.key" - {{- end }} - worker_pool: - workers: {{ .Values.jobservice.maxJobWorkers }} - backend: "redis" - redis_pool: - redis_url: "{{ template "harbor.redis.urlForJobservice" . }}" - namespace: "harbor_job_service_namespace" - idle_timeout_second: 3600 - job_loggers: - {{- if has "file" .Values.jobservice.jobLoggers }} - - name: "FILE" - level: {{ .Values.logLevel | upper }} - settings: # Customized settings of logger - base_dir: "/var/log/jobs" - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - settings: # Customized settings of sweeper - work_dir: "/var/log/jobs" - {{- end }} - {{- if has "database" .Values.jobservice.jobLoggers }} - - name: "DB" - level: {{ .Values.logLevel | upper }} - sweeper: - duration: {{ .Values.jobservice.loggerSweeperDuration }} #days - {{- end }} - {{- if has "stdout" .Values.jobservice.jobLoggers }} - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - {{- end }} - metric: - enabled: {{ .Values.metrics.enabled }} - path: {{ .Values.metrics.jobservice.path }} - port: {{ .Values.metrics.jobservice.port }} - #Loggers for the job service - loggers: - - name: "STD_OUTPUT" - level: {{ .Values.logLevel | upper }} - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: {{ .Values.jobservice.reaper.max_update_hours }} - # the max time for execution in running state without new task created - max_dangling_hours: {{ .Values.jobservice.reaper.max_dangling_hours }} diff --git a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-dpl.yaml b/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-dpl.yaml deleted file mode 100644 index 1bb6690824..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-dpl.yaml +++ /dev/null @@ -1,182 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice - app.kubernetes.io/component: jobservice -spec: - replicas: {{ .Values.jobservice.replicas }} - revisionHistoryLimit: {{ .Values.jobservice.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: jobservice - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: jobservice - app.kubernetes.io/component: jobservice -{{- if .Values.jobservice.podLabels }} -{{ toYaml .Values.jobservice.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }} - checksum/configmap-env: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm-env.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/jobservice/jobservice-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.jobservice.podAnnotations }} -{{ toYaml .Values.jobservice.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 -{{- if .Values.jobservice.serviceAccountName }} - serviceAccountName: {{ .Values.jobservice.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.jobservice.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.jobservice.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: jobservice -{{- end }} -{{- end }} - {{- with .Values.jobservice.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: jobservice - image: {{ .Values.jobservice.image.repository }}:{{ .Values.jobservice.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/v1/stats - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.jobservice.containerPort" . }} - initialDelaySeconds: 20 - periodSeconds: 10 -{{- if .Values.jobservice.resources }} - resources: -{{ toYaml .Values.jobservice.resources | indent 10 }} -{{- end }} - env: - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - {{- if .Values.jobservice.existingSecret }} - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/jobservice/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/jobservice/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/jobservice/ca.crt - {{- end }} - {{- if .Values.registry.credentials.existingSecret }} - - name: REGISTRY_CREDENTIAL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.registry.credentials.existingSecret }} - key: REGISTRY_PASSWD - {{- end }} -{{- with .Values.jobservice.extraEnvVars }} -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.jobservice" . }}-env" - - secretRef: - name: "{{ template "harbor.jobservice" . }}" - ports: - - containerPort: {{ template "harbor.jobservice.containerPort" . }} - volumeMounts: - - name: jobservice-config - mountPath: /etc/jobservice/config.yml - subPath: config.yml - - name: job-logs - mountPath: /var/log/jobs - subPath: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.subPath }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - mountPath: /etc/harbor/ssl/jobservice - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: jobservice-config - configMap: - name: "{{ template "harbor.jobservice" . }}" - - name: job-logs - {{- if and .Values.persistence.enabled (has "file" .Values.jobservice.jobLoggers) }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.jobservice.jobLog.existingClaim | default (include "harbor.jobservice" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: jobservice-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.jobservice.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.jobservice.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.jobservice.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.jobservice.priorityClassName }} - priorityClassName: {{ .Values.jobservice.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-pvc.yaml b/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-pvc.yaml deleted file mode 100644 index 3f7d00b671..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-pvc.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- $jobLog := .Values.persistence.persistentVolumeClaim.jobservice.jobLog -}} -{{- if and .Values.persistence.enabled (not $jobLog.existingClaim) (has "file" .Values.jobservice.jobLoggers) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.jobservice" . }} - annotations: - {{- range $key, $value := $jobLog.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: jobservice - app.kubernetes.io/component: jobservice -spec: - accessModes: - - {{ $jobLog.accessMode }} - resources: - requests: - storage: {{ $jobLog.size }} - {{- if $jobLog.storageClass }} - {{- if eq "-" $jobLog.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $jobLog.storageClass }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-secrets.yaml b/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-secrets.yaml deleted file mode 100644 index eeb00bde00..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-secrets.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.jobservice" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.jobservice.existingSecret }} - JOBSERVICE_SECRET: {{ .Values.jobservice.secret | default (include "harbor.secretKeyHelper" (dict "key" "JOBSERVICE_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.registry.credentials.existingSecret }} - REGISTRY_CREDENTIAL_PASSWORD: {{ .Values.registry.credentials.password | b64enc | quote }} - {{- end }} - {{- template "harbor.traceJaegerPassword" . }} diff --git a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-svc.yaml b/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-svc.yaml deleted file mode 100644 index d2b7a47fd4..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-svc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.jobservice" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-jobservice" "http-jobservice" .Values.internalTLS.enabled }} - port: {{ template "harbor.jobservice.servicePort" . }} - targetPort: {{ template "harbor.jobservice.containerPort" . }} -{{- if .Values.metrics.enabled }} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.jobservice.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: jobservice diff --git a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-tls.yaml b/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-tls.yaml deleted file mode 100644 index 234cb39995..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/jobservice/jobservice-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.jobservice.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.jobservice.crt\" is required!" .Values.internalTLS.jobservice.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.jobservice.key\" is required!" .Values.internalTLS.jobservice.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/metrics/metrics-svcmon.yaml b/charts/harbor/harbor/1.15.1/templates/metrics/metrics-svcmon.yaml deleted file mode 100644 index 1122ef01ef..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/metrics/metrics-svcmon.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "harbor.fullname" . }} - labels: {{ include "harbor.labels" . | nindent 4 }} -{{- if .Values.metrics.serviceMonitor.additionalLabels }} -{{ toYaml .Values.metrics.serviceMonitor.additionalLabels | indent 4 }} -{{- end }} -spec: - jobLabel: app.kubernetes.io/name - endpoints: - - port: {{ template "harbor.metricsPortName" . }} - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - honorLabels: true -{{- if .Values.metrics.serviceMonitor.metricRelabelings }} - metricRelabelings: -{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 4) . }} -{{- end }} -{{- if .Values.metrics.serviceMonitor.relabelings }} - relabelings: -{{ toYaml .Values.metrics.serviceMonitor.relabelings | indent 4 }} -{{- end }} - selector: - matchLabels: {{ include "harbor.matchLabels" . | nindent 6 }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/nginx/configmap-http.yaml b/charts/harbor/harbor/1.15.1/templates/nginx/configmap-http.yaml deleted file mode 100644 index c4b8354d06..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/nginx/configmap-http.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server {{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled}} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end }} - server_tokens off; - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # Add extra headers - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - proxy_send_timeout 900; - proxy_read_timeout 900; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/nginx/configmap-https.yaml b/charts/harbor/harbor/1.15.1/templates/nginx/configmap-https.yaml deleted file mode 100644 index 56c943a619..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/nginx/configmap-https.yaml +++ /dev/null @@ -1,187 +0,0 @@ -{{- if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }} -{{- $scheme := (include "harbor.component.scheme" .) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - - events { - worker_connections 3096; - use epoll; - multi_accept on; - } - - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - tcp_nodelay on; - - # this is necessary for us to be able to disable request buffering in all cases - proxy_http_version 1.1; - - upstream core { - server "{{ template "harbor.core" . }}:{{ template "harbor.core.servicePort" . }}"; - } - - upstream portal { - server "{{ template "harbor.portal" . }}:{{ template "harbor.portal.servicePort" . }}"; - } - - log_format timed_combined '[$time_local]:$remote_addr - ' - '"$request" $status $body_bytes_sent ' - '"$http_referer" "$http_user_agent" ' - '$request_time $upstream_response_time $pipe'; - - access_log /dev/stdout timed_combined; - - map $http_x_forwarded_proto $x_forwarded_proto { - default $http_x_forwarded_proto; - "" $scheme; - } - - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8443 ssl; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8443 ssl; - {{- end }} - # server_name harbordomain.com; - server_tokens off; - # SSL - ssl_certificate /etc/nginx/cert/tls.crt; - ssl_certificate_key /etc/nginx/cert/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - - # disable any limits to avoid HTTP 413 for large image uploads - client_max_body_size 0; - - # required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486) - chunked_transfer_encoding on; - - # Add extra headers - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - add_header X-Frame-Options DENY; - add_header Content-Security-Policy "frame-ancestors 'none'"; - - location / { - proxy_pass {{ $scheme }}://portal/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; HttpOnly; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /api/ { - proxy_pass {{ $scheme }}://core/api/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /chartrepo/ { - proxy_pass {{ $scheme }}://core/chartrepo/; - {{- if and .Values.internalTLS.enabled }} - proxy_ssl_verify off; - proxy_ssl_session_reuse on; - {{- end }} - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /c/ { - proxy_pass {{ $scheme }}://core/c/; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /v1/ { - return 404; - } - - location /v2/ { - proxy_pass {{ $scheme }}://core/v2/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/ { - proxy_pass {{ $scheme }}://core/service/; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $x_forwarded_proto; - - proxy_cookie_path / "/; Secure"; - - proxy_buffering off; - proxy_request_buffering off; - } - - location /service/notifications { - return 404; - } - } - server { - {{- if .Values.ipFamily.ipv4.enabled }} - listen 8080; - {{- end}} - {{- if .Values.ipFamily.ipv6.enabled }} - listen [::]:8080; - {{- end}} - #server_name harbordomain.com; - return 301 https://$host$request_uri; - } - } -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/nginx/deployment.yaml b/charts/harbor/harbor/1.15.1/templates/nginx/deployment.yaml deleted file mode 100644 index 3abc941989..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/nginx/deployment.yaml +++ /dev/null @@ -1,132 +0,0 @@ -{{- if ne .Values.expose.type "ingress" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: nginx - app.kubernetes.io/component: nginx -spec: - replicas: {{ .Values.nginx.replicas }} - revisionHistoryLimit: {{ .Values.nginx.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: nginx - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: nginx - app.kubernetes.io/component: nginx -{{- if .Values.nginx.podLabels }} -{{ toYaml .Values.nginx.podLabels | indent 8 }} -{{- end }} - annotations: - {{- if not .Values.expose.tls.enabled }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-http.yaml") . | sha256sum }} - {{- else }} - checksum/configmap: {{ include (print $.Template.BasePath "/nginx/configmap-https.yaml") . | sha256sum }} - {{- end }} - {{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} - checksum/secret: {{ include (print $.Template.BasePath "/nginx/secret.yaml") . | sha256sum }} - {{- end }} -{{- if .Values.nginx.podAnnotations }} -{{ toYaml .Values.nginx.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- if .Values.nginx.serviceAccountName }} - serviceAccountName: {{ .Values.nginx.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.nginx.automountServiceAccountToken | default false }} -{{- with .Values.nginx.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: nginx -{{- end }} -{{- end }} - containers: - - name: nginx - image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" - imagePullPolicy: "{{ .Values.imagePullPolicy }}" - {{- $_ := set . "scheme" "HTTP" -}} - {{- $_ := set . "port" "8080" -}} - {{- if .Values.expose.tls.enabled }} - {{- $_ := set . "scheme" "HTTPS" -}} - {{- $_ := set . "port" "8443" -}} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - scheme: {{ .scheme }} - path: / - port: {{ .port }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.nginx.resources }} - resources: -{{ toYaml .Values.nginx.resources | indent 10 }} -{{- end }} -{{- with .Values.nginx.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - ports: - - containerPort: 8080 - {{- if .Values.expose.tls.enabled }} - - containerPort: 8443 - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.expose.tls.enabled }} - - name: certificate - mountPath: /etc/nginx/cert - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "harbor.nginx" . }} - {{- if .Values.expose.tls.enabled }} - - name: certificate - secret: - secretName: {{ template "harbor.tlsSecretForNginx" . }} - {{- end }} - {{- with .Values.nginx.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.nginx.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.nginx.priorityClassName }} - priorityClassName: {{ .Values.nginx.priorityClassName }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/nginx/secret.yaml b/charts/harbor/harbor/1.15.1/templates/nginx/secret.yaml deleted file mode 100644 index c819c556d9..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/nginx/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if eq (include "harbor.autoGenCertForNginx" .) "true" }} -{{- $ca := genCA "harbor-ca" 365 }} -{{- $cn := (required "The \"expose.tls.auto.commonName\" is required!" .Values.expose.tls.auto.commonName) }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.nginx" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if regexMatch `^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$` $cn }} - {{- $cert := genSignedCert $cn (list $cn) nil 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- else }} - {{- $cert := genSignedCert $cn nil (list $cn) 365 $ca }} - tls.crt: {{ $cert.Cert | b64enc | quote }} - tls.key: {{ $cert.Key | b64enc | quote }} - ca.crt: {{ $ca.Cert | b64enc | quote }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/nginx/service.yaml b/charts/harbor/harbor/1.15.1/templates/nginx/service.yaml deleted file mode 100644 index 691584ce02..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/nginx/service.yaml +++ /dev/null @@ -1,94 +0,0 @@ -{{- if or (eq .Values.expose.type "clusterIP") (eq .Values.expose.type "nodePort") (eq .Values.expose.type "loadBalancer") }} -apiVersion: v1 -kind: Service -metadata: -{{- if eq .Values.expose.type "clusterIP" }} -{{- $clusterIP := .Values.expose.clusterIP }} - name: {{ $clusterIP.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if .Values.expose.clusterIP.labels }} -{{ toYaml $clusterIP.labels | indent 4 }} -{{- end }} -{{- with $clusterIP.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: ClusterIP - {{- if .Values.expose.clusterIP.staticClusterIP }} - clusterIP: {{ .Values.expose.clusterIP.staticClusterIP }} - {{- end }} - ports: - - name: http - port: {{ $clusterIP.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $clusterIP.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- else if eq .Values.expose.type "nodePort" }} -{{- $nodePort := .Values.expose.nodePort }} - name: {{ $nodePort.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if .Values.expose.nodePort.labels }} -{{ toYaml $nodePort.labels | indent 4 }} -{{- end }} -{{- with $nodePort.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: NodePort - ports: - - name: http - port: {{ $nodePort.ports.http.port }} - targetPort: 8080 - {{- if $nodePort.ports.http.nodePort }} - nodePort: {{ $nodePort.ports.http.nodePort }} - {{- end }} - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $nodePort.ports.https.port }} - targetPort: 8443 - {{- if $nodePort.ports.https.nodePort }} - nodePort: {{ $nodePort.ports.https.nodePort }} - {{- end }} - {{- end }} -{{- else if eq .Values.expose.type "loadBalancer" }} -{{- $loadBalancer := .Values.expose.loadBalancer }} - name: {{ $loadBalancer.name }} - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- if .Values.expose.loadBalancer.labels }} -{{ toYaml $loadBalancer.labels | indent 4 }} -{{- end }} -{{- with $loadBalancer.annotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: - type: LoadBalancer - {{- with $loadBalancer.sourceRanges }} - loadBalancerSourceRanges: - {{- toYaml . | nindent 4 }} - {{- end }} - {{- if $loadBalancer.IP }} - loadBalancerIP: {{ $loadBalancer.IP }} - {{- end }} - ports: - - name: http - port: {{ $loadBalancer.ports.httpPort }} - targetPort: 8080 - {{- if .Values.expose.tls.enabled }} - - name: https - port: {{ $loadBalancer.ports.httpsPort }} - targetPort: 8443 - {{- end }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: nginx -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/portal/configmap.yaml b/charts/harbor/harbor/1.15.1/templates/portal/configmap.yaml deleted file mode 100644 index 7b2118e721..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/portal/configmap.yaml +++ /dev/null @@ -1,67 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - nginx.conf: |+ - worker_processes auto; - pid /tmp/nginx.pid; - events { - worker_connections 1024; - } - http { - client_body_temp_path /tmp/client_body_temp; - proxy_temp_path /tmp/proxy_temp; - fastcgi_temp_path /tmp/fastcgi_temp; - uwsgi_temp_path /tmp/uwsgi_temp; - scgi_temp_path /tmp/scgi_temp; - server { - {{- if .Values.internalTLS.enabled }} - {{- if .Values.ipFamily.ipv4.enabled}} - listen {{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }} ssl; - {{- end }} - # SSL - ssl_certificate /etc/harbor/ssl/portal/tls.crt; - ssl_certificate_key /etc/harbor/ssl/portal/tls.key; - - # Recommendations from https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html - ssl_protocols TLSv1.2 TLSv1.3; - {{- if .Values.internalTLS.strong_ssl_ciphers }} - ssl_ciphers ECDHE+AESGCM:DHE+AESGCM:ECDHE+RSA+SHA256:DHE+RSA+SHA256:!AES128; - {{ else }} - ssl_ciphers '!aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES:'; - {{- end }} - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - {{- else }} - {{- if .Values.ipFamily.ipv4.enabled }} - listen {{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- if .Values.ipFamily.ipv6.enabled}} - listen [::]:{{ template "harbor.portal.containerPort" . }}; - {{- end }} - {{- end }} - server_name localhost; - root /usr/share/nginx/html; - index index.html index.htm; - include /etc/nginx/mime.types; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location /devcenter-api-2.0 { - try_files $uri $uri/ /swagger-ui-index.html; - } - location / { - try_files $uri $uri/ /index.html; - } - location = /index.html { - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - } - } diff --git a/charts/harbor/harbor/1.15.1/templates/portal/deployment.yaml b/charts/harbor/harbor/1.15.1/templates/portal/deployment.yaml deleted file mode 100644 index 4dea944382..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/portal/deployment.yaml +++ /dev/null @@ -1,123 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: portal - app.kubernetes.io/component: portal -spec: - replicas: {{ .Values.portal.replicas }} - revisionHistoryLimit: {{ .Values.portal.revisionHistoryLimit }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: portal - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: portal - app.kubernetes.io/component: portal -{{- if .Values.portal.podLabels }} -{{ toYaml .Values.portal.podLabels | indent 8 }} -{{- end }} - annotations: -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/portal/tls.yaml") . | sha256sum }} -{{- end }} - checksum/configmap: {{ include (print $.Template.BasePath "/portal/configmap.yaml") . | sha256sum }} -{{- if .Values.portal.podAnnotations }} -{{ toYaml .Values.portal.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} -{{- if .Values.portal.serviceAccountName }} - serviceAccountName: {{ .Values.portal.serviceAccountName }} -{{- end }} - automountServiceAccountToken: {{ .Values.portal.automountServiceAccountToken | default false }} -{{- with .Values.portal.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: portal -{{- end }} -{{- end }} - {{- with .Values.portal.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: portal - image: {{ .Values.portal.image.repository }}:{{ .Values.portal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} -{{- if .Values.portal.resources }} - resources: -{{ toYaml .Values.portal.resources | indent 10 }} -{{- end }} -{{- with .Values.portal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.portal.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 - ports: - - containerPort: {{ template "harbor.portal.containerPort" . }} - volumeMounts: - - name: portal-config - mountPath: /etc/nginx/nginx.conf - subPath: nginx.conf - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - mountPath: /etc/harbor/ssl/portal - {{- end }} - volumes: - - name: portal-config - configMap: - name: "{{ template "harbor.portal" . }}" - {{- if .Values.internalTLS.enabled }} - - name: portal-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.portal.secretName" . }} - {{- end }} - {{- with .Values.portal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.portal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.portal.priorityClassName }} - priorityClassName: {{ .Values.portal.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/portal/service.yaml b/charts/harbor/harbor/1.15.1/templates/portal/service.yaml deleted file mode 100644 index d00026da46..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/portal/service.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.portal" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -{{- with .Values.portal.serviceAnnotations }} - annotations: - {{- toYaml . | nindent 4 }} -{{- end }} -spec: -{{- if or (eq .Values.expose.ingress.controller "gce") (eq .Values.expose.ingress.controller "alb") (eq .Values.expose.ingress.controller "f5-bigip") }} - type: NodePort -{{- end }} - ports: - - port: {{ template "harbor.portal.servicePort" . }} - targetPort: {{ template "harbor.portal.containerPort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: portal diff --git a/charts/harbor/harbor/1.15.1/templates/portal/tls.yaml b/charts/harbor/harbor/1.15.1/templates/portal/tls.yaml deleted file mode 100644 index de63f4e813..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/portal/tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.portal.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.portal.crt\" is required!" .Values.internalTLS.portal.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.portal.key\" is required!" .Values.internalTLS.portal.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/redis/service.yaml b/charts/harbor/harbor/1.15.1/templates/redis/service.yaml deleted file mode 100644 index 79c95c3e05..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/redis/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - port: 6379 - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: redis -{{- end -}} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/redis/statefulset.yaml b/charts/harbor/harbor/1.15.1/templates/redis/statefulset.yaml deleted file mode 100644 index 1d37fb184b..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/redis/statefulset.yaml +++ /dev/null @@ -1,125 +0,0 @@ -{{- if eq .Values.redis.type "internal" -}} -{{- $redis := .Values.persistence.persistentVolumeClaim.redis -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.redis" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: redis - app.kubernetes.io/component: redis -spec: - replicas: 1 - serviceName: {{ template "harbor.redis" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: redis - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: redis - app.kubernetes.io/component: redis -{{- if .Values.redis.podLabels }} -{{ toYaml .Values.redis.podLabels | indent 8 }} -{{- end }} -{{- if .Values.redis.podAnnotations }} - annotations: -{{ toYaml .Values.redis.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 999 - fsGroup: 999 -{{- if .Values.redis.internal.serviceAccountName }} - serviceAccountName: {{ .Values.redis.internal.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.redis.internal.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 - {{- with .Values.redis.internal.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: redis - image: {{ .Values.redis.internal.image.repository }}:{{ .Values.redis.internal.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - livenessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - tcpSocket: - port: 6379 - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.redis.internal.resources }} - resources: -{{ toYaml .Values.redis.internal.resources | indent 10 }} -{{- end }} -{{- with .Values.redis.internal.extraEnvVars }} - env: -{{- toYaml . | nindent 10 }} -{{- end }} - volumeMounts: - - name: data - mountPath: /var/lib/redis - subPath: {{ $redis.subPath }} - {{- if not .Values.persistence.enabled }} - volumes: - - name: data - emptyDir: {} - {{- else if $redis.existingClaim }} - volumes: - - name: data - persistentVolumeClaim: - claimName: {{ $redis.existingClaim }} - {{- end -}} - {{- with .Values.redis.internal.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.redis.internal.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.redis.internal.priorityClassName }} - priorityClassName: {{ .Values.redis.internal.priorityClassName }} - {{- end }} - {{- if and .Values.persistence.enabled (not $redis.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.legacy.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $redis.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $redis.accessMode | quote }}] - {{- if $redis.storageClass }} - {{- if (eq "-" $redis.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $redis.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $redis.size | quote }} - {{- end -}} - {{- end -}} diff --git a/charts/harbor/harbor/1.15.1/templates/registry/registry-cm.yaml b/charts/harbor/harbor/1.15.1/templates/registry/registry-cm.yaml deleted file mode 100644 index 4f7056c384..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/registry/registry-cm.yaml +++ /dev/null @@ -1,246 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - config.yml: |+ - version: 0.1 - log: - {{- if eq .Values.logLevel "warning" }} - level: warn - {{- else if eq .Values.logLevel "fatal" }} - level: error - {{- else }} - level: {{ .Values.logLevel }} - {{- end }} - fields: - service: registry - storage: - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if eq $type "filesystem" }} - filesystem: - rootdirectory: {{ $storage.filesystem.rootdirectory }} - {{- if $storage.filesystem.maxthreads }} - maxthreads: {{ $storage.filesystem.maxthreads }} - {{- end }} - {{- else if eq $type "azure" }} - azure: - accountname: {{ $storage.azure.accountname }} - container: {{ $storage.azure.container }} - {{- if $storage.azure.realm }} - realm: {{ $storage.azure.realm }} - {{- end }} - {{- else if eq $type "gcs" }} - gcs: - bucket: {{ $storage.gcs.bucket }} - {{- if not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity }} - keyfile: /etc/registry/gcs-key.json - {{- end }} - {{- if $storage.gcs.rootdirectory }} - rootdirectory: {{ $storage.gcs.rootdirectory }} - {{- end }} - {{- if $storage.gcs.chunksize }} - chunksize: {{ $storage.gcs.chunksize }} - {{- end }} - {{- else if eq $type "s3" }} - s3: - region: {{ $storage.s3.region }} - bucket: {{ $storage.s3.bucket }} - {{- if $storage.s3.regionendpoint }} - regionendpoint: {{ $storage.s3.regionendpoint }} - {{- end }} - {{- if $storage.s3.encrypt }} - encrypt: {{ $storage.s3.encrypt }} - {{- end }} - {{- if $storage.s3.keyid }} - keyid: {{ $storage.s3.keyid }} - {{- end }} - {{- if $storage.s3.secure }} - secure: {{ $storage.s3.secure }} - {{- end }} - {{- if and $storage.s3.secure $storage.s3.skipverify }} - skipverify: {{ $storage.s3.skipverify }} - {{- end }} - {{- if $storage.s3.v4auth }} - v4auth: {{ $storage.s3.v4auth }} - {{- end }} - {{- if $storage.s3.chunksize }} - chunksize: {{ $storage.s3.chunksize }} - {{- end }} - {{- if $storage.s3.rootdirectory }} - rootdirectory: {{ $storage.s3.rootdirectory }} - {{- end }} - {{- if $storage.s3.storageclass }} - storageclass: {{ $storage.s3.storageclass }} - {{- end }} - {{- if $storage.s3.multipartcopychunksize }} - multipartcopychunksize: {{ $storage.s3.multipartcopychunksize }} - {{- end }} - {{- if $storage.s3.multipartcopymaxconcurrency }} - multipartcopymaxconcurrency: {{ $storage.s3.multipartcopymaxconcurrency }} - {{- end }} - {{- if $storage.s3.multipartcopythresholdsize }} - multipartcopythresholdsize: {{ $storage.s3.multipartcopythresholdsize }} - {{- end }} - {{- else if eq $type "swift" }} - swift: - authurl: {{ $storage.swift.authurl }} - username: {{ $storage.swift.username }} - container: {{ $storage.swift.container }} - {{- if $storage.swift.region }} - region: {{ $storage.swift.region }} - {{- end }} - {{- if $storage.swift.tenant }} - tenant: {{ $storage.swift.tenant }} - {{- end }} - {{- if $storage.swift.tenantid }} - tenantid: {{ $storage.swift.tenantid }} - {{- end }} - {{- if $storage.swift.domain }} - domain: {{ $storage.swift.domain }} - {{- end }} - {{- if $storage.swift.domainid }} - domainid: {{ $storage.swift.domainid }} - {{- end }} - {{- if $storage.swift.trustid }} - trustid: {{ $storage.swift.trustid }} - {{- end }} - {{- if $storage.swift.insecureskipverify }} - insecureskipverify: {{ $storage.swift.insecureskipverify }} - {{- end }} - {{- if $storage.swift.chunksize }} - chunksize: {{ $storage.swift.chunksize }} - {{- end }} - {{- if $storage.swift.prefix }} - prefix: {{ $storage.swift.prefix }} - {{- end }} - {{- if $storage.swift.authversion }} - authversion: {{ $storage.swift.authversion }} - {{- end }} - {{- if $storage.swift.endpointtype }} - endpointtype: {{ $storage.swift.endpointtype }} - {{- end }} - {{- if $storage.swift.tempurlcontainerkey }} - tempurlcontainerkey: {{ $storage.swift.tempurlcontainerkey }} - {{- end }} - {{- if $storage.swift.tempurlmethods }} - tempurlmethods: {{ $storage.swift.tempurlmethods }} - {{- end }} - {{- else if eq $type "oss" }} - oss: - accesskeyid: {{ $storage.oss.accesskeyid }} - region: {{ $storage.oss.region }} - bucket: {{ $storage.oss.bucket }} - {{- if $storage.oss.endpoint }} - endpoint: {{ $storage.oss.bucket }}.{{ $storage.oss.endpoint }} - {{- end }} - {{- if $storage.oss.internal }} - internal: {{ $storage.oss.internal }} - {{- end }} - {{- if $storage.oss.encrypt }} - encrypt: {{ $storage.oss.encrypt }} - {{- end }} - {{- if $storage.oss.secure }} - secure: {{ $storage.oss.secure }} - {{- end }} - {{- if $storage.oss.chunksize }} - chunksize: {{ $storage.oss.chunksize }} - {{- end }} - {{- if $storage.oss.rootdirectory }} - rootdirectory: {{ $storage.oss.rootdirectory }} - {{- end }} - {{- end }} - cache: - layerinfo: redis - maintenance: - uploadpurging: - {{- if .Values.registry.upload_purging.enabled }} - enabled: true - age: {{ .Values.registry.upload_purging.age }} - interval: {{ .Values.registry.upload_purging.interval }} - dryrun: {{ .Values.registry.upload_purging.dryrun }} - {{- else }} - enabled: false - {{- end }} - delete: - enabled: true - redirect: - disable: {{ $storage.disableredirect }} - redis: - addr: {{ template "harbor.redis.addr" . }} - {{- if eq "redis+sentinel" (include "harbor.redis.scheme" .) }} - sentinelMasterSet: {{ template "harbor.redis.masterSet" . }} - {{- end }} - db: {{ template "harbor.redis.dbForRegistry" . }} - {{- if not (eq (include "harbor.redis.password" .) "") }} - password: {{ template "harbor.redis.password" . }} - {{- end }} - readtimeout: 10s - writetimeout: 10s - dialtimeout: 10s - pool: - maxidle: 100 - maxactive: 500 - idletimeout: 60s - http: - addr: :{{ template "harbor.registry.containerPort" . }} - relativeurls: {{ .Values.registry.relativeurls }} - {{- if .Values.internalTLS.enabled }} - tls: - certificate: /etc/harbor/ssl/registry/tls.crt - key: /etc/harbor/ssl/registry/tls.key - minimumtls: tls1.2 - {{- end }} - # set via environment variable - # secret: placeholder - debug: - {{- if .Values.metrics.enabled}} - addr: :{{ .Values.metrics.registry.port }} - prometheus: - enabled: true - path: {{ .Values.metrics.registry.path }} - {{- else }} - addr: localhost:5001 - {{- end }} - auth: - htpasswd: - realm: harbor-registry-basic-realm - path: /etc/registry/passwd - validation: - disabled: true - compatibility: - schema1: - enabled: true - - {{- if .Values.registry.middleware.enabled }} - {{- $middleware := .Values.registry.middleware }} - {{- $middlewareType := $middleware.type }} - {{- if eq $middlewareType "cloudFront" }} - middleware: - storage: - - name: cloudfront - options: - baseurl: {{ $middleware.cloudFront.baseurl }} - privatekey: /etc/registry/pk.pem - keypairid: {{ $middleware.cloudFront.keypairid }} - duration: {{ $middleware.cloudFront.duration }} - ipfilteredby: {{ $middleware.cloudFront.ipfilteredby }} - {{- end }} - {{- end }} - ctl-config.yml: |+ - --- - {{- if .Values.internalTLS.enabled }} - protocol: "https" - port: 8443 - https_config: - cert: "/etc/harbor/ssl/registry/tls.crt" - key: "/etc/harbor/ssl/registry/tls.key" - {{- else }} - protocol: "http" - port: 8080 - {{- end }} - log_level: {{ .Values.logLevel }} - registry_config: "/etc/registry/config.yml" diff --git a/charts/harbor/harbor/1.15.1/templates/registry/registry-dpl.yaml b/charts/harbor/harbor/1.15.1/templates/registry/registry-dpl.yaml deleted file mode 100644 index 0965cf2e2a..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/registry/registry-dpl.yaml +++ /dev/null @@ -1,431 +0,0 @@ -{{- $storage := .Values.persistence.imageChartStorage }} -{{- $type := $storage.type }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry - app.kubernetes.io/component: registry -spec: - replicas: {{ .Values.registry.replicas }} - revisionHistoryLimit: {{ .Values.registry.revisionHistoryLimit }} - strategy: - type: {{ .Values.updateStrategy.type }} - {{- if eq .Values.updateStrategy.type "Recreate" }} - rollingUpdate: null - {{- end }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: registry - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: registry - app.kubernetes.io/component: registry -{{- if .Values.registry.podLabels }} -{{ toYaml .Values.registry.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }} - checksum/secret-jobservice: {{ include (print $.Template.BasePath "/jobservice/jobservice-secrets.yaml") . | sha256sum }} - checksum/secret-core: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/registry/registry-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.registry.podAnnotations }} -{{ toYaml .Values.registry.podAnnotations | indent 8 }} -{{- end }} - spec: - securityContext: - runAsUser: 10000 - fsGroup: 10000 - fsGroupChangePolicy: OnRootMismatch -{{- if .Values.registry.serviceAccountName }} - serviceAccountName: {{ .Values.registry.serviceAccountName }} -{{- end -}} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - automountServiceAccountToken: {{ .Values.registry.automountServiceAccountToken | default false }} - terminationGracePeriodSeconds: 120 -{{- with .Values.registry.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: registry -{{- end }} -{{- end }} - {{- with .Values.registry.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: registry - image: {{ .Values.registry.registry.image.repository }}:{{ .Values.registry.registry.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: / - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registry.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.registry.resources }} - resources: -{{ toYaml .Values.registry.registry.resources | indent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - args: ["serve", "/etc/registry/config.yml"] - envFrom: - - secretRef: - name: "{{ template "harbor.registry" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.registry.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registry.containerPort" . }} - - containerPort: {{ ternary .Values.metrics.registry.port 5001 .Values.metrics.enabled }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-htpasswd - mountPath: /etc/registry/passwd - subPath: passwd - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - mountPath: /etc/registry/pk.pem - subPath: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - - name: registryctl - image: {{ .Values.registry.controller.image.repository }}:{{ .Values.registry.controller.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - livenessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 300 - periodSeconds: 10 - readinessProbe: - httpGet: - path: /api/health - scheme: {{ include "harbor.component.scheme" . | upper }} - port: {{ template "harbor.registryctl.containerPort" . }} - initialDelaySeconds: 1 - periodSeconds: 10 -{{- if .Values.registry.controller.resources }} - resources: -{{ toYaml .Values.registry.controller.resources | indent 10 }} -{{- end }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 10 }} - {{- end }} - envFrom: - - configMapRef: - name: "{{ template "harbor.registryCtl" . }}" - - secretRef: - name: "{{ template "harbor.registry" . }}" - - secretRef: - name: "{{ template "harbor.registryCtl" . }}" - {{- if .Values.persistence.imageChartStorage.s3.existingSecret }} - - secretRef: - name: {{ .Values.persistence.imageChartStorage.s3.existingSecret }} - {{- end }} - env: - {{- if .Values.registry.existingSecret }} - - name: REGISTRY_HTTP_SECRET - valueFrom: - secretKeyRef: - name: {{ .Values.registry.existingSecret }} - key: {{ .Values.registry.existingSecretKey }} - {{- end }} - - name: CORE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.core" .) .Values.core.existingSecret }} - key: secret - - name: JOBSERVICE_SECRET - valueFrom: - secretKeyRef: - name: {{ default (include "harbor.jobservice" .) .Values.jobservice.existingSecret }} - {{- if .Values.jobservice.existingSecret }} - key: {{ .Values.jobservice.existingSecretKey }} - {{- else }} - key: JOBSERVICE_SECRET - {{- end }} - {{- if has "registry" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: INTERNAL_TLS_KEY_PATH - value: /etc/harbor/ssl/registry/tls.key - - name: INTERNAL_TLS_CERT_PATH - value: /etc/harbor/ssl/registry/tls.crt - - name: INTERNAL_TLS_TRUST_CA_PATH - value: /etc/harbor/ssl/registry/ca.crt - {{- end }} - {{- if .Values.redis.external.existingSecret }} - - name: REGISTRY_REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.redis.external.existingSecret }} - key: REDIS_PASSWORD - {{- end }} - {{- if .Values.persistence.imageChartStorage.azure.existingSecret }} - - name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.azure.existingSecret }} - key: AZURE_STORAGE_ACCESS_KEY - {{- end }} - {{- if .Values.persistence.imageChartStorage.swift.existingSecret }} - - name: REGISTRY_STORAGE_SWIFT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_PASSWORD - - name: REGISTRY_STORAGE_SWIFT_SECRETKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_SECRETKEY - optional: true - - name: REGISTRY_STORAGE_SWIFT_ACCESSKEY - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.swift.existingSecret }} - key: REGISTRY_STORAGE_SWIFT_ACCESSKEY - optional: true - {{- end }} - {{- if .Values.persistence.imageChartStorage.oss.existingSecret }} - - name: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - valueFrom: - secretKeyRef: - name: {{ .Values.persistence.imageChartStorage.oss.existingSecret }} - key: REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - optional: true - {{- end}} -{{- with .Values.registry.controller.extraEnvVars }} -{{- toYaml . | nindent 8 }} -{{- end }} - ports: - - containerPort: {{ template "harbor.registryctl.containerPort" . }} - volumeMounts: - - name: registry-data - mountPath: {{ .Values.persistence.imageChartStorage.filesystem.rootdirectory }} - subPath: {{ .Values.persistence.persistentVolumeClaim.registry.subPath }} - - name: registry-config - mountPath: /etc/registry/config.yml - subPath: config.yml - - name: registry-config - mountPath: /etc/registryctl/config.yml - subPath: ctl-config.yml - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - mountPath: /etc/harbor/ssl/registry - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - mountPath: /harbor_cust_cert/custom-ca-bundle.crt - subPath: ca.crt - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - mountPath: /etc/registry/gcs-key.json - subPath: gcs-key.json - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 8 }} - {{- end }} - volumes: - - name: registry-htpasswd - secret: - {{- if not .Values.registry.credentials.existingSecret }} - secretName: {{ template "harbor.registry" . }}-htpasswd - {{ else }} - secretName: {{ .Values.registry.credentials.existingSecret }} - {{- end }} - items: - - key: REGISTRY_HTPASSWD - path: passwd - - name: registry-config - configMap: - name: "{{ template "harbor.registry" . }}" - - name: registry-data - {{- if and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "filesystem") }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.persistentVolumeClaim.registry.existingClaim | default (include "harbor.registry" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.internalTLS.enabled }} - - name: registry-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.registry.secretName" . }} - {{- end }} - {{- if and (and .Values.persistence.enabled (eq .Values.persistence.imageChartStorage.type "gcs")) (not .Values.persistence.imageChartStorage.gcs.useWorkloadIdentity ) }} - - name: gcs-key - secret: - {{- if and (eq $type "gcs") $storage.gcs.existingSecret }} - secretName: {{ $storage.gcs.existingSecret }} - {{- else }} - secretName: {{ template "harbor.registry" . }} - {{- end }} - items: - - key: GCS_KEY_DATA - path: gcs-key.json - {{- end }} - {{- if .Values.persistence.imageChartStorage.caBundleSecretName }} - - name: storage-service-ca - secret: - secretName: {{ .Values.persistence.imageChartStorage.caBundleSecretName }} - {{- end }} - {{- if .Values.registry.middleware.enabled }} - {{- if eq .Values.registry.middleware.type "cloudFront" }} - - name: cloudfront-key - secret: - secretName: {{ .Values.registry.middleware.cloudFront.privateKeySecret }} - items: - - key: CLOUDFRONT_KEY_DATA - path: pk.pem - {{- end }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- with .Values.registry.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.registry.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.registry.priorityClassName }} - priorityClassName: {{ .Values.registry.priorityClassName }} - {{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/registry/registry-pvc.yaml b/charts/harbor/harbor/1.15.1/templates/registry/registry-pvc.yaml deleted file mode 100644 index 5d6d4d3ddf..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/registry/registry-pvc.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.persistence.enabled }} -{{- $registry := .Values.persistence.persistentVolumeClaim.registry -}} -{{- if and (not $registry.existingClaim) (eq .Values.persistence.imageChartStorage.type "filesystem") }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "harbor.registry" . }} - annotations: - {{- range $key, $value := $registry.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- if eq .Values.persistence.resourcePolicy "keep" }} - helm.sh/resource-policy: keep - {{- end }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: registry - app.kubernetes.io/component: registry -spec: - accessModes: - - {{ $registry.accessMode }} - resources: - requests: - storage: {{ $registry.size }} - {{- if $registry.storageClass }} - {{- if eq "-" $registry.storageClass }} - storageClassName: "" - {{- else }} - storageClassName: {{ $registry.storageClass }} - {{- end }} - {{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/registry/registry-secret.yaml b/charts/harbor/harbor/1.15.1/templates/registry/registry-secret.yaml deleted file mode 100644 index e853a9cbec..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/registry/registry-secret.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace (include "harbor.registry" .) }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if not .Values.registry.existingSecret }} - REGISTRY_HTTP_SECRET: {{ .Values.registry.secret | default (include "harbor.secretKeyHelper" (dict "key" "REGISTRY_HTTP_SECRET" "data" $existingSecret.data)) | default (randAlphaNum 16) | b64enc | quote }} - {{- end }} - {{- if not .Values.redis.external.existingSecret }} - REGISTRY_REDIS_PASSWORD: {{ include "harbor.redis.password" . | b64enc | quote }} - {{- end }} - {{- $storage := .Values.persistence.imageChartStorage }} - {{- $type := $storage.type }} - {{- if and (eq $type "azure") (not $storage.azure.existingSecret) }} - REGISTRY_STORAGE_AZURE_ACCOUNTKEY: {{ $storage.azure.accountkey | b64enc | quote }} - {{- else if and (and (eq $type "gcs") (not $storage.gcs.existingSecret)) (not $storage.gcs.useWorkloadIdentity) }} - GCS_KEY_DATA: {{ $storage.gcs.encodedkey | quote }} - {{- else if eq $type "s3" }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.accesskey) }} - REGISTRY_STORAGE_S3_ACCESSKEY: {{ $storage.s3.accesskey | b64enc | quote }} - {{- end }} - {{- if and (not $storage.s3.existingSecret) ($storage.s3.secretkey) }} - REGISTRY_STORAGE_S3_SECRETKEY: {{ $storage.s3.secretkey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "swift") (not ($storage.swift.existingSecret)) }} - REGISTRY_STORAGE_SWIFT_PASSWORD: {{ $storage.swift.password | b64enc | quote }} - {{- if $storage.swift.secretkey }} - REGISTRY_STORAGE_SWIFT_SECRETKEY: {{ $storage.swift.secretkey | b64enc | quote }} - {{- end }} - {{- if $storage.swift.accesskey }} - REGISTRY_STORAGE_SWIFT_ACCESSKEY: {{ $storage.swift.accesskey | b64enc | quote }} - {{- end }} - {{- else if and (eq $type "oss") ((not ($storage.oss.existingSecret))) }} - REGISTRY_STORAGE_OSS_ACCESSKEYSECRET: {{ $storage.oss.accesskeysecret | b64enc | quote }} - {{- end }} -{{- if not .Values.registry.credentials.existingSecret }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registry" . }}-htpasswd" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- if .Values.registry.credentials.htpasswdString }} - REGISTRY_HTPASSWD: {{ .Values.registry.credentials.htpasswdString | b64enc | quote }} - {{- else }} - REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/registry/registry-svc.yaml b/charts/harbor/harbor/1.15.1/templates/registry/registry-svc.yaml deleted file mode 100644 index 749690ea03..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/registry/registry-svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.registry" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-registry" "http-registry" .Values.internalTLS.enabled }} - port: {{ template "harbor.registry.servicePort" . }} - - - name: {{ ternary "https-controller" "http-controller" .Values.internalTLS.enabled }} - port: {{ template "harbor.registryctl.servicePort" . }} -{{- if .Values.metrics.enabled}} - - name: {{ template "harbor.metricsPortName" . }} - port: {{ .Values.metrics.registry.port }} -{{- end }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: registry \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/registry/registry-tls.yaml b/charts/harbor/harbor/1.15.1/templates/registry/registry-tls.yaml deleted file mode 100644 index 9d1862c417..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/registry/registry-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.registry.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.registry.crt\" is required!" .Values.internalTLS.registry.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.registry.key\" is required!" .Values.internalTLS.registry.key) | b64enc | quote }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/registry/registryctl-cm.yaml b/charts/harbor/harbor/1.15.1/templates/registry/registryctl-cm.yaml deleted file mode 100644 index 87aa5ffe24..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/registry/registryctl-cm.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -data: - {{- template "harbor.traceEnvsForRegistryCtl" . }} diff --git a/charts/harbor/harbor/1.15.1/templates/registry/registryctl-secret.yaml b/charts/harbor/harbor/1.15.1/templates/registry/registryctl-secret.yaml deleted file mode 100644 index 70097703e9..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/registry/registryctl-secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.registryCtl" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - {{- template "harbor.traceJaegerPassword" . }} \ No newline at end of file diff --git a/charts/harbor/harbor/1.15.1/templates/trivy/trivy-secret.yaml b/charts/harbor/harbor/1.15.1/templates/trivy/trivy-secret.yaml deleted file mode 100644 index 84652c7498..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/trivy/trivy-secret.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.trivy.enabled }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} -type: Opaque -data: - redisURL: {{ include "harbor.redis.urlForTrivy" . | b64enc }} - gitHubToken: {{ .Values.trivy.gitHubToken | default "" | b64enc | quote }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/trivy/trivy-sts.yaml b/charts/harbor/harbor/1.15.1/templates/trivy/trivy-sts.yaml deleted file mode 100644 index c876ba3878..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/trivy/trivy-sts.yaml +++ /dev/null @@ -1,230 +0,0 @@ -{{- if .Values.trivy.enabled }} -{{- $trivy := .Values.persistence.persistentVolumeClaim.trivy }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "harbor.trivy" . }} - labels: -{{ include "harbor.labels" . | indent 4 }} - component: trivy - app.kubernetes.io/component: trivy -spec: - replicas: {{ .Values.trivy.replicas }} - serviceName: {{ template "harbor.trivy" . }} - selector: - matchLabels: -{{ include "harbor.matchLabels" . | indent 6 }} - component: trivy - template: - metadata: - labels: -{{ include "harbor.labels" . | indent 8 }} - component: trivy - app.kubernetes.io/component: trivy -{{- if .Values.trivy.podLabels }} -{{ toYaml .Values.trivy.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/trivy/trivy-secret.yaml") . | sha256sum }} -{{- if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "auto") }} - checksum/tls: {{ include (print $.Template.BasePath "/internal/auto-tls.yaml") . | sha256sum }} -{{- else if and .Values.internalTLS.enabled (eq .Values.internalTLS.certSource "manual") }} - checksum/tls: {{ include (print $.Template.BasePath "/trivy/trivy-tls.yaml") . | sha256sum }} -{{- end }} -{{- if .Values.trivy.podAnnotations }} -{{ toYaml .Values.trivy.podAnnotations | indent 8 }} -{{- end }} - spec: -{{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} -{{- end }} -{{- if .Values.trivy.serviceAccountName }} - serviceAccountName: {{ .Values.trivy.serviceAccountName }} -{{- end }} - securityContext: - runAsUser: 10000 - fsGroup: 10000 - automountServiceAccountToken: {{ .Values.trivy.automountServiceAccountToken | default false }} -{{- with .Values.trivy.topologySpreadConstraints}} - topologySpreadConstraints: -{{- range . }} - - {{ . | toYaml | indent 8 | trim }} - labelSelector: - matchLabels: -{{ include "harbor.matchLabels" $ | indent 12 }} - component: trivy -{{- end }} -{{- end }} - {{- with .Values.trivy.initContainers }} - initContainers: - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: trivy - image: {{ .Values.trivy.image.repository }}:{{ .Values.trivy.image.tag }} - imagePullPolicy: {{ .Values.imagePullPolicy }} - {{- if not (empty .Values.containerSecurityContext) }} - securityContext: {{ .Values.containerSecurityContext | toYaml | nindent 12 }} - {{- end }} - env: - {{- if has "trivy" .Values.proxy.components }} - - name: HTTP_PROXY - value: "{{ .Values.proxy.httpProxy }}" - - name: HTTPS_PROXY - value: "{{ .Values.proxy.httpsProxy }}" - - name: NO_PROXY - value: "{{ template "harbor.noProxy" . }}" - {{- end }} - - name: "SCANNER_LOG_LEVEL" - value: {{ .Values.logLevel | quote }} - - name: "SCANNER_TRIVY_CACHE_DIR" - value: "/home/scanner/.cache/trivy" - - name: "SCANNER_TRIVY_REPORTS_DIR" - value: "/home/scanner/.cache/reports" - - name: "SCANNER_TRIVY_DEBUG_MODE" - value: {{ .Values.trivy.debugMode | quote }} - - name: "SCANNER_TRIVY_VULN_TYPE" - value: {{ .Values.trivy.vulnType | quote }} - - name: "SCANNER_TRIVY_TIMEOUT" - value: {{ .Values.trivy.timeout | quote }} - - name: "SCANNER_TRIVY_GITHUB_TOKEN" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: gitHubToken - - name: "SCANNER_TRIVY_SEVERITY" - value: {{ .Values.trivy.severity | quote }} - - name: "SCANNER_TRIVY_IGNORE_UNFIXED" - value: {{ .Values.trivy.ignoreUnfixed | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_UPDATE" - value: {{ .Values.trivy.skipUpdate | default false | quote }} - - name: "SCANNER_TRIVY_SKIP_JAVA_DB_UPDATE" - value: {{ .Values.trivy.skipJavaDBUpdate | default false | quote }} - - name: "SCANNER_TRIVY_OFFLINE_SCAN" - value: {{ .Values.trivy.offlineScan | default false | quote }} - - name: "SCANNER_TRIVY_SECURITY_CHECKS" - value: {{ .Values.trivy.securityCheck | quote }} - - name: "SCANNER_TRIVY_INSECURE" - value: {{ .Values.trivy.insecure | default false | quote }} - - name: SCANNER_API_SERVER_ADDR - value: ":{{ template "harbor.trivy.containerPort" . }}" - {{- if .Values.internalTLS.enabled }} - - name: INTERNAL_TLS_ENABLED - value: "true" - - name: SCANNER_API_SERVER_TLS_KEY - value: /etc/harbor/ssl/trivy/tls.key - - name: SCANNER_API_SERVER_TLS_CERTIFICATE - value: /etc/harbor/ssl/trivy/tls.crt - {{- end }} - - name: "SCANNER_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_STORE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL - - name: "SCANNER_JOB_QUEUE_REDIS_URL" - valueFrom: - secretKeyRef: - name: {{ template "harbor.trivy" . }} - key: redisURL -{{- with .Values.trivy.extraEnvVars }} -{{- toYaml . | nindent 12 }} -{{- end }} - ports: - - name: api-server - containerPort: {{ template "harbor.trivy.containerPort" . }} - volumeMounts: - - name: data - mountPath: /home/scanner/.cache - subPath: {{ .Values.persistence.persistentVolumeClaim.trivy.subPath }} - readOnly: false - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - mountPath: /etc/harbor/ssl/trivy - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolumeMount" . | indent 10 }} - {{- end }} - livenessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/healthy - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 10 - readinessProbe: - httpGet: - scheme: {{ include "harbor.component.scheme" . | upper }} - path: /probe/ready - port: api-server - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: -{{ toYaml .Values.trivy.resources | indent 12 }} - {{- if or (or .Values.internalTLS.enabled .Values.caBundleSecretName) (or (not .Values.persistence.enabled) $trivy.existingClaim) }} - volumes: - {{- if .Values.internalTLS.enabled }} - - name: trivy-internal-certs - secret: - secretName: {{ template "harbor.internalTLS.trivy.secretName" . }} - {{- end }} - {{- if .Values.caBundleSecretName }} -{{ include "harbor.caBundleVolume" . | indent 6 }} - {{- end }} - {{- if not .Values.persistence.enabled }} - - name: "data" - emptyDir: {} - {{- else if $trivy.existingClaim }} - - name: "data" - persistentVolumeClaim: - claimName: {{ $trivy.existingClaim }} - {{- end }} - {{- end }} - {{- with .Values.trivy.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.trivy.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.trivy.priorityClassName }} - priorityClassName: {{ .Values.trivy.priorityClassName }} - {{- end }} -{{- if and .Values.persistence.enabled (not $trivy.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: -{{ include "harbor.legacy.labels" . | indent 8 }} - annotations: - {{- range $key, $value := $trivy.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - spec: - accessModes: [{{ $trivy.accessMode | quote }}] - {{- if $trivy.storageClass }} - {{- if (eq "-" $trivy.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ $trivy.storageClass }}" - {{- end }} - {{- end }} - resources: - requests: - storage: {{ $trivy.size | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/templates/trivy/trivy-svc.yaml b/charts/harbor/harbor/1.15.1/templates/trivy/trivy-svc.yaml deleted file mode 100644 index 24daf094e8..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/trivy/trivy-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{ if .Values.trivy.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: "{{ template "harbor.trivy" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -spec: - ports: - - name: {{ ternary "https-trivy" "http-trivy" .Values.internalTLS.enabled }} - protocol: TCP - port: {{ template "harbor.trivy.servicePort" . }} - selector: -{{ include "harbor.matchLabels" . | indent 4 }} - component: trivy -{{ end }} diff --git a/charts/harbor/harbor/1.15.1/templates/trivy/trivy-tls.yaml b/charts/harbor/harbor/1.15.1/templates/trivy/trivy-tls.yaml deleted file mode 100644 index a9c8330c37..0000000000 --- a/charts/harbor/harbor/1.15.1/templates/trivy/trivy-tls.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if and .Values.trivy.enabled .Values.internalTLS.enabled }} -{{- if eq .Values.internalTLS.certSource "manual" }} -apiVersion: v1 -kind: Secret -metadata: - name: "{{ template "harbor.internalTLS.trivy.secretName" . }}" - labels: -{{ include "harbor.labels" . | indent 4 }} -type: kubernetes.io/tls -data: - ca.crt: {{ (required "The \"internalTLS.trustCa\" is required!" .Values.internalTLS.trustCa) | b64enc | quote }} - tls.crt: {{ (required "The \"internalTLS.trivy.crt\" is required!" .Values.internalTLS.trivy.crt) | b64enc | quote }} - tls.key: {{ (required "The \"internalTLS.trivy.key\" is required!" .Values.internalTLS.trivy.key) | b64enc | quote }} -{{- end }} -{{- end }} diff --git a/charts/harbor/harbor/1.15.1/values.yaml b/charts/harbor/harbor/1.15.1/values.yaml deleted file mode 100644 index ab8b62dc92..0000000000 --- a/charts/harbor/harbor/1.15.1/values.yaml +++ /dev/null @@ -1,1058 +0,0 @@ -expose: - # Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" - # and fill the information in the corresponding section - type: ingress - tls: - # Enable TLS or not. - # Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" - # Note: if the "expose.type" is "ingress" and TLS is disabled, - # the port must be included in the command when pulling/pushing images. - # Refer to https://github.com/goharbor/harbor/issues/5291 for details. - enabled: true - # The source of the tls certificate. Set as "auto", "secret" - # or "none" and fill the information in the corresponding section - # 1) auto: generate the tls certificate automatically - # 2) secret: read the tls certificate from the specified secret. - # The tls certificate can be generated manually or by cert manager - # 3) none: configure no tls certificate for the ingress. If the default - # tls certificate is configured in the ingress controller, choose this option - certSource: auto - auto: - # The common name used to generate the certificate, it's necessary - # when the type isn't "ingress" - commonName: "" - secret: - # The name of secret which contains keys named: - # "tls.crt" - the certificate - # "tls.key" - the private key - secretName: "" - ingress: - hosts: - core: core.harbor.domain - # set to the type of ingress controller if it has specific requirements. - # leave as `default` for most ingress controllers. - # set to `gce` if using the GCE ingress controller - # set to `ncp` if using the NCP (NSX-T Container Plugin) ingress controller - # set to `alb` if using the ALB ingress controller - # set to `f5-bigip` if using the F5 BIG-IP ingress controller - controller: default - ## Allow .Capabilities.KubeVersion.Version to be overridden while creating ingress - kubeVersionOverride: "" - className: "" - annotations: - # note different ingress controllers may require a different ssl-redirect annotation - # for Envoy, use ingress.kubernetes.io/force-ssl-redirect: "true" and remove the nginx lines below - ingress.kubernetes.io/ssl-redirect: "true" - ingress.kubernetes.io/proxy-body-size: "0" - nginx.ingress.kubernetes.io/ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-body-size: "0" - # ingress-specific labels - labels: {} - clusterIP: - # The name of ClusterIP service - name: harbor - # The ip address of the ClusterIP service (leave empty for acquiring dynamic ip) - staticClusterIP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - # Annotations on the ClusterIP service - annotations: {} - # ClusterIP-specific labels - labels: {} - nodePort: - # The name of NodePort service - name: harbor - ports: - http: - # The service port Harbor listens on when serving HTTP - port: 80 - # The node port Harbor listens on when serving HTTP - nodePort: 30002 - https: - # The service port Harbor listens on when serving HTTPS - port: 443 - # The node port Harbor listens on when serving HTTPS - nodePort: 30003 - # Annotations on the nodePort service - annotations: {} - # nodePort-specific labels - labels: {} - loadBalancer: - # The name of LoadBalancer service - name: harbor - # Set the IP if the LoadBalancer supports assigning IP - IP: "" - ports: - # The service port Harbor listens on when serving HTTP - httpPort: 80 - # The service port Harbor listens on when serving HTTPS - httpsPort: 443 - # Annotations on the loadBalancer service - annotations: {} - # loadBalancer-specific labels - labels: {} - sourceRanges: [] - -# The external URL for Harbor core service. It is used to -# 1) populate the docker/helm commands showed on portal -# 2) populate the token service URL returned to docker client -# -# Format: protocol://domain[:port]. Usually: -# 1) if "expose.type" is "ingress", the "domain" should be -# the value of "expose.ingress.hosts.core" -# 2) if "expose.type" is "clusterIP", the "domain" should be -# the value of "expose.clusterIP.name" -# 3) if "expose.type" is "nodePort", the "domain" should be -# the IP address of k8s node -# -# If Harbor is deployed behind the proxy, set it as the URL of proxy -externalURL: https://core.harbor.domain - -# The persistence is enabled by default and a default StorageClass -# is needed in the k8s cluster to provision volumes dynamically. -# Specify another StorageClass in the "storageClass" or set "existingClaim" -# if you already have existing persistent volumes to use -# -# For storing images and charts, you can also use "azure", "gcs", "s3", -# "swift" or "oss". Set it in the "imageChartStorage" section -persistence: - enabled: true - # Setting it to "keep" to avoid removing PVCs during a helm delete - # operation. Leaving it empty will delete PVCs after the chart deleted - # (this does not apply for PVCs that are created for internal database - # and redis components, i.e. they are never deleted automatically) - resourcePolicy: "keep" - persistentVolumeClaim: - registry: - # Use the existing PVC which must be created manually before bound, - # and specify the "subPath" if the PVC is shared with other components - existingClaim: "" - # Specify the "storageClass" used to provision the volume. Or the default - # StorageClass will be used (the default). - # Set it to "-" to disable dynamic provisioning - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - jobservice: - jobLog: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external database is used, the following settings for database will - # be ignored - database: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - # If external Redis is used, the following settings for Redis will - # be ignored - redis: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 1Gi - annotations: {} - trivy: - existingClaim: "" - storageClass: "" - subPath: "" - accessMode: ReadWriteOnce - size: 5Gi - annotations: {} - # Define which storage backend is used for registry to store - # images and charts. Refer to - # https://github.com/distribution/distribution/blob/main/docs/content/about/configuration.md#storage - # for the detail. - imageChartStorage: - # Specify whether to disable `redirect` for images and chart storage, for - # backends which not supported it (such as using minio for `s3` storage type), please disable - # it. To disable redirects, simply set `disableredirect` to `true` instead. - # Refer to - # https://github.com/distribution/distribution/blob/main/docs/configuration.md#redirect - # for the detail. - disableredirect: false - # Specify the "caBundleSecretName" if the storage service uses a self-signed certificate. - # The secret must contain keys named "ca.crt" which will be injected into the trust store - # of registry's containers. - # caBundleSecretName: - - # Specify the type of storage: "filesystem", "azure", "gcs", "s3", "swift", - # "oss" and fill the information needed in the corresponding section. The type - # must be "filesystem" if you want to use persistent volumes for registry - type: filesystem - filesystem: - rootdirectory: /storage - #maxthreads: 100 - azure: - accountname: accountname - accountkey: base64encodedaccountkey - container: containername - #realm: core.windows.net - # To use existing secret, the key must be AZURE_STORAGE_ACCESS_KEY - existingSecret: "" - gcs: - bucket: bucketname - # The base64 encoded json file which contains the key - encodedkey: base64-encoded-json-key-file - #rootdirectory: /gcs/object/name/prefix - #chunksize: "5242880" - # To use existing secret, the key must be GCS_KEY_DATA - existingSecret: "" - useWorkloadIdentity: false - s3: - # Set an existing secret for S3 accesskey and secretkey - # keys in the secret should be REGISTRY_STORAGE_S3_ACCESSKEY and REGISTRY_STORAGE_S3_SECRETKEY for registry - #existingSecret: "" - region: us-west-1 - bucket: bucketname - #accesskey: awsaccesskey - #secretkey: awssecretkey - #regionendpoint: http://myobjects.local - #encrypt: false - #keyid: mykeyid - #secure: true - #skipverify: false - #v4auth: true - #chunksize: "5242880" - #rootdirectory: /s3/object/name/prefix - #storageclass: STANDARD - #multipartcopychunksize: "33554432" - #multipartcopymaxconcurrency: 100 - #multipartcopythresholdsize: "33554432" - swift: - authurl: https://storage.myprovider.com/v3/auth - username: username - password: password - container: containername - # keys in existing secret must be REGISTRY_STORAGE_SWIFT_PASSWORD, REGISTRY_STORAGE_SWIFT_SECRETKEY, REGISTRY_STORAGE_SWIFT_ACCESSKEY - existingSecret: "" - #region: fr - #tenant: tenantname - #tenantid: tenantid - #domain: domainname - #domainid: domainid - #trustid: trustid - #insecureskipverify: false - #chunksize: 5M - #prefix: - #secretkey: secretkey - #accesskey: accesskey - #authversion: 3 - #endpointtype: public - #tempurlcontainerkey: false - #tempurlmethods: - oss: - accesskeyid: accesskeyid - accesskeysecret: accesskeysecret - region: regionname - bucket: bucketname - # key in existingSecret must be REGISTRY_STORAGE_OSS_ACCESSKEYSECRET - existingSecret: "" - #endpoint: endpoint - #internal: false - #encrypt: false - #secure: true - #chunksize: 10M - #rootdirectory: rootdirectory - -# The initial password of Harbor admin. Change it from portal after launching Harbor -# or give an existing secret for it -# key in secret is given via (default to HARBOR_ADMIN_PASSWORD) -# existingSecretAdminPassword: -existingSecretAdminPasswordKey: HARBOR_ADMIN_PASSWORD -harborAdminPassword: "Harbor12345" - -# The internal TLS used for harbor components secure communicating. In order to enable https -# in each component tls cert files need to provided in advance. -internalTLS: - # If internal TLS enabled - enabled: false - # enable strong ssl ciphers (default: false) - strong_ssl_ciphers: false - # There are three ways to provide tls - # 1) "auto" will generate cert automatically - # 2) "manual" need provide cert file manually in following value - # 3) "secret" internal certificates from secret - certSource: "auto" - # The content of trust ca, only available when `certSource` is "manual" - trustCa: "" - # core related cert configuration - core: - # secret name for core's tls certs - secretName: "" - # Content of core's TLS cert file, only available when `certSource` is "manual" - crt: "" - # Content of core's TLS key file, only available when `certSource` is "manual" - key: "" - # jobservice related cert configuration - jobservice: - # secret name for jobservice's tls certs - secretName: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of jobservice's TLS key file, only available when `certSource` is "manual" - key: "" - # registry related cert configuration - registry: - # secret name for registry's tls certs - secretName: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of registry's TLS key file, only available when `certSource` is "manual" - key: "" - # portal related cert configuration - portal: - # secret name for portal's tls certs - secretName: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of portal's TLS key file, only available when `certSource` is "manual" - key: "" - # trivy related cert configuration - trivy: - # secret name for trivy's tls certs - secretName: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - crt: "" - # Content of trivy's TLS key file, only available when `certSource` is "manual" - key: "" - -ipFamily: - # ipv6Enabled set to true if ipv6 is enabled in cluster, currently it affected the nginx related component - ipv6: - enabled: true - # ipv4Enabled set to true if ipv4 is enabled in cluster, currently it affected the nginx related component - ipv4: - enabled: true - -imagePullPolicy: IfNotPresent - -# Use this set to assign a list of default pullSecrets -imagePullSecrets: -# - name: docker-registry-secret -# - name: internal-registry-secret - -# The update strategy for deployments with persistent volumes(jobservice, registry): "RollingUpdate" or "Recreate" -# Set it as "Recreate" when "RWM" for volumes isn't supported -updateStrategy: - type: RollingUpdate - -# debug, info, warning, error or fatal -logLevel: info - -# The name of the secret which contains key named "ca.crt". Setting this enables the -# download link on portal to download the CA certificate when the certificate isn't -# generated automatically -caSecretName: "" - -# The secret key used for encryption. Must be a string of 16 chars. -secretKey: "not-a-secure-key" -# If using existingSecretSecretKey, the key must be secretKey -existingSecretSecretKey: "" - -# The proxy settings for updating trivy vulnerabilities from the Internet and replicating -# artifacts from/to the registries that cannot be reached directly -proxy: - httpProxy: - httpsProxy: - noProxy: 127.0.0.1,localhost,.local,.internal - components: - - core - - jobservice - - trivy - -# Run the migration job via helm hook -enableMigrateHelmHook: false - -# The custom ca bundle secret, the secret must contain key named "ca.crt" -# which will be injected into the trust store for core, jobservice, registry, trivy components -# caBundleSecretName: "" - -## UAA Authentication Options -# If you're using UAA for authentication behind a self-signed -# certificate you will need to provide the CA Cert. -# Set uaaSecretName below to provide a pre-created secret that -# contains a base64 encoded CA Certificate named `ca.crt`. -# uaaSecretName: - -metrics: - enabled: false - core: - path: /metrics - port: 8001 - registry: - path: /metrics - port: 8001 - jobservice: - path: /metrics - port: 8001 - exporter: - path: /metrics - port: 8001 - ## Create prometheus serviceMonitor to scrape harbor metrics. - ## This requires the monitoring.coreos.com/v1 CRD. Please see - ## https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md - ## - serviceMonitor: - enabled: false - additionalLabels: {} - # Scrape interval. If not set, the Prometheus default scrape interval is used. - interval: "" - # Metric relabel configs to apply to samples before ingestion. - metricRelabelings: - [] - # - action: keep - # regex: 'kube_(daemonset|deployment|pod|namespace|node|statefulset).+' - # sourceLabels: [__name__] - # Relabel configs to apply to samples before ingestion. - relabelings: - [] - # - sourceLabels: [__meta_kubernetes_pod_node_name] - # separator: ; - # regex: ^(.*)$ - # targetLabel: nodename - # replacement: $1 - # action: replace - -trace: - enabled: false - # trace provider: jaeger or otel - # jaeger should be 1.26+ - provider: jaeger - # set sample_rate to 1 if you wanna sampling 100% of trace data; set 0.5 if you wanna sampling 50% of trace data, and so forth - sample_rate: 1 - # namespace used to differentiate different harbor services - # namespace: - # attributes is a key value dict contains user defined attributes used to initialize trace provider - # attributes: - # application: harbor - jaeger: - # jaeger supports two modes: - # collector mode(uncomment endpoint and uncomment username, password if needed) - # agent mode(uncomment agent_host and agent_port) - endpoint: http://hostname:14268/api/traces - # username: - # password: - # agent_host: hostname - # export trace data by jaeger.thrift in compact mode - # agent_port: 6831 - otel: - endpoint: hostname:4318 - url_path: /v1/traces - compression: false - insecure: true - # timeout is in seconds - timeout: 10 - -# cache layer configurations -# if this feature enabled, harbor will cache the resource -# `project/project_metadata/repository/artifact/manifest` in the redis -# which help to improve the performance of high concurrent pulling manifest. -cache: - # default is not enabled. - enabled: false - # default keep cache for one day. - expireHours: 24 - -## set Container Security Context to comply with PSP restricted policy if necessary -## each of the conatiner will apply the same security context -## containerSecurityContext:{} is initially an empty yaml that you could edit it on demand, we just filled with a common template for convenience -containerSecurityContext: - privileged: false - allowPrivilegeEscalation: false - seccompProfile: - type: RuntimeDefault - runAsNonRoot: true - capabilities: - drop: - - ALL - -# If service exposed via "ingress", the Nginx will not be used -nginx: - image: - repository: goharbor/nginx-photon - tag: v2.11.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - -portal: - image: - repository: goharbor/harbor-portal - tag: v2.11.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - -core: - image: - repository: goharbor/harbor-core - tag: v2.11.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - ## Startup probe values - startupProbe: - enabled: true - initialDelaySeconds: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## Additional service annotations - serviceAnnotations: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - ## User settings configuration json string - configureUserSettings: - # The provider for updating project quota(usage), there are 2 options, redis or db. - # By default it is implemented by db but you can configure it to redis which - # can improve the performance of high concurrent pushing to the same project, - # and reduce the database connections spike and occupies. - # Using redis will bring up some delay for quota usage updation for display, so only - # suggest switch provider to redis if you were ran into the db connections spike around - # the scenario of high concurrent pushing to same project, no improvment for other scenes. - quotaUpdateProvider: db # Or redis - # Secret is used when core server communicates with other components. - # If a secret key is not specified, Helm will generate one. Alternatively set existingSecret to use an existing secret - # Must be a string of 16 chars. - secret: "" - # Fill in the name of a kubernetes secret if you want to use your own - # If using existingSecret, the key must be secret - existingSecret: "" - # Fill the name of a kubernetes secret if you want to use your own - # TLS certificate and private key for token encryption/decryption. - # The secret must contain keys named: - # "tls.key" - the private key - # "tls.crt" - the certificate - secretName: "" - # If not specifying a preexisting secret, a secret can be created from tokenKey and tokenCert and used instead. - # If none of secretName, tokenKey, and tokenCert are specified, an ephemeral key and certificate will be autogenerated. - # tokenKey and tokenCert must BOTH be set or BOTH unset. - # The tokenKey value is formatted as a multiline string containing a PEM-encoded RSA key, indented one more than tokenKey on the following line. - tokenKey: | - # If tokenKey is set, the value of tokenCert must be set as a PEM-encoded certificate signed by tokenKey, and supplied as a multiline string, indented one more than tokenCert on the following line. - tokenCert: | - # The XSRF key. Will be generated automatically if it isn't specified - xsrfKey: "" - # If using existingSecret, the key is defined by core.existingXsrfSecretKey - existingXsrfSecret: "" - # If using existingSecret, the key - existingXsrfSecretKey: CSRF_KEY - # The time duration for async update artifact pull_time and repository - # pull_count, the unit is second. Will be 10 seconds if it isn't set. - # eg. artifactPullAsyncFlushDuration: 10 - artifactPullAsyncFlushDuration: - gdpr: - deleteUser: false - auditLogsCompliant: false - -jobservice: - image: - repository: goharbor/harbor-jobservice - tag: v2.11.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - maxJobWorkers: 10 - # The logger for jobs: "file", "database" or "stdout" - jobLoggers: - - file - # - database - # - stdout - # The jobLogger sweeper duration (ignored if `jobLogger` is `stdout`) - loggerSweeperDuration: 14 #days - notification: - webhook_job_max_retry: 3 - webhook_job_http_client_timeout: 3 # in seconds - reaper: - # the max time to wait for a task to finish, if unfinished after max_update_hours, the task will be mark as error, but the task will continue to run, default value is 24 - max_update_hours: 24 - # the max time for execution in running state without new task created - max_dangling_hours: 168 - # Secret is used when job service communicates with other components. - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the job service secret - existingSecretKey: JOBSERVICE_SECRET - -registry: - registry: - image: - repository: goharbor/registry-photon - tag: v2.11.1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - controller: - image: - repository: goharbor/harbor-registryctl - tag: v2.11.1 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - # Secret is used to secure the upload state from client - # and registry storage backend. - # See: https://github.com/distribution/distribution/blob/main/docs/configuration.md#http - # If a secret key is not specified, Helm will generate one. - # Must be a string of 16 chars. - secret: "" - # Use an existing secret resource - existingSecret: "" - # Key within the existing secret for the registry service secret - existingSecretKey: REGISTRY_HTTP_SECRET - # If true, the registry returns relative URLs in Location headers. The client is responsible for resolving the correct URL. - relativeurls: false - credentials: - username: "harbor_registry_user" - password: "harbor_registry_password" - # If using existingSecret, the key must be REGISTRY_PASSWD and REGISTRY_HTPASSWD - existingSecret: "" - # Login and password in htpasswd string format. Excludes `registry.credentials.username` and `registry.credentials.password`. May come in handy when integrating with tools like argocd or flux. This allows the same line to be generated each time the template is rendered, instead of the `htpasswd` function from helm, which generates different lines each time because of the salt. - # htpasswdString: $apr1$XLefHzeG$Xl4.s00sMSCCcMyJljSZb0 # example string - htpasswdString: "" - middleware: - enabled: false - type: cloudFront - cloudFront: - baseurl: example.cloudfront.net - keypairid: KEYPAIRID - duration: 3000s - ipfilteredby: none - # The secret key that should be present is CLOUDFRONT_KEY_DATA, which should be the encoded private key - # that allows access to CloudFront - privateKeySecret: "my-secret" - # enable purge _upload directories - upload_purging: - enabled: true - # remove files in _upload directories which exist for a period of time, default is one week. - age: 168h - # the interval of the purge operations - interval: 24h - dryrun: false - -trivy: - # enabled the flag to enable Trivy scanner - enabled: true - image: - # repository the repository for Trivy adapter image - repository: goharbor/trivy-adapter-photon - # tag the tag for Trivy adapter image - tag: v2.11.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # replicas the number of Pod replicas - replicas: 1 - resources: - requests: - cpu: 200m - memory: 512Mi - limits: - cpu: 1 - memory: 1Gi - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - # debugMode the flag to enable Trivy debug mode with more verbose scanning log - debugMode: false - # vulnType a comma-separated list of vulnerability types. Possible values are `os` and `library`. - vulnType: "os,library" - # severity a comma-separated list of severities to be checked - severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" - # ignoreUnfixed the flag to display only fixed vulnerabilities - ignoreUnfixed: false - # insecure the flag to skip verifying registry certificate - insecure: false - # gitHubToken the GitHub access token to download Trivy DB - # - # Trivy DB contains vulnerability information from NVD, Red Hat, and many other upstream vulnerability databases. - # It is downloaded by Trivy from the GitHub release page https://github.com/aquasecurity/trivy-db/releases and cached - # in the local file system (`/home/scanner/.cache/trivy/db/trivy.db`). In addition, the database contains the update - # timestamp so Trivy can detect whether it should download a newer version from the Internet or use the cached one. - # Currently, the database is updated every 12 hours and published as a new release to GitHub. - # - # Anonymous downloads from GitHub are subject to the limit of 60 requests per hour. Normally such rate limit is enough - # for production operations. If, for any reason, it's not enough, you could increase the rate limit to 5000 - # requests per hour by specifying the GitHub access token. For more details on GitHub rate limiting please consult - # https://developer.github.com/v3/#rate-limiting - # - # You can create a GitHub token by following the instructions in - # https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - gitHubToken: "" - # skipUpdate the flag to disable Trivy DB downloads from GitHub - # - # You might want to set the value of this flag to `true` in test or CI/CD environments to avoid GitHub rate limiting issues. - # If the value is set to `true` you have to manually download the `trivy.db` file and mount it in the - # `/home/scanner/.cache/trivy/db/trivy.db` path. - skipUpdate: false - # skipJavaDBUpdate If the flag is enabled you have to manually download the `trivy-java.db` file and mount it in the - # `/home/scanner/.cache/trivy/java-db/trivy-java.db` path - # - skipJavaDBUpdate: false - # The offlineScan option prevents Trivy from sending API requests to identify dependencies. - # - # Scanning JAR files and pom.xml may require Internet access for better detection, but this option tries to avoid it. - # For example, the offline mode will not try to resolve transitive dependencies in pom.xml when the dependency doesn't - # exist in the local repositories. It means a number of detected vulnerabilities might be fewer in offline mode. - # It would work if all the dependencies are in local. - # This option doesn’t affect DB download. You need to specify skipUpdate as well as offlineScan in an air-gapped environment. - offlineScan: false - # Comma-separated list of what security issues to detect. Possible values are `vuln`, `config` and `secret`. Defaults to `vuln`. - securityCheck: "vuln" - # The duration to wait for scan completion - timeout: 5m0s - -database: - # if external database is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - image: - repository: goharbor/harbor-db - tag: v2.11.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - # The timeout used in livenessProbe; 1 to 5 seconds - livenessProbe: - timeoutSeconds: 1 - # The timeout used in readinessProbe; 1 to 5 seconds - readinessProbe: - timeoutSeconds: 1 - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - extrInitContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - # The initial superuser password for internal database - password: "changeit" - # The size limit for Shared memory, pgSQL use it for shared_buffer - # More details see: - # https://github.com/goharbor/harbor/issues/15034 - shmSizeLimit: 512Mi - initContainer: - migrator: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - permissions: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - external: - host: "192.168.0.1" - port: "5432" - username: "user" - password: "password" - coreDatabase: "registry" - # if using existing secret, the key must be "password" - existingSecret: "" - # "disable" - No SSL - # "require" - Always SSL (skip verification) - # "verify-ca" - Always SSL (verify that the certificate presented by the - # server was signed by a trusted CA) - # "verify-full" - Always SSL (verify that the certification presented by the - # server was signed by a trusted CA and the server host name matches the one - # in the certificate) - sslmode: "disable" - # The maximum number of connections in the idle connection pool per pod (core+exporter). - # If it <=0, no idle connections are retained. - maxIdleConns: 100 - # The maximum number of open connections to the database per pod (core+exporter). - # If it <= 0, then there is no limit on the number of open connections. - # Note: the default number of connections is 1024 for harbor's postgres. - maxOpenConns: 900 - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -redis: - # if external Redis is used, set "type" to "external" - # and fill the connection information in "external" section - type: internal - internal: - image: - repository: goharbor/redis-photon - tag: v2.11.1 - # set the service account to be used, default if left empty - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - nodeSelector: {} - tolerations: [] - affinity: {} - ## The priority class to run the pod as - priorityClassName: - # containers to be run before the controller's container starts. - initContainers: [] - # Example: - # - # - name: wait - # image: busybox - # command: [ 'sh', '-c', "sleep 20" ] - # # jobserviceDatabaseIndex defaults to "1" - # # registryDatabaseIndex defaults to "2" - # # trivyAdapterIndex defaults to "5" - # # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - external: - # support redis, redis+sentinel - # addr for redis: : - # addr for redis+sentinel: :,:,: - addr: "192.168.0.2:6379" - # The name of the set of Redis instances to monitor, it must be set to support redis+sentinel - sentinelMasterSet: "" - # The "coreDatabaseIndex" must be "0" as the library Harbor - # used doesn't support configuring it - # harborDatabaseIndex defaults to "0", but it can be configured to "6", this config is optional - # cacheLayerDatabaseIndex defaults to "0", but it can be configured to "7", this config is optional - coreDatabaseIndex: "0" - jobserviceDatabaseIndex: "1" - registryDatabaseIndex: "2" - trivyAdapterIndex: "5" - # harborDatabaseIndex: "6" - # cacheLayerDatabaseIndex: "7" - # username field can be an empty string, and it will be authenticated against the default user - username: "" - password: "" - # If using existingSecret, the key must be REDIS_PASSWORD - existingSecret: "" - ## Additional deployment annotations - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - -exporter: - image: - repository: goharbor/harbor-exporter - tag: v2.11.1 - serviceAccountName: "" - # mount the service account token - automountServiceAccountToken: false - replicas: 1 - revisionHistoryLimit: 10 - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - extraEnvVars: [] - podAnnotations: {} - ## Additional deployment labels - podLabels: {} - nodeSelector: {} - tolerations: [] - affinity: {} - # Spread Pods across failure-domains like regions, availability zones or nodes - topologySpreadConstraints: [] - ## The priority class to run the pod as - priorityClassName: - # - maxSkew: 1 - # topologyKey: topology.kubernetes.io/zone - # nodeTaintsPolicy: Honor - # whenUnsatisfiable: DoNotSchedule - cacheDuration: 23 - cacheCleanInterval: 14400 diff --git a/index.yaml b/index.yaml index f067febf8c..6d93ff6951 100644 --- a/index.yaml +++ b/index.yaml @@ -14296,291 +14296,6 @@ entries: urls: - assets/haproxy/haproxy-1.30.6.tgz version: 1.30.6 - harbor: - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor - apiVersion: v1 - appVersion: 2.11.1 - created: "2024-08-28T00:50:02.242057739Z" - description: An open source trusted cloud native registry that stores, signs, - and scans content - digest: 83dac260d5c8a6fbfee9b767fb6802a266e726abb4d21374e75f24728703c362 - home: https://goharbor.io - icon: file://assets/icons/harbor.png - keywords: - - docker - - registry - - harbor - kubeVersion: '>=1.20-0' - maintainers: - - email: yan-yw.wang@broadcom.com - name: Yan Wang - - email: wenkai.yin@broadcom.com - name: Wenkai Yin - - email: miner.yang@broadcom.com - name: Miner Yang - - email: shengwen.yu@broadcom.com - name: Shengwen Yu - name: harbor - sources: - - https://github.com/goharbor/harbor - - https://github.com/goharbor/harbor-helm - urls: - - assets/harbor/harbor-1.15.1.tgz - version: 1.15.1 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor - apiVersion: v1 - appVersion: 2.11.0 - created: "2024-07-02T21:23:47.67606149Z" - description: An open source trusted cloud native registry that stores, signs, - and scans content - digest: 7ca26fd1032b714c5c8d7536118773a7ff54c6a697c26558f59fbf601745485c - home: https://goharbor.io - icon: file://assets/icons/harbor.png - keywords: - - docker - - registry - - harbor - maintainers: - - email: yan-yw.wang@broadcom.com - name: Yan Wang - - email: wenkai.yin@broadcom.com - name: Wenkai Yin - - email: miner.yang@broadcom.com - name: Miner Yang - - email: shengwen.yu@broadcom.com - name: Shengwen Yu - name: harbor - sources: - - https://github.com/goharbor/harbor - - https://github.com/goharbor/harbor-helm - urls: - - assets/harbor/harbor-1.15.0.tgz - version: 1.15.0 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor - apiVersion: v1 - appVersion: 2.10.2 - created: "2024-04-16T10:50:02.108616258-06:00" - description: An open source trusted cloud native registry that stores, signs, - and scans content - digest: a9329e3293698e66f3d2c11fb43c912ff49d9f676ca0fcdac7bbd195983e36cd - home: https://goharbor.io - icon: file://assets/icons/harbor.png - keywords: - - docker - - registry - - harbor - maintainers: - - email: yinw@vmware.com - name: Wenkai Yin - - email: hweiwei@vmware.com - name: Weiwei He - - email: yshengwen@vmware.com - name: Shengwen Yu - name: harbor - sources: - - https://github.com/goharbor/harbor - - https://github.com/goharbor/harbor-helm - urls: - - assets/harbor/harbor-1.14.2.tgz - version: 1.14.2 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor - apiVersion: v1 - appVersion: 2.10.1 - created: "2024-03-25T14:58:48.30730098-06:00" - description: An open source trusted cloud native registry that stores, signs, - and scans content - digest: 41f03baea13a8dea1580e139ee1c4d84d287ebcf8a428eaee6db03d6c5dc8465 - home: https://goharbor.io - icon: file://assets/icons/harbor.png - keywords: - - docker - - registry - - harbor - maintainers: - - email: yinw@vmware.com - name: Wenkai Yin - - email: hweiwei@vmware.com - name: Weiwei He - - email: yshengwen@vmware.com - name: Shengwen Yu - name: harbor - sources: - - https://github.com/goharbor/harbor - - https://github.com/goharbor/harbor-helm - urls: - - assets/harbor/harbor-1.14.1.tgz - version: 1.14.1 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor - apiVersion: v1 - appVersion: 2.10.0 - created: "2024-01-12T17:06:36.516898981Z" - description: An open source trusted cloud native registry that stores, signs, - and scans content - digest: a8c133cb426df2b34fa7fcbd0d2421d7585dfa209a32c044cd3bf0151f3f65c6 - home: https://goharbor.io - icon: file://assets/icons/harbor.png - keywords: - - docker - - registry - - harbor - maintainers: - - email: yinw@vmware.com - name: Wenkai Yin - - email: hweiwei@vmware.com - name: Weiwei He - - email: yshengwen@vmware.com - name: Shengwen Yu - name: harbor - sources: - - https://github.com/goharbor/harbor - - https://github.com/goharbor/harbor-helm - urls: - - assets/harbor/harbor-1.14.0.tgz - version: 1.14.0 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor - apiVersion: v1 - appVersion: 2.9.1 - created: "2023-11-06T14:43:21.949940903Z" - description: An open source trusted cloud native registry that stores, signs, - and scans content - digest: c551836ec1d6c09facb76facd084b98b9980e194ecf67e9c361c0ae5c50cf63b - home: https://goharbor.io - icon: file://assets/icons/harbor.png - keywords: - - docker - - registry - - harbor - maintainers: - - email: yinw@vmware.com - name: Wenkai Yin - - email: hweiwei@vmware.com - name: Weiwei He - - email: yshengwen@vmware.com - name: Shengwen Yu - name: harbor - sources: - - https://github.com/goharbor/harbor - - https://github.com/goharbor/harbor-helm - urls: - - assets/harbor/harbor-1.13.1.tgz - version: 1.13.1 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor - apiVersion: v1 - appVersion: 2.9.0 - created: "2023-08-30T19:39:38.008119843Z" - description: An open source trusted cloud native registry that stores, signs, - and scans content - digest: 67e02a766502d6227e91fcf93b046df7ab63e9ba3e52da3f4c0791e621d91721 - home: https://goharbor.io - icon: file://assets/icons/harbor.png - keywords: - - docker - - registry - - harbor - maintainers: - - email: yinw@vmware.com - name: Wenkai Yin - - email: hweiwei@vmware.com - name: Weiwei He - - email: yshengwen@vmware.com - name: Shengwen Yu - name: harbor - sources: - - https://github.com/goharbor/harbor - - https://github.com/goharbor/harbor-helm - urls: - - assets/harbor/harbor-1.13.0.tgz - version: 1.13.0 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor - apiVersion: v1 - appVersion: 2.8.4 - created: "2023-08-16T17:41:11.974069402Z" - description: An open source trusted cloud native registry that stores, signs, - and scans content - digest: 335438a14e54751c09bd7cb74e8b53836084460c4a073b7d1e1d53441cab0eed - home: https://goharbor.io - icon: file://assets/icons/harbor.png - keywords: - - docker - - registry - - harbor - maintainers: - - email: yinw@vmware.com - name: Wenkai Yin - - email: hweiwei@vmware.com - name: Weiwei He - - email: yshengwen@vmware.com - name: Shengwen Yu - name: harbor - sources: - - https://github.com/goharbor/harbor - - https://github.com/goharbor/harbor-helm - urls: - - assets/harbor/harbor-1.12.4.tgz - version: 1.12.4 - - annotations: - catalog.cattle.io/certified: partner - catalog.cattle.io/display-name: Harbor - catalog.cattle.io/kube-version: '>=1.20-0' - catalog.cattle.io/release-name: harbor - apiVersion: v1 - appVersion: 2.8.3 - created: "2023-07-31T11:43:57.005175212Z" - description: An open source trusted cloud native registry that stores, signs, - and scans content - digest: a4d5e23e91bae991107635ac5faf6226f56f96bee6eee7ace33286ff096ca134 - home: https://goharbor.io - icon: file://assets/icons/harbor.png - keywords: - - docker - - registry - - harbor - maintainers: - - email: yinw@vmware.com - name: Wenkai Yin - - email: hweiwei@vmware.com - name: Weiwei He - - email: yshengwen@vmware.com - name: Shengwen Yu - name: harbor - sources: - - https://github.com/goharbor/harbor - - https://github.com/goharbor/harbor-helm - urls: - - assets/harbor/harbor-1.12.3.tgz - version: 1.12.3 hpe-array-exporter: - annotations: artifacthub.io/category: storage diff --git a/packages/harbor/harbor/upstream.yaml b/packages/harbor/harbor/upstream.yaml deleted file mode 100644 index 003e057136..0000000000 --- a/packages/harbor/harbor/upstream.yaml +++ /dev/null @@ -1,6 +0,0 @@ -HelmRepo: https://helm.goharbor.io -HelmChart: harbor -Vendor: Harbor -DisplayName: Harbor -ChartMetadata: - kubeVersion: '>=1.20-0'