This is an automated email from the ASF dual-hosted git repository.

traky pushed a commit to branch docs-conf-file
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git

commit ebaa4c029428e5f41284ec4d2252b1e27d421f2c
Author: traky <trakyd...@gmail.com>
AuthorDate: Wed Sep 10 12:07:19 2025 +0800

    add reference doc and update comment in config.yaml
---
 config/samples/config.yaml                         | 20 ++++++-------
 docs/en/latest/config.json                         |  3 +-
 .../en/latest/reference/configuration-file.md      | 34 +++++++++++++++-------
 3 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/config/samples/config.yaml b/config/samples/config.yaml
index 6d2246f7..c67e726b 100644
--- a/config/samples/config.yaml
+++ b/config/samples/config.yaml
@@ -1,11 +1,11 @@
 log_level: "info"                               # The log level of the APISIX 
Ingress Controller.
-                                                # the default value is "info".
+                                                # The default value is "info".
 
 controller_name: apisix.apache.org/apisix-ingress-controller  # The controller 
name of the APISIX Ingress Controller,
-                                                          # which is used to 
identify the controller in the GatewayClass.
-                                                          # The default value 
is "apisix.apache.org/apisix-ingress-controller".
-leader_election_id: "apisix-ingress-controller-leader" # The leader election 
ID for the APISIX Ingress Controller.
-                                                        # The default value is 
"apisix-ingress-controller-leader".
+                                                              # which is used 
to identify the controller in the GatewayClass.
+                                                              # The default 
value is "apisix.apache.org/apisix-ingress-controller".
+leader_election_id: "apisix-ingress-controller-leader"        # The leader 
election ID for the APISIX Ingress Controller.
+                                                              # The default 
value is "apisix-ingress-controller-leader".
 leader_election:
   lease_duration: 30s                   # lease_duration is the duration that 
non-leader candidates will wait
                                         # after observing a leadership renewal 
until attempting to acquire leadership of a
@@ -25,18 +25,18 @@ enable_http2: false                     # Whether to enable 
HTTP/2 for the serve
 probe_addr: ":8081"                     # The address the probe endpoint binds 
to.
                                         # The default value is ":8081".
 
-secure_metrics: false                      # The secure metrics configuration.
+secure_metrics: false                   # The secure metrics configuration.
                                         # The default value is "" (empty).
 
 exec_adc_timeout: 15s                   # The timeout for the ADC to execute.
                                         # The default value is 15 seconds.
 
 provider:
-  type: "apisix"
+  type: "apisix"                        # Provider type.
+                                        # Value can be "apisix" or 
"apisix-standalone".
 
-  sync_period: 1h
-                                        # The period between two consecutive 
syncs.
+  sync_period: 1h                       # The period between two consecutive 
syncs.
                                         # The default value is 1 hour, which 
means the controller will not sync.
                                         # If you want to enable the sync, set 
it to a positive value.
-  init_sync_delay: 20m                # The initial delay before the first 
sync, only used when the controller is started.
+  init_sync_delay: 20m                  # The initial delay before the first 
sync, only used when the controller is started.
                                         # The default value is 20 minutes.
diff --git a/docs/en/latest/config.json b/docs/en/latest/config.json
index 99f0924e..8048cde2 100644
--- a/docs/en/latest/config.json
+++ b/docs/en/latest/config.json
@@ -38,7 +38,8 @@
             "label": "Reference",
             "items": [
                 "reference/api-reference",
-                "reference/example"
+                "reference/example",
+                "reference/configuration-file"
             ]
         },
         {
diff --git a/config/samples/config.yaml 
b/docs/en/latest/reference/configuration-file.md
similarity index 53%
copy from config/samples/config.yaml
copy to docs/en/latest/reference/configuration-file.md
index 6d2246f7..5f162412 100644
--- a/config/samples/config.yaml
+++ b/docs/en/latest/reference/configuration-file.md
@@ -1,11 +1,24 @@
+---
+title: Configuration File
+slug: /reference/apisix-ingress-controller/configuration-file
+description: Configure the APISIX Ingress Controller using the config.yaml 
file, including configurations such as log settings, leader election, metrics, 
and sync behavior.
+---
+
+The APISIX Ingress Controller uses a configuration file `config.yaml` to 
define core settings such as log level, leader election behavior, metrics 
endpoints, and sync intervals. 
+
+Configurations are defined in a Kubernetes ConfigMap and mounted into the 
controller pod as a file at runtime. To apply changes, you can update the 
ConfigMap and restart the controller Deployment to reload the configurations.
+
+Below are all available configuration options, including their default values 
and usage:
+
+```yaml
 log_level: "info"                               # The log level of the APISIX 
Ingress Controller.
-                                                # the default value is "info".
+                                                # The default value is "info".
 
 controller_name: apisix.apache.org/apisix-ingress-controller  # The controller 
name of the APISIX Ingress Controller,
-                                                          # which is used to 
identify the controller in the GatewayClass.
-                                                          # The default value 
is "apisix.apache.org/apisix-ingress-controller".
-leader_election_id: "apisix-ingress-controller-leader" # The leader election 
ID for the APISIX Ingress Controller.
-                                                        # The default value is 
"apisix-ingress-controller-leader".
+                                                              # which is used 
to identify the controller in the GatewayClass.
+                                                              # The default 
value is "apisix.apache.org/apisix-ingress-controller".
+leader_election_id: "apisix-ingress-controller-leader"        # The leader 
election ID for the APISIX Ingress Controller.
+                                                              # The default 
value is "apisix-ingress-controller-leader".
 leader_election:
   lease_duration: 30s                   # lease_duration is the duration that 
non-leader candidates will wait
                                         # after observing a leadership renewal 
until attempting to acquire leadership of a
@@ -25,18 +38,19 @@ enable_http2: false                     # Whether to enable 
HTTP/2 for the serve
 probe_addr: ":8081"                     # The address the probe endpoint binds 
to.
                                         # The default value is ":8081".
 
-secure_metrics: false                      # The secure metrics configuration.
+secure_metrics: false                   # The secure metrics configuration.
                                         # The default value is "" (empty).
 
 exec_adc_timeout: 15s                   # The timeout for the ADC to execute.
                                         # The default value is 15 seconds.
 
 provider:
-  type: "apisix"
+  type: "apisix"                        # Provider type.
+                                        # Value can be "apisix" or 
"apisix-standalone".
 
-  sync_period: 1h
-                                        # The period between two consecutive 
syncs.
+  sync_period: 1h                       # The period between two consecutive 
syncs.
                                         # The default value is 1 hour, which 
means the controller will not sync.
                                         # If you want to enable the sync, set 
it to a positive value.
-  init_sync_delay: 20m                # The initial delay before the first 
sync, only used when the controller is started.
+  init_sync_delay: 20m                  # The initial delay before the first 
sync, only used when the controller is started.
                                         # The default value is 20 minutes.
+```

Reply via email to