|
| 1 | +# Helm Chart for svn |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +This [iF.SVNAdmin](http://svnadmin.insanefactory.com/) chart installs [timebye/svn-ifsvnadmin](https://github.com/TimeBye/svn-ifsvnadmin) in a Kubernetes cluster. |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +- Kubernetes cluster 1.10+ |
| 10 | +- Helm 2.8.0+ |
| 11 | + |
| 12 | +## Installation |
| 13 | + |
| 14 | +### Download the chart |
| 15 | + |
| 16 | +Download Gitlab helm chart code. |
| 17 | + |
| 18 | +```bash |
| 19 | +git clone https://github.com/cloudnativeapp/charts.git |
| 20 | +``` |
| 21 | + |
| 22 | +Checkout the tag. |
| 23 | + |
| 24 | +```bash |
| 25 | +git checkout tag_name |
| 26 | +cd submitted/docker-gitlab |
| 27 | +``` |
| 28 | + |
| 29 | +### Configure the chart |
| 30 | + |
| 31 | +The following items can be configured in `values.yaml` or set via `--set` flag during installation. |
| 32 | + |
| 33 | +#### Configure the way how to expose svn service: |
| 34 | + |
| 35 | +- **Ingress**: The ingress controller must be installed in the Kubernetes cluster. |
| 36 | +- **ClusterIP**: Exposes the service on a cluster-internal IP. Choosing this value makes the service only reachable from within the cluster. |
| 37 | +- **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`. |
| 38 | +- **LoadBalancer**: Exposes the service externally using a cloud provider’s load balancer. |
| 39 | + |
| 40 | +#### Configure the way how to persistent data: |
| 41 | + |
| 42 | +- **Disable**: The data does not survive the termination of a pod. |
| 43 | +- **Persistent Volume Claim(default)**: A default `StorageClass` is needed in the Kubernetes cluster to dynamic provision the volumes. Specify another StorageClass in the `storageClass` or set `existingClaim` if you have already existing persistent volumes to use. |
| 44 | + |
| 45 | +#### Configure the other items listed in [configuration](#configuration) section. |
| 46 | + |
| 47 | +### Install the chart |
| 48 | + |
| 49 | +Install the svn helm chart with a release name `my-svn`: |
| 50 | + |
| 51 | +```bash |
| 52 | +# helm v2 |
| 53 | +helm install . \ |
| 54 | + --name my-svn \ |
| 55 | + --set expose.ingress.host=svn.cluster.local |
| 56 | + |
| 57 | +# helm v3 |
| 58 | +helm install my-svn . \ |
| 59 | + --set expose.ingress.host=svn.cluster.local |
| 60 | +``` |
| 61 | + |
| 62 | +## Uninstallation |
| 63 | + |
| 64 | +To uninstall/delete the `my-svn` deployment: |
| 65 | + |
| 66 | +```bash |
| 67 | +# helm v2 |
| 68 | +helm delete --purge my-svn |
| 69 | + |
| 70 | +# helm v3 |
| 71 | +helm uninstall my-svn |
| 72 | +``` |
| 73 | + |
| 74 | +## Configuration |
| 75 | + |
| 76 | +The following table lists the configurable parameters of the svn chart and the default values. |
| 77 | + |
| 78 | +| Parameter | Description | Default | |
| 79 | +| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | |
| 80 | +| **SVN** | | | |
| 81 | +| `replicaCount` | Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. | `1` | |
| 82 | +| `strategy` | The deployment strategy to use to replace existing pods with new ones. | `RollingUpdate`-`maxUnavailable: 0` | |
| 83 | +| `image.repository` | Repository for svn image | `quay.azk8s.cn/setzero/svn-ifsvnadmin` | |
| 84 | +| `image.tag` | Tag for svn image | `passwd` | |
| 85 | +| `image.pullPolicy` | The image pull policy | `IfNotPresent` | |
| 86 | +| `annotations` | Annotations to add to the svn deployment | `{}` | |
| 87 | +| `podAnnotations` | Annotations to add to the svn pod | `{}` | |
| 88 | +| `resources` | The [resources] to allocate for container | undefined | |
| 89 | +| `nodeSelector` | Node labels for pod assignment | `{}` | |
| 90 | +| `tolerations` | Tolerations for pod assignment | `[]` | |
| 91 | +| `affinity` | Node/Pod affinities | `{}` | |
| 92 | +| `env` | The [available options] that can be used to customize your svn installation. | `{}` | |
| 93 | +| **Expose** | | | |
| 94 | +| `expose.type` | The way how to expose the service: `ingress`、`clusterIP`、`loadBalancer` or `nodePort` | `ingress` | |
| 95 | +| `expose.tls.enabled` | Enable the tls or not | `false` | |
| 96 | +| `expose.tls.secretName` | Fill the name of secret if you want to use your own TLS certificate. The secret must contain keys named:`tls.crt` - the certificate, `tls.key` - the private key, `ca.crt` - the certificate of CA.These files will be generated automatically if the `secretName` is not set | | |
| 97 | +| `expose.tls.certExpiry` | Automatically generated self-signed certificate validity period(day) | `3650` | |
| 98 | +| `expose.ingress.host` | The host of svn service in ingress rule | `svn.cluster.local` | |
| 99 | +| `expose.ingress.annotations` | The annotations used in ingress | | |
| 100 | +| `expose.clusterIP.name` | The name of ClusterIP service | `Release.Name` | |
| 101 | +| `expose.clusterIP.port` | The service port svn listens on when serving with HTTP | `80` | |
| 102 | +| `expose.nodePort.name` | The name of NodePort service | `Release.Name` | |
| 103 | +| `expose.nodePort.port` | The service port svn listens on when serving with HTTP | `80` | |
| 104 | +| `expose.nodePort.nodePort` | The node port svn listens on when serving with HTTP | | |
| 105 | +| `expose.loadBalancer.name` | The name of LoadBalancer service | `Release.Name` | |
| 106 | +| `expose.loadBalancer.port` | The service port svnÎ listens on when serving with HTTP | `80` | |
| 107 | +| **Persistence** | | | |
| 108 | +| `persistence.enabled` | Enable the data persistence or not | `false` | |
| 109 | +| `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 | `keep` | |
| 110 | +| `persistence.existingClaim` | Use the existing PVC which must be created manually before bound, and specify the `subPath` if the PVC is shared with other components | | |
| 111 | +| `persistence.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 | | |
| 112 | +| `persistence.accessMode` | The access mode of the volume | `ReadWriteMany` | |
| 113 | +| `persistence.size` | The size of the volume | `5Gi` | |
| 114 | + |
| 115 | +[resources]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ |
| 116 | +[available options]: https://github.com/TimeBye/svn-ifsvnadmin |
0 commit comments