我有以下
helmfile.yaml
:
---
repositories:
- name: bitnami
url: https://charts.bitnami.com/bitnami
releases:
- name: clickhouse
namespace: clickhouse
chart: bitnami/clickhouse
version: 5.0.1
values:
- values.common.yaml
environments:
data-ehp:
values:
data-prod:
values:
我想用它部署以下服务
clickhouse-svc.yaml
:
apiVersion: v1
kind: Service
metadata:
name: clickhouse-svc
annotations:
networking.gke.io/load-balancer-type: "Internal"
spec:
type: LoadBalancer
externalTrafficPolicy: Cluster
selector:
statefulset.kubernetes.io/pod-name: clickhouse-shard0-0
ports:
- name: http-port
protocol: TCP
port: 8123
targetPort: 8123
- name: tcp-port
protocol: TCP
port: 9000
targetPort: 9000
- name: mysql-port
protocol: TCP
port: 9004
targetPort: 9004
- name: postgresql-port
protocol: TCP
port: 9005
targetPort: 9005
如何将服务添加到我的 helmfile 中?
尝试如下更新 helmfile.yaml
---
repositories:
- name: bitnami
url: https://charts.bitnami.com/bitnami
releases:
- name: clickhouse
namespace: clickhouse
chart: bitnami/clickhouse
version: 5.0.1
values:
- values.common.yaml
- name: clickhouse-svc
namespace: clickhouse
chart: path/to/service/chart # Replace with the actual path to your service chart if it's packaged separately.
version: 1.0.0 # Update the version as needed
values:
- clickhouse-svc.yaml
environments:
data-ehp:
values:
data-prod:
values:
如果您没有图表,请使用“helm create custom-clickhouse”创建一个图表
它将为您创建图表,使用所需的端口和其他更改更新values.yaml,然后将您的helmfile.yaml更新为图表的路径