diff --git a/README.md b/README.md index 65e9f0d..df41876 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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: diff --git a/templates/service-api.yaml b/templates/service-api.yaml index 612c611..dc2c0c8 100644 --- a/templates/service-api.yaml +++ b/templates/service-api.yaml @@ -4,7 +4,7 @@ kind: Service metadata: name: terrakube-api-service spec: - type: ClusterIP + type: {{ .Values.api.serviceType }} ports: - port: 8080 targetPort: 8080 diff --git a/templates/service-executor.yaml b/templates/service-executor.yaml index 3cbaf76..3df9d62 100644 --- a/templates/service-executor.yaml +++ b/templates/service-executor.yaml @@ -4,7 +4,7 @@ kind: Service metadata: name: terrakube-executor-service spec: - type: ClusterIP + type: {{ .Values.executor.serviceType }} ports: - port: 8090 targetPort: 8090 diff --git a/templates/service-registry.yaml b/templates/service-registry.yaml index 0317bdb..a6f10cd 100644 --- a/templates/service-registry.yaml +++ b/templates/service-registry.yaml @@ -4,7 +4,7 @@ kind: Service metadata: name: terrakube-registry-service spec: - type: ClusterIP + type: {{ .Values.registry.serviceType }} ports: - port: 8075 targetPort: 8075 diff --git a/templates/service-ui.yaml b/templates/service-ui.yaml index 78c697e..1cd2fbe 100644 --- a/templates/service-ui.yaml +++ b/templates/service-ui.yaml @@ -4,7 +4,7 @@ kind: Service metadata: name: terrakube-ui-service spec: - type: ClusterIP + type: {{ .Values.ui.serviceType }} ports: - port: 8080 targetPort: 8080 diff --git a/values.schema.json b/values.schema.json index 456d6c4..5b7f2f9 100644 --- a/values.schema.json +++ b/values.schema.json @@ -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"], @@ -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"], @@ -160,6 +168,10 @@ "replicaCount": { "description": "Replica count for Registry", "type": "string" + }, + "serviceType": { + "description": "Kubernetes service type", + "enum": ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"] } } }, @@ -178,6 +190,10 @@ "replicaCount": { "description": "Replica count for UI", "type": "string" + }, + "serviceType": { + "description": "Kubernetes service type", + "enum": ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"] } } }, diff --git a/values.yaml b/values.yaml index baa3e94..30a42db 100644 --- a/values.yaml +++ b/values.yaml @@ -22,6 +22,7 @@ api: enabled: true version: "" replicaCount: "" + serviceType: "" properties: databaseType: "" databaseHostname: "" @@ -34,6 +35,7 @@ executor: enabled: true version: "" replicaCount: "" + serviceType: "" properties: toolsRepository: "https://github.com/AzBuilder/terrakube-extensions" toolsBranch: "main" @@ -45,12 +47,14 @@ registry: enabled: true version: "" replicaCount: "" + serviceType: "" ## UI Properties ui: enabled: true version: "" replicaCount: "" + serviceType: "" ## Ingress properties ingress: