Skip to content

Commit

Permalink
make svc optional for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinon committed Nov 29, 2021
1 parent d6fc2a4 commit 23d3d01
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.
4 changes: 2 additions & 2 deletions ndustrial/deployment/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ maintainers:
- email: [email protected]
name: DevOps
# Please make sure that version and appVersion are always the same.
version: 0.1.20
appVersion: 0.1.20
version: 0.1.21
appVersion: 0.1.21
27 changes: 14 additions & 13 deletions ndustrial/deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,20 @@

### Service parameters

| Name | Description | Value |
| ---------------------------------- | ---------------------------------------------------- | ----------- |
| `service.type` | Deployment service type | `ClusterIP` |
| `service.port` | Deployment service HTTP port | `80` |
| `service.httpsPort` | Deployment service HTTPS port | `nil` |
| `service.nodePorts.http` | Node port for HTTP | `nil` |
| `service.nodePorts.https` | Node port for HTTPS | `nil` |
| `service.clusterIP` | Deployment service Cluster IP | `nil` |
| `service.loadBalancerIP` | Deployment service Load Balancer IP | `nil` |
| `service.loadBalancerSourceRanges` | Deployment service Load Balancer sources | `[]` |
| `service.externalTrafficPolicy` | Deployment service external traffic policy | `Cluster` |
| `service.annotations` | Additional custom annotations for Deployment service | `{}` |
| `service.ports` | Additional port definitions for the service | `[]` |
| Name | Description | Value |
| ---------------------------------- | ------------------------------------------------------------------------- | ----------- |
| `service.enabled` | Enable service | `true` |
| `service.type` | The type of service to create (LoadBalancer, ClusterIP, NodePort, etc...) | `ClusterIP` |
| `service.port` | Deployment service HTTP port | `80` |
| `service.httpsPort` | Deployment service HTTPS port | `nil` |
| `service.nodePorts.http` | Node port for HTTP | `nil` |
| `service.nodePorts.https` | Node port for HTTPS | `nil` |
| `service.clusterIP` | Deployment service Cluster IP | `nil` |
| `service.loadBalancerIP` | Deployment service Load Balancer IP | `nil` |
| `service.loadBalancerSourceRanges` | Deployment service Load Balancer sources | `[]` |
| `service.externalTrafficPolicy` | Deployment service external traffic policy | `Cluster` |
| `service.annotations` | Additional custom annotations for Deployment service | `{}` |
| `service.ports` | Additional port definitions for the service | `[]` |


### Ingress parameters
Expand Down
4 changes: 4 additions & 0 deletions ndustrial/deployment/_var_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@
group: Deployment
default: {}
type:
- variable: service.enabled
group: Service
default: true
type: boolean
- variable: service.type
group: Service
default: ClusterIP
Expand Down
2 changes: 2 additions & 0 deletions ndustrial/deployment/templates/svc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.service.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -53,3 +54,4 @@ spec:
{{- include "nio-common.tplvalues.render" ( dict "value" .Values.service.ports "context" $) | nindent 4 }}
{{- end }}
selector: {{- include "nio-common.labels.matchLabels" . | nindent 4 }}
{{- end }}
5 changes: 4 additions & 1 deletion ndustrial/deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ updateStrategy:
## @section Service parameters

service:
## @param service.type Deployment service type
## @param service.enabled Enable service
##
enabled: true
## @param service.type The type of service to create (LoadBalancer, ClusterIP, NodePort, etc...)
##
type: ClusterIP
## @param service.port Deployment service HTTP port
Expand Down

0 comments on commit 23d3d01

Please sign in to comment.