Skip to content

Commit

Permalink
Service type (#7)
Browse files Browse the repository at this point in the history
* Parameter for service type
  • Loading branch information
alfespa17 authored Mar 27, 2022
1 parent 5e04ef7 commit 045e2c0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ api:
enabled: true
version: "2.1.1"
replicaCount: "1"
serviceType: "ClusterIP"
properties:
databaseType: "SQL_AZURE" # Replace with "H2" (ONLY FOR TESTING), "SQL_AZURE", "POSTGRESQL" or "MYSQL"
databaseHostname: "mysuperdatabse.database.windows.net" # Replace with the real value
Expand All @@ -99,6 +100,7 @@ executor:
enabled: true
version: "1.5.3"
replicaCount: "1"
serviceType: "ClusterIP"
properties:
toolsRepository: "https://github.com/AzBuilder/terrakube-extensions" # Default extension repository
toolsBranch: "main" #Default branch for extensions
Expand All @@ -110,12 +112,14 @@ registry:
enabled: true
version: "2.1.1"
replicaCount: "1"
serviceType: "ClusterIP"

## UI Properties
ui:
enabled: true
version: "0.5.0-beta.2"
replicaCount: "1"
serviceType: "ClusterIP"

## Ingress properties
ingress:
Expand Down
2 changes: 1 addition & 1 deletion templates/service-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
metadata:
name: terrakube-api-service
spec:
type: ClusterIP
type: {{ .Values.api.serviceType }}
ports:
- port: 8080
targetPort: 8080
Expand Down
2 changes: 1 addition & 1 deletion templates/service-executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
metadata:
name: terrakube-executor-service
spec:
type: ClusterIP
type: {{ .Values.executor.serviceType }}
ports:
- port: 8090
targetPort: 8090
Expand Down
2 changes: 1 addition & 1 deletion templates/service-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
metadata:
name: terrakube-registry-service
spec:
type: ClusterIP
type: {{ .Values.registry.serviceType }}
ports:
- port: 8075
targetPort: 8075
Expand Down
2 changes: 1 addition & 1 deletion templates/service-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Service
metadata:
name: terrakube-ui-service
spec:
type: ClusterIP
type: {{ .Values.ui.serviceType }}
ports:
- port: 8080
targetPort: 8080
Expand Down
16 changes: 16 additions & 0 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
"description": "Replica count for API",
"type": "string"
},
"serviceType": {
"description": "Kubernetes service type",
"enum": ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"]
},
"properties": {
"type": "object",
"required": ["databaseType", "databaseHostname", "databaseName", "databaseUser", "databasePassword"],
Expand Down Expand Up @@ -121,6 +125,10 @@
"description": "Replica count for API",
"type": "string"
},
"serviceType": {
"description": "Kubernetes service type",
"enum": ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"]
},
"properties": {
"type": "object",
"required": ["toolsRepository", "toolsBranch"],
Expand Down Expand Up @@ -160,6 +168,10 @@
"replicaCount": {
"description": "Replica count for Registry",
"type": "string"
},
"serviceType": {
"description": "Kubernetes service type",
"enum": ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"]
}
}
},
Expand All @@ -178,6 +190,10 @@
"replicaCount": {
"description": "Replica count for UI",
"type": "string"
},
"serviceType": {
"description": "Kubernetes service type",
"enum": ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"]
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ api:
enabled: true
version: ""
replicaCount: ""
serviceType: ""
properties:
databaseType: ""
databaseHostname: ""
Expand All @@ -34,6 +35,7 @@ executor:
enabled: true
version: ""
replicaCount: ""
serviceType: ""
properties:
toolsRepository: "https://github.com/AzBuilder/terrakube-extensions"
toolsBranch: "main"
Expand All @@ -45,12 +47,14 @@ registry:
enabled: true
version: ""
replicaCount: ""
serviceType: ""

## UI Properties
ui:
enabled: true
version: ""
replicaCount: ""
serviceType: ""

## Ingress properties
ingress:
Expand Down

0 comments on commit 045e2c0

Please sign in to comment.