Skip to content

Commit 5ec272a

Browse files
committed
Merge branch 'master' into doc/fix-doc-description-error
2 parents 915b4e2 + b46332c commit 5ec272a

25 files changed

+383
-85
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
make generate-crd-docs
6161
- name: Check CRD Docs Diff
6262
run: |
63-
if ! git diff --exit-code -- docs/crd/api.md; then
64-
echo "docs/crd/api.md has changed. Please run 'make generate-crd-docs' and commit the updated file."
63+
if ! git diff --exit-code -- docs/en/latest/api-reference.md; then
64+
echo "docs/en/latest/api-reference.md has changed. Please run 'make generate-crd-docs' and commit the updated file."
6565
exit 1
6666
fi

.github/workflows/lint-checker.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ jobs:
9696
markdownlint '**/*.md' \
9797
--ignore node_modules \
9898
--ignore CHANGELOG.md \
99-
--ignore docs/crd/api.md \
100-
--ignore docs/gateway-api.md
99+
--ignore docs/en/latest/api-reference.md
101100
markdown-link-check:
102101
needs: changes
103102
if: |

CHANGELOG.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,9 @@ If you encounter any problems while using the implementation, please [submit an
8585
* Ashing Zheng
8686
8787
### Changes
88-
<details><summary>14 commits</summary>
88+
<details><summary>12 commits</summary>
8989
<p>
9090
91-
* [`2f35524`](https://github.com/apache/apisix-ingress-controller/commit/2f35524b72b3f9e181e50479ce0576c5d9bae45d) add Makefile
92-
* [`10eada5`](https://github.com/apache/apisix-ingress-controller/commit/10eada507db3515e1e19bca1152ef19fae47b7eb) chore: v2.0.0-rc1 release
9391
* [`c1533c9`](https://github.com/apache/apisix-ingress-controller/commit/c1533c9ddf4b1ed6db999d1535370824b8c150e1) fix: the sync_period of the provider should not be 0s (#2438)
9492
* [`0db882d`](https://github.com/apache/apisix-ingress-controller/commit/0db882d66d5b9dfb7dc9dd9d2045d4709b1c6ed2) chore: remove useless example files in dockerfile (#2434)
9593
* [`11ecb35`](https://github.com/apache/apisix-ingress-controller/commit/11ecb353d074b7392046d08e52bc824a3eeb6ee7) fix: set default provider type (#2436)

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ TEST_DIR ?= ./test/e2e/apisix/
3636
# CRD Reference Documentation
3737
CRD_REF_DOCS_VERSION ?= v0.1.0
3838
CRD_REF_DOCS ?= $(LOCALBIN)/crd-ref-docs
39-
CRD_DOCS_CONFIG ?= docs/crd/config.yaml
40-
CRD_DOCS_OUTPUT ?= docs/crd/api.md
39+
CRD_DOCS_CONFIG ?= docs/assets/crd/config.yaml
40+
CRD_DOCS_OUTPUT ?= docs/en/latest/api-reference.md
41+
CRD_DOCS_TEMPLATE ?= docs/assets/template
4142

4243
# go
4344
VERSYM="github.com/apache/apisix-ingress-controller/internal/version._buildVersion"
@@ -361,7 +362,7 @@ generate-crd-docs: manifests ## Generate CRD reference documentation in a single
361362
--source-path=./api \
362363
--config=$(CRD_DOCS_CONFIG) \
363364
--renderer=markdown \
364-
--templates-dir=./docs/template \
365+
--templates-dir=$(CRD_DOCS_TEMPLATE) \
365366
--output-path=$(CRD_DOCS_OUTPUT) \
366367
--max-depth=100
367368
@echo "CRD reference documentation generated at $(CRD_DOCS_OUTPUT)"
@@ -374,7 +375,7 @@ generate-crd-docs-grouped: manifests ## Generate CRD reference documentation gro
374375
--source-path=./api \
375376
--config=$(CRD_DOCS_CONFIG) \
376377
--renderer=markdown \
377-
--templates-dir=./docs/template \
378+
--templates-dir=$(CRD_DOCS_TEMPLATE) \
378379
--output-path=docs/crd/groups \
379380
--output-mode=group
380381
@echo "CRD reference documentation generated in docs/crd/groups directory"

api/v1alpha1/gatewayproxy_types.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ import (
2222
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2323
)
2424

25-
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
26-
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
27-
2825
// GatewayProxySpec defines the desired state of GatewayProxy.
2926
type GatewayProxySpec struct {
3027
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
@@ -116,9 +113,10 @@ type ControlPlaneAuth struct {
116113
}
117114

118115
// ControlPlaneProvider defines the configuration for control plane provider.
116+
// +kubebuilder:validation:XValidation:rule="has(self.endpoints) != has(self.service)"
119117
type ControlPlaneProvider struct {
120118
// Endpoints specifies the list of control plane endpoints.
121-
// +kubebuilder:validation:Required
119+
// +kubebuilder:validation:Optional
122120
// +kubebuilder:validation:MinItems=1
123121
Endpoints []string `json:"endpoints"`
124122

config/crd/bases/apisix.apache.org_gatewayproxies.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ spec:
137137
type: boolean
138138
required:
139139
- auth
140-
- endpoints
141140
type: object
141+
x-kubernetes-validations:
142+
- rule: has(self.endpoints) != has(self.service)
142143
type:
143144
description: Type specifies the type of provider. Can only be
144145
`ControlPlane`.

0 commit comments

Comments
 (0)