-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Some CRDs missing status sub-resource #1809
Merged
Revolyssup
merged 28 commits into
apache:master
from
Chever-John:fix/add-crd-status-field
Dec 13, 2023
Merged
Changes from 8 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
132e9b2
fix: Apisix Cluster Config status
Chever-John e4bcc97
test: e2e test for Apisix Cluster Config status
Chever-John 2b31690
chore: make update-all
Chever-John f9d8999
chore: type the cluster name
Chever-John e9de4f1
typo: from ApisixPluginConfig to ApisixClusterConfig
Chever-John 73365ea
fix: newApisixClusterConfig
Chever-John 1d5d245
fix: change clusterConfig's name
Chever-John 021fd8b
chore: change FIt to It
Chever-John d65a927
fix: change config's name
Chever-John 21c6331
fix: add crd-subresource-status for apisixConsumer
Chever-John e8784b9
fix: yamllint error
Chever-John 307298b
typo: something need to correct
Chever-John a51ab89
fix: used resource must be released
Chever-John f59d8ef
fix: yamllint error
Chever-John f636628
fix: change the status sub-resource from
Chever-John 21d3ac1
ci: accelerate ci for judging error
Chever-John a1e7e4c
chore: fmt the status.go
Chever-John 8b1dbe2
chore: makefile
Chever-John eb899b1
fix: package error
Chever-John f3c9496
fix: remove unused package
Chever-John dd922ab
fix: the ci error
Chever-John 65aa00c
fix: ci error
Chever-John b1571f0
fix: ci error
Chever-John 6851347
fix: ci debug
Chever-John c0da9a8
fix: ci error
Chever-John 7da1727
Merge branch 'master' into fix/add-crd-status-field
Chever-John 1e7c01d
ci: Set cron for automatic execution upon changes in dev status
Chever-John eab049e
solve merge conflicts
Revolyssup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,6 +275,20 @@ wrw7im4TNSAdwVX4Y1F4svJ2as5SJn5QYGAzXDixNuwzXYrpP9rzA2s= | |
assert.Contains(ginkgo.GinkgoT(), output, `status: "False"`, "status.conditions.status is recorded") | ||
}) | ||
|
||
ginkgo.It("check ApisixClusterConfig status is recorded", func() { | ||
// create ApisixClusterConfig resource | ||
clusterConfigName := "apisix-cluster-config" | ||
assert.Nil(ginkgo.GinkgoT(), s.NewApisixClusterConfig("default", true, true), "create cluster config error") | ||
time.Sleep(6 * time.Second) | ||
|
||
// status should be recorded as successfulen | ||
output, err := s.GetOutputFromString("acc", clusterConfigName, "-o", "yaml") | ||
assert.Nil(ginkgo.GinkgoT(), err, "Get output of ApisixClusterConfig resource") | ||
assert.Contains(ginkgo.GinkgoT(), output, "type: ResourcesAvailable", "status.conditions.type is recorded") | ||
Chever-John marked this conversation as resolved.
Show resolved
Hide resolved
|
||
assert.Contains(ginkgo.GinkgoT(), output, "reason: ResourcesSynced", "status.conditions.reason is recorded") | ||
assert.Contains(ginkgo.GinkgoT(), output, `status: "True"`, "status.conditions.status is recorded") | ||
assert.Contains(ginkgo.GinkgoT(), output, "message: Sync Successfully", "status.conditions.message is recorded") | ||
}) | ||
//TODO: ApisixGlobal | ||
//TODO: ApisixConsumer CRD missing status definition | ||
//TODO: ApisixClusterConfig CRD missing status definition | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also need to add a test case for the status of ApisixClusterConfig. |
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, since you pass in "default" name to config, you can rmv this
clusterConfigName := "apisix-cluster-config"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I know the reason why I should remove this? I didn't pass in any other value for the config name besides 'apisix-cluster-config'. Is there anything else that I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afzal442
I apologize for overlooking the fact that the sample on the official website specifies the use of the
default
value as the default value formetadata.name
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues @Chever-John. It's alright. I am also learning with you. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your previous guidance, it helped me a lot. I was stuck creating a test environment before, but now I can work on this issue more efficiently:)