diff --git a/.github/workflows/cos.yaml b/.github/workflows/cos.yaml new file mode 100644 index 00000000..d78c596a --- /dev/null +++ b/.github/workflows/cos.yaml @@ -0,0 +1,37 @@ +name: 发布到腾讯云 + +on: + push: + branches: + - master + - legacy + - dev + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + run: | + echo "installing helm 3..." + curl -sSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash + + - name: Upload to COS + uses: zkqiang/tencent-cos-action@v0.1.0 + with: + args: upload -r / + secret_id: ${{ secrets.TENCENT_SECRET_ID }} + secret_key: ${{ secrets.TENCENT_SECRET_KEY }} + bucket: helm-1374617844 + region: ap-chengdu diff --git a/charts/apisix/templates/configmap.yaml b/charts/apisix/templates/configmap.yaml index 18e3ad4d..db46b885 100644 --- a/charts/apisix/templates/configmap.yaml +++ b/charts/apisix/templates/configmap.yaml @@ -76,14 +76,11 @@ data: enable_http2: {{ .Values.apisix.enableHTTP2 }} enable_server_tokens: {{ .Values.apisix.enableServerTokens }} # Whether the APISIX version number should be shown in Server header - # proxy_protocol: # Proxy Protocol configuration - # listen_http_port: 9181 # The port with proxy protocol for http, it differs from node_listen and admin_listen. - # # This port can only receive http request with proxy protocol, but node_listen & admin_listen - # # can only receive http request. If you enable proxy protocol, you must use this port to - # # receive http request with proxy protocol - # listen_https_port: 9182 # The port with proxy protocol for https - # enable_tcp_pp: true # Enable the proxy protocol for tcp proxy, it works for stream_proxy.tcp option - # enable_tcp_pp_to_upstream: true # Enables the proxy protocol to the upstream server + proxy_protocol: # Proxy Protocol configuration + listen_http_port: {{ .Values.apisix.proxyProtocol.listenHTTPPort }} # The port with proxy protocol for http, it differs from node_listen and admin_listen. + listen_https_port: {{ .Values.apisix.proxyProtocol.listenHTTPSPort }} # The port with proxy protocol for https + enable_tcp_pp: {{ .Values.apisix.proxyProtocol.enableTCPPP }} # Enable the proxy protocol for tcp proxy, it works for stream_proxy.tcp option + enable_tcp_pp_to_upstream: {{ .Values.apisix.proxyProtocol.enableTCPPPToUpstream }} # Enables the proxy protocol to the upstream server proxy_cache: # Proxy Caching configuration cache_ttl: 10s # The default caching time if the upstream does not specify the cache time diff --git a/charts/apisix/templates/deployment.yaml b/charts/apisix/templates/deployment.yaml index 1c4102eb..6b2f5d0f 100644 --- a/charts/apisix/templates/deployment.yaml +++ b/charts/apisix/templates/deployment.yaml @@ -67,7 +67,7 @@ spec: {{- end }} image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}" {{- if eq .Values.apisix.deployment.mode "standalone" }} - command: ["sh", "-c","ln -s /apisix-config/apisix.yaml /usr/local/apisix/conf/apisix.yaml && /docker-entrypoint.sh docker-start"] + command: ["sh", "-c","cp /apisix-config/apisix.yaml {{ .Values.apisix.configDir }} && ln -s {{ .Values.apisix.configDir }}/apisix.yaml /usr/local/apisix/conf/apisix.yaml && /docker-entrypoint.sh docker-start"] {{- end }} imagePullPolicy: {{ .Values.image.pullPolicy }} env: diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml index d4140f4c..61b0cefd 100644 --- a/charts/apisix/values.yaml +++ b/charts/apisix/values.yaml @@ -279,6 +279,8 @@ apisix: # -- Enable nginx IPv6 resolver enableIPv6: true enableHTTP2: true + # -- Address the issue of configuration files being unable to update in standalone mode due to being a ConfigMap + configDir: "/etc/apisix/conf.d" # -- Whether the APISIX version number should be shown in Server header enableServerTokens: true