├── chart └── nodeserver │ ├── Chart.yaml │ ├── templates │ ├── service.yaml │ ├── istio.yaml │ ├── NOTES.txt │ ├── hpa.yaml │ ├── basedeployment.yaml │ └── deployment.yaml │ └── values.yaml ├── README.md └── LICENSE /chart/nodeserver/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | description: A Helm chart for Kubernetes 3 | name: nodeserver 4 | version: 1.0.0 -------------------------------------------------------------------------------- /chart/nodeserver/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | annotations: 5 | prometheus.io/scrape: 'true' 6 | name: "{{ .Chart.Name }}-service" 7 | labels: 8 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" 9 | spec: 10 | type: {{ .Values.service.type }} 11 | ports: 12 | - name: http 13 | port: {{ .Values.service.servicePort }} 14 | selector: 15 | app: "{{ .Chart.Name }}-selector" 16 | -------------------------------------------------------------------------------- /chart/nodeserver/templates/istio.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.istio.enabled }} 2 | apiVersion: config.istio.io/v1alpha2 3 | kind: RouteRule 4 | metadata: 5 | name: "{{ .Chart.Name }}-default" 6 | spec: 7 | destination: 8 | name: "{{ .Chart.Name }}-service" 9 | precedence: 1 10 | route: 11 | - labels: 12 | version: "current" 13 | weight: {{ .Values.istio.weight }} 14 | {{ if .Values.base.enabled }} 15 | - labels: 16 | version: "base" 17 | weight: {{ .Values.base.weight }} 18 | {{ end }} 19 | {{ end }} -------------------------------------------------------------------------------- /chart/nodeserver/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Congratulations, you have deployed your Node.js Application to Kubernetes using Helm! 2 | 3 | To verify your application is running, run the following two commands to set the SAMPLE_NODE_PORT and SAMPPLE_NODE_IP environment variables to the location of your application: 4 | 5 | export SAMPLE_NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services nodeserver-service) 6 | export SAMPLE_NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}") 7 | 8 | And then open your web browser to http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT}" from the command line, eg: 9 | 10 | open http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT} 11 | -------------------------------------------------------------------------------- /chart/nodeserver/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.hpa.enabled }} 2 | {{ if and (eq .Capabilities.KubeVersion.Major "1") (ge .Capabilities.KubeVersion.Minor "8") }} 3 | apiVersion: autoscaling/v2beta1 4 | {{ else }} 5 | apiVersion: autoscaling/v2alpha1 6 | {{ end }} 7 | kind: HorizontalPodAutoscaler 8 | metadata: 9 | name: "{{ .Chart.Name }}-hpa-policy" 10 | namespace: 11 | spec: 12 | scaleTargetRef: 13 | apiVersion: apps/v1beta1 14 | kind: Deployment 15 | name: "{{ .Chart.Name }}-deployment" 16 | minReplicas: {{ .Values.hpa.minReplicas }} 17 | maxReplicas: {{ .Values.hpa.maxReplicas }} 18 | metrics: 19 | - type: Resource 20 | resource: 21 | name: cpu 22 | targetAverageUtilization: {{ .Values.hpa.metrics.cpu.targetAverageUtilization }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.hpa.metrics.memory.targetAverageUtilization }} 27 | {{ end }} -------------------------------------------------------------------------------- /chart/nodeserver/values.yaml: -------------------------------------------------------------------------------- 1 | # This is a YAML-formatted file. 2 | # Declare variables to be passed into your templates. 3 | replicaCount: 1 4 | revisionHistoryLimit: 1 5 | image: 6 | repository: nodeserver 7 | tag: 1.0.0 8 | pullPolicy: IfNotPresent 9 | resources: 10 | requests: 11 | cpu: 200m 12 | memory: 300Mi 13 | readinessProbe: {} 14 | # Example (replace readinessProbe: {} with the following): 15 | # readinessProbe: 16 | # httpGet: 17 | # path: /ready 18 | # port: 3000 19 | # initialDelaySeconds: 3 20 | # periodSeconds: 5 21 | livenessProbe: {} 22 | # Example (replace livenessProbe: {} with the following):: 23 | # livenessProbe: 24 | # httpGet: 25 | # path: /live 26 | # port: 3000 27 | # initialDelaySeconds: 40 28 | # periodSeconds: 10 29 | service: 30 | name: Node 31 | type: NodePort 32 | servicePort: 3000 33 | hpa: 34 | enabled: false 35 | minReplicas: 1 36 | maxReplicas: 2 37 | metrics: 38 | cpu: 39 | targetAverageUtilization: 70 40 | memory: 41 | targetAverageUtilization: 70 42 | services: 43 | base: 44 | enabled: false 45 | replicaCount: 1 46 | image: 47 | tag : v0.9.9 48 | weight: 100 49 | istio: 50 | enabled: false 51 | weight: 100 52 | -------------------------------------------------------------------------------- /chart/nodeserver/templates/basedeployment.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.base.enabled }} 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: "{{ .Chart.Name }}-basedeployment" 6 | labels: 7 | chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}' 8 | spec: 9 | replicas: {{ .Values.base.replicaCount }} 10 | strategy: 11 | type: RollingUpdate 12 | rollingUpdate: 13 | maxUnavailable: 0 14 | maxSurge: 1 15 | selector: 16 | matchLabels: 17 | app: "{{ .Chart.Name }}-selector" 18 | version: "base" 19 | revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} 20 | template: 21 | metadata: 22 | labels: 23 | app: "{{ .Chart.Name }}-selector" 24 | version: "base" 25 | spec: 26 | containers: 27 | - name: "{{ .Chart.Name }}" 28 | image: "{{ .Values.image.repository }}:{{ .Values.base.image.tag }}" 29 | imagePullPolicy: {{ .Values.image.pullPolicy }} 30 | livenessProbe: 31 | httpGet: 32 | path: /health 33 | port: {{ .Values.service.servicePort }} 34 | initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds}} 35 | periodSeconds: {{ .Values.livenessProbe.periodSeconds}} 36 | resources: 37 | requests: 38 | cpu: "{{ .Values.image.resources.requests.cpu }}" 39 | memory: "{{ .Values.image.resources.requests.memory }}" 40 | env: 41 | - name: PORT 42 | value : "{{ .Values.service.servicePort }}" 43 | {{ end }} 44 | -------------------------------------------------------------------------------- /chart/nodeserver/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: "{{ .Chart.Name }}-deployment" 5 | labels: 6 | chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}' 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | strategy: 10 | type: RollingUpdate 11 | rollingUpdate: 12 | maxUnavailable: 0 13 | maxSurge: 1 14 | selector: 15 | matchLabels: 16 | app: "{{ .Chart.Name }}-selector" 17 | version: "current" 18 | revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} 19 | template: 20 | metadata: 21 | labels: 22 | app: "{{ .Chart.Name }}-selector" 23 | version: "current" 24 | spec: 25 | containers: 26 | - name: "{{ .Chart.Name }}" 27 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 28 | imagePullPolicy: {{ .Values.image.pullPolicy }} 29 | ports: 30 | - containerPort: {{ .Values.service.servicePort}} 31 | resources: 32 | requests: 33 | cpu: "{{ .Values.image.resources.requests.cpu }}" 34 | memory: "{{ .Values.image.resources.requests.memory }}" 35 | env: 36 | - name: PORT 37 | value : "{{ .Values.service.servicePort }}" 38 | {{- if .Values.image.livenessProbe }} 39 | livenessProbe: 40 | {{ toYaml .Values.image.livenessProbe | indent 10 }} 41 | {{- end }} 42 | {{- if .Values.image.readinessProbe }} 43 | readinessProbe: 44 | {{ toYaml .Values.image.readinessProbe | indent 10 }} 45 | {{- end }} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Helm Chart Templates for Node.js in Kubernetes 2 | 3 | 4 | 5 | This project provides template Helm Charts for deploying a Node.js web application into any Kubernetes based cloud. 6 | 7 | The templates require your application to built into a Docker image. The [Docker Templates](http://github.com/CloudNativeJS/docker) project provides assistance in creating an image for your application. 8 | 9 | This project provides the following files: 10 | 11 | | File | Description | 12 | |---------------------------------------------------|-----------------------------------------------------------------------| 13 | | `/chart/nodeserver/Chart.yaml` | The definition file for your application | 14 | | `/chart/nodeserver/values.yaml` | Configurable values that are inserted into the following template files | 15 | | `/chart/nodeserver/templates/basedeployment.yaml` | Template to configure your application deployment. | 16 | | `/chart/nodeserver/templates/deployment.yaml` | Template to configure your application deployment. | 17 | | `/chart/nodeserver/templates/service.yaml` | Template to configure your application deployment. | 18 | | `/chart/nodeserver/templates/hpa.yaml` | Template to configure your application deployment. | 19 | | `/chart/nodeserver/templates/istio.yaml` | Template to configure your application deployment. | 20 | | `/chart/nodeserver/templates/NOTES.txt` | Helper to enable locating your application IP and PORT | 21 | 22 | In order to use these template files, copy the files from this project into your application directory. You should only need to edit the `Chart.yaml` and `values.yaml` files. 23 | 24 | ## Prerequisites 25 | 26 | Using the template Helm charts assumes the following pre-requisites are complete: 27 | 28 | 1. You have a Kubernetes cluster 29 | This could be one hosted by a cloud provider or running locally, for example using [Minikube](https://kubernetes.io/docs/setup/minikube/) 30 | 31 | 2. You have kubectl installed and configured for your cluster 32 | The [Kuberenetes command line](https://kubernetes.io/docs/tasks/tools/install-kubectl/) tool, `kubectl`, is used to view and control your Kubernetes cluster. 33 | 34 | 3. You have the Helm command line and Tiller backend installed 35 | [Helm and Tiller](https://docs.helm.sh/using_helm/) provide the command line tool and backend service for deploying your application using the Helm chart. 36 | These charts are compatible with Helm v2 and v3 37 | 38 | 4. You have created and published a Docker image for your application 39 | The Docker Template project provides guidance on [building a run image](https://github.com/CloudNativeJS/docker#using-dockerfile-tools) for your application and [publishing it to the DockerHub registry](https://github.com/CloudNativeJS/docker#publishing-the-image). 40 | 41 | 5. Your application has a "health" endpoint 42 | This allows Kubernetes to restart your application if it fails or becomes unresponsive. The [Health Connect](https://github.com/CloudNativeJS/cloud-health-connect) middleware can be used to add a health endpoint. 43 | 44 | ## Adding the Chart to your Application 45 | 46 | In order to add Helm Charts to your application, copy the `charts` directory from this project into your application's root directory. 47 | 48 | You then need to make a single change before the charts are usable: to set the `image.repository` for your application. 49 | 50 | ### Setting the `image.repository` parameter 51 | 52 | In order to change the `image.repository` parameter, open the `charts/nodeserver/values.yaml` file and change the following entry: 53 | 54 | ```sh 55 | image: 56 | repository: /nodeserver 57 | ``` 58 | to set `` to your namespace on DockerHub where you published your application as `nodeserver`. 59 | 60 | ## Configuring the Chart for your Application 61 | 62 | The following table lists the configurable parameters of the template Helm chart and their default values. 63 | 64 | | Parameter | Description | Default | 65 | | ----------------------- | --------------------------------------------- | ---------------------------------------------------------- | 66 | | `image.repository` | image repository | `/nodeserver` | 67 | | `image.tag` | Image tag | `latest` | 68 | | `image.pullPolicy` | Image pull policy | `Always` | 69 | | `livenessProbe` | Configuration for any liveness probe provided | YAML object of liveness probe. See [Liveness and Readiness Probes](#liveness-and-readiness-probes) | 70 | | `readinessProbe` | Configuration provided for any liveness probe provided | YAML object of readiness probe. See [Liveness and Readiness Probes](#liveness-and-readiness-probes) | 71 | | `service.name` | Kubernetes service name | `Node` | 72 | | `service.type` | Kubernetes service type exposing port | `NodePort` | 73 | | `service.port` | TCP Port for this service | 3000 | 74 | | `resources.limits.memory` | Memory resource limits | `128m` | 75 | | `resources.limits.cpu` | CPU resource limits | `100m` | 76 | 77 | #### Liveness and Readiness Probes 78 | 79 | With the default configuration, no liveness or readiness is enabled. This means that the container is considered healthy as long as its main process is running, otherwise it's considered a failure. 80 | 81 | Optionally, you add configurations for readiness and liveness probes by configuring `image.readinessProbe` and `image.livenessProbe` parameters, respectively. Example configuration is provided in the `values.yaml` file. 82 | 83 | The `initialDelaySeconds` defines how long to wait before performing the first probe. Default value for readiness probe is 2 seconds and for liveness probe is 20 seconds. You should set appropriate values for your container, if necessary, to ensure that the readiness and liveness probes don’t interfere with each other. Otherwise, the liveness probe might continuously restart the pod and the pod will never be marked as ready. 84 | 85 | More information about configuring liveness and readiness probes can be found [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) 86 | 87 | 88 | ## Using the Chart to deploy your Application to Kubernetes 89 | 90 | In order to use the Helm chart to deploy and verify your application in Kubernetes, run the following commands: 91 | 92 | 1. From the directory containing `Chart.yaml`, run: 93 | 94 | **Helm v2** 95 | 96 | ```sh 97 | helm install --name nodeserver . 98 | ``` 99 | 100 | **Helm v3** 101 | 102 | ```sh 103 | helm install nodeserver . 104 | ``` 105 | 106 | This deploys and runs your application in Kubernetes, and prints the following text to the console: 107 | 108 | ```sh 109 | Congratulations, you have deployed your Node.js Application to Kubernetes using Helm! 110 | 111 | To verify your application is running, run the following two commands to set the SAMPLE_NODE_PORT and SAMPLE_NODE_IP environment variables to the location of your application: 112 | 113 | export SAMPLE_NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services nodeserver-service) 114 | export SAMPLE_NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}") 115 | 116 | And then open your web browser to http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT} from the command line, eg: 117 | 118 | open http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT} 119 | ``` 120 | 121 | 2. Copy, paste and run the `export` lines printed to the console 122 | eg: 123 | 124 | ```sh 125 | export SAMPLE_NODE_PORT=$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services nodeserver-service) 126 | export SAMPLE_NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}") 127 | ``` 128 | 129 | 3. Open a browser to view your application: 130 | Open your browser to `http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT}` from the command line using: 131 | 132 | ```sh 133 | open http://${SAMPLE_NODE_IP}:${SAMPLE_NODE_PORT} 134 | ``` 135 | 136 | You application should now be visible in your browser. 137 | 138 | 139 | ## Uninstalling your Application 140 | If you installed your application with: 141 | 142 | **Helm v2** 143 | 144 | ```sh 145 | helm install --name nodeserver . 146 | ``` 147 | then you can: 148 | 149 | * Find the deployment using `helm list --all` and searching for an entry with the chart name "nodeserver". 150 | * Remove the application with `helm delete --purge nodeserver`. 151 | 152 | **Helm v3** 153 | 154 | ```sh 155 | helm install nodeserver . 156 | ``` 157 | then you can: 158 | 159 | * Find the deployment using `helm list --all` and searching for an entry with the chart name "nodeserver". 160 | * Remove the application with `helm uninstall nodeserver`. 161 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS --------------------------------------------------------------------------------