You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/26 06:41:04 UTC

[GitHub] [apisix-ingress-controller] neverCase opened a new pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

neverCase opened a new pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [ ] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   - Related issues
   
   ___
   ### Bugfix
   - Description
   
   - How to fix?
   
   ___
   ### New feature or improvement
   - Describe the details and related test reports.
   
   ___
   ### Backport patches
   - Why need to backport?
   
   - Source branch
   
   - Related commits and pull requests
   
   - Target branch
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975209082


   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#694](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b34b001) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/9f2cd7f856f1879ae2586f2a84f4f39d2654996d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9f2cd7f) will **decrease** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #694      +/-   ##
   ==========================================
   - Coverage   32.59%   32.58%   -0.01%     
   ==========================================
     Files          66       65       -1     
     Lines        6780     6779       -1     
   ==========================================
   - Hits         2210     2209       -1     
     Misses       4321     4321              
     Partials      249      249              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9lMmUvZTJlLmdv) | | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9f2cd7f...b34b001](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r754776141



##########
File path: samples/deploy/crd/v1/ApisixPluginConfig.yaml
##########
@@ -0,0 +1,270 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  name: apisixpluginconfigs.apisix.apache.org
+spec:
+  group: apisix.apache.org
+  scope: Namespaced
+  names:
+    plural: apisixpluginconfigs
+    singular: apisixpluginconfig
+    kind: ApisixPluginConfig
+    shortNames:
+      - apc
+  versions:
+    - name: v1

Review comment:
       We can just keep `v2beta2`

##########
File path: samples/deploy/crd/v1/ApisixPluginConfig.yaml
##########
@@ -0,0 +1,270 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  name: apisixpluginconfigs.apisix.apache.org
+spec:
+  group: apisix.apache.org
+  scope: Namespaced
+  names:
+    plural: apisixpluginconfigs
+    singular: apisixpluginconfig
+    kind: ApisixPluginConfig
+    shortNames:
+      - apc
+  versions:
+    - name: v1
+      served: true
+      storage: false
+      deprecated: true
+      subresources:
+        status: {}
+      additionalPrinterColumns:
+        - jsonPath: .spec.desc
+          name: Desc
+          type: string
+          priority: 0
+        - jsonPath: .metadata.creationTimestamp
+          name: Age
+          type: date
+          priority: 0
+      schema:
+        openAPIV3Schema:
+          type: object
+          properties:
+            spec:
+              type: object
+              required:
+                - plugins
+              properties:
+                desc:
+                  type: string
+                  minLength: 1
+                plugins:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      name:
+                        type: string
+                        minLength: 1
+                      enable:
+                        type: boolean
+                      config:
+                        type: object
+                  required:
+                    - name
+                    - enable
+            status:
+              type: object
+              properties:
+                conditions:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      "type":
+                        type: string
+                      reason:
+                        type: string
+                      status:
+                        type: string
+                      message:
+                        type: string
+                      observedGeneration:
+                        type: integer
+    - name: v2alpha1

Review comment:
       v2alpha1 does not need to be retained




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-977451362


   @tao12345666333 @tokers 
   Now, what could I do next


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-977787567


   > @neverCase There is no problem overall, please delete the desc field and run `make codegen` again. Then we can merge this PR. Thanks!
   
   ok, one minute


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r754944588



##########
File path: pkg/kube/apisix/apis/config/v2beta2/types.go
##########
@@ -195,3 +195,40 @@ type ApisixRouteList struct {
 	metav1.ListMeta `json:"metadata" yaml:"metadata"`
 	Items           []ApisixRoute `json:"items,omitempty" yaml:"items,omitempty"`
 }
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+
+// ApisixPluginConfig is the Schema for the ApisixPluginConfig resource.
+// An ApisixPluginConfig is used to support a group of plugin configs
+type ApisixPluginConfig struct {
+	metav1.TypeMeta   `json:",inline" yaml:",inline"`
+	metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
+
+	// Spec defines the desired state of ApisixPluginConfigSpec.
+	Spec   ApisixPluginConfigSpec `json:"spec" yaml:"spec"`
+	Status v2alpha1.ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`
+}
+
+// ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec.
+type ApisixPluginConfigSpec struct {
+	// +kubebuilder:validation:MinLength=1
+	Desc string `json:"desc,omitempty" yaml:"desc,omitempty"`

Review comment:
       I think we can keep it like this
   
   > Is this necessary? The `Desc` for the underlying `plugin_config` object is used for the management purpose, I think it's not useful for users, they can add descriptions from the annotations.
   
   I think we can keep it like this.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975209082


   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#694](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b34b001) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/9f2cd7f856f1879ae2586f2a84f4f39d2654996d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9f2cd7f) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master     #694   +/-   ##
   =======================================
     Coverage   32.59%   32.59%           
   =======================================
     Files          66       66           
     Lines        6780     6780           
   =======================================
     Hits         2210     2210           
     Misses       4321     4321           
     Partials      249      249           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9f2cd7f...b34b001](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975211934


   @tao12345666333 
   plz review it once again


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r727737286



##########
File path: pkg/kube/apisix/apis/config/v1alpha1/types.go
##########
@@ -0,0 +1,47 @@
+package v1alpha1
+
+import (
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2alpha1"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+// +kubebuilder:object:generate=true
+// +kubebuilder:printcolumn:name="Id",type="date",JSONPath=".metadata.namespace"

Review comment:
       the type is incorrect




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975217202


   In #707, we discussed that we want to use a unified version for all resource management, so here could you add it to the v2beta2 version?
   
   I'm sorry that this is inconsistent with our initial expectations. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase edited a comment on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase edited a comment on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-973810404


   - [x] Add ApisixPluginConfig custom resource. Only need to modify YAML.
   - [x] Add ApisixPluginConfig data structures.
   - [x] Add client implementation to interact with Apache APISIX.
   - [ ] Add ApisixPluginConfig translator, it can convert ApisixPluginConfig data structure into APISIX.
   - [ ] Add ApisixPluginConfig controller loop, It watches the ApisixPluginConfig resource in the Kubernetes cluster and converts it to the ApisixPluginConfig data structure.
   - [ ] Add docs to describe it.
   
   I will add client implementation to interact with Apache APISIX later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-947518419


   cool!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-948207750


   @tao12345666333 
   hi, i have some problems with this pr.
   From the ci results above, it shows
   ```sh
   Error: pkg/kube/apisix/apis/config/v1alpha1/register.go:42: File is not `gofmt`-ed with `-s` (gofmt)
   	scheme.AddKnownTypes(SchemeGroupVersion,
   		//&ApisixPluginConfig{},
   		//&ApisixPluginConfigList{},
   	)
   Error: Process completed with exit code 1.
   ```
   I had annotated the `&ApisixPluginConfig{}` and `&ApisixPluginConfigList{}` here, because i hadn't generated the `zz_generated.deepcopy.go`. 
   Without a series of deepcopy * functions, these two objects couldn't implement the k8s runtime.Object.
   so what should i do next


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-941965200


   @neverCase  any update?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase edited a comment on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase edited a comment on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-977796912


   @tao12345666333 
   hi,i'm ready.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975209082


   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#694](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (556ae91) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/9f2cd7f856f1879ae2586f2a84f4f39d2654996d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9f2cd7f) will **increase** coverage by `67.40%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##           master      #694       +/-   ##
   ============================================
   + Coverage   32.59%   100.00%   +67.40%     
   ============================================
     Files          66         1       -65     
     Lines        6780         1     -6779     
   ============================================
   - Hits         2210         1     -2209     
   + Misses       4321         0     -4321     
   + Partials      249         0      -249     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/apisix/stream\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9zdHJlYW1fcm91dGUuZ28=) | | |
   | [pkg/config/config.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbmZpZy9jb25maWcuZ28=) | | |
   | [pkg/kube/translation/util.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vdXRpbC5nbw==) | | |
   | [pkg/apisix/upstream.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC91cHN0cmVhbS5nbw==) | | |
   | [pkg/api/validation/apisix\_consumer.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL2FwaXNpeF9jb25zdW1lci5nbw==) | | |
   | [pkg/kube/translation/ingress.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vaW5ncmVzcy5nbw==) | | |
   | [pkg/apisix/schema.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9zY2hlbWEuZ28=) | | |
   | [pkg/apisix/cache/memdb.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9jYWNoZS9tZW1kYi5nbw==) | | |
   | [pkg/apisix/global\_rule.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9nbG9iYWxfcnVsZS5nbw==) | | |
   | [pkg/apisix/nonexistentclient.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2FwaXNpeC9ub25leGlzdGVudGNsaWVudC5nbw==) | | |
   | ... and [55 more](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9f2cd7f...556ae91](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r727799807



##########
File path: pkg/kube/apisix/apis/config/v1alpha1/types.go
##########
@@ -0,0 +1,47 @@
+package v1alpha1
+
+import (
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2alpha1"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+// +kubebuilder:object:generate=true
+// +kubebuilder:printcolumn:name="Id",type="date",JSONPath=".metadata.namespace"

Review comment:
       hi, i'm busy now just after the national vocation -,-.
   i will update my code later.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r727799807



##########
File path: pkg/kube/apisix/apis/config/v1alpha1/types.go
##########
@@ -0,0 +1,47 @@
+package v1alpha1
+
+import (
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2alpha1"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+// +kubebuilder:object:generate=true
+// +kubebuilder:printcolumn:name="Id",type="date",JSONPath=".metadata.namespace"

Review comment:
       hi, i'm busy now just after the national vocation -,-.
   i will update my code latter.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-927259102


   @tao12345666333 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-977796912


   @tokers 
   hi,i'm ready.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 merged pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 merged pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975313955


   @tao12345666333 
   plz review it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-976112800


   @tao12345666333 
   hi, plz review it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase edited a comment on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase edited a comment on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975209496


   I forgot the license header, lol.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r754017831



##########
File path: samples/deploy/crd/v1/ApisixPluginConfig.yaml
##########
@@ -0,0 +1,64 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: apiextensions.k8s.io/v1beta1

Review comment:
       We have upgraded its version to v1, please upgrade it. #693 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r755638329



##########
File path: pkg/kube/apisix/apis/config/v2beta2/types.go
##########
@@ -195,3 +195,40 @@ type ApisixRouteList struct {
 	metav1.ListMeta `json:"metadata" yaml:"metadata"`
 	Items           []ApisixRoute `json:"items,omitempty" yaml:"items,omitempty"`
 }
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+
+// ApisixPluginConfig is the Schema for the ApisixPluginConfig resource.
+// An ApisixPluginConfig is used to support a group of plugin configs
+type ApisixPluginConfig struct {
+	metav1.TypeMeta   `json:",inline" yaml:",inline"`
+	metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
+
+	// Spec defines the desired state of ApisixPluginConfigSpec.
+	Spec   ApisixPluginConfigSpec `json:"spec" yaml:"spec"`
+	Status v2alpha1.ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`
+}
+
+// ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec.
+type ApisixPluginConfigSpec struct {
+	// +kubebuilder:validation:MinLength=1
+	Desc string `json:"desc,omitempty" yaml:"desc,omitempty"`

Review comment:
       But we don't have such field for other objects, and so far no users report such demands, so I doubt the necessity of it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r754173264



##########
File path: pkg/kube/apisix/apis/config/v2beta2/types.go
##########
@@ -195,3 +195,40 @@ type ApisixRouteList struct {
 	metav1.ListMeta `json:"metadata" yaml:"metadata"`
 	Items           []ApisixRoute `json:"items,omitempty" yaml:"items,omitempty"`
 }
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+
+// ApisixPluginConfig is the Schema for the ApisixPluginConfig resource.
+// An ApisixPluginConfig is used to support a group of plugin configs
+type ApisixPluginConfig struct {
+	metav1.TypeMeta   `json:",inline" yaml:",inline"`
+	metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
+
+	// Spec defines the desired state of ApisixPluginConfigSpec.
+	Spec   ApisixPluginConfigSpec `json:"spec" yaml:"spec"`
+	Status v2alpha1.ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`

Review comment:
       I ignored it before, i will update after next commit




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] codecov-commenter commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975209082


   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#694](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e84d7d4) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/9f2cd7f856f1879ae2586f2a84f4f39d2654996d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9f2cd7f) will **decrease** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head e84d7d4 differs from pull request most recent head b34b001. Consider uploading reports for the commit b34b001 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #694      +/-   ##
   ==========================================
   - Coverage   32.59%   32.58%   -0.01%     
   ==========================================
     Files          66       65       -1     
     Lines        6780     6779       -1     
   ==========================================
   - Hits         2210     2209       -1     
     Misses       4321     4321              
     Partials      249      249              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9lMmUvZTJlLmdv) | | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9f2cd7f...b34b001](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-977577163


   ping @gxthrj 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975209082


   # [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#694](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e1c0e3f) into [master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/9f2cd7f856f1879ae2586f2a84f4f39d2654996d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9f2cd7f) will **decrease** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #694      +/-   ##
   ==========================================
   - Coverage   32.59%   32.58%   -0.01%     
   ==========================================
     Files          66       65       -1     
     Lines        6780     6779       -1     
   ==========================================
   - Hits         2210     2209       -1     
     Misses       4321     4321              
     Partials      249      249              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9lMmUvZTJlLmdv) | | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9f2cd7f...e1c0e3f](https://codecov.io/gh/apache/apisix-ingress-controller/pull/694?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-976148821


   @tao12345666333 
   I had fixed the lint error about my commits
   ```sh
   golangci-lint run
   pkg/kube/apisix/apis/config/v2beta2/types.go:211: File is not `gofmt`-ed with `-s` (gofmt)
   	Status ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`
   pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
   	"github.com/apache/apisix-ingress-controller/pkg/metrics"
   pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
   	"github.com/apache/apisix-ingress-controller/pkg/metrics"
   ```
   But there were still some errors left:
   ```sh
   golangci-lint run
   pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
   	"github.com/apache/apisix-ingress-controller/pkg/metrics"
   pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
   	"github.com/apache/apisix-ingress-controller/pkg/metrics"
   ```
   Maybe this caused by my latest golangci-lint
   `golangci-lint has version 1.42.1 built from 54f4301 on 2021-09-04T14:39:09Z`
   so what could I do to fix it or just ignore it
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-941965200


   @neverCase  any update?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-957058525


   @tao12345666333  hi, i had run the `make codegen` and `make lint`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-957058525


   @tao12345666333  hi, i had run the `make codegen` and `make lint`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r754022404



##########
File path: samples/deploy/crd/v1/ApisixPluginConfig.yaml
##########
@@ -0,0 +1,64 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: apiextensions.k8s.io/v1beta1

Review comment:
       > We have upgraded its version to v1, please upgrade it. #693
   ok
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975221752


   > 
   
   Never mind.
   I will update right now


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-975209496


   I forget the license header, lol.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r755929378



##########
File path: samples/deploy/crd/v1/ApisixPluginConfig.yaml
##########
@@ -0,0 +1,90 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  name: apisixpluginconfigs.apisix.apache.org
+spec:
+  group: apisix.apache.org
+  scope: Namespaced
+  names:
+    plural: apisixpluginconfigs
+    singular: apisixpluginconfig
+    kind: ApisixPluginConfig
+    shortNames:
+      - apc
+  versions:
+    - name: v2beta2
+      served: true
+      storage: true
+      subresources:
+        status: {}
+      additionalPrinterColumns:
+        - jsonPath: .spec.desc
+          name: Desc
+          type: string
+          priority: 0
+        - jsonPath: .metadata.creationTimestamp
+          name: Age
+          type: date
+          priority: 0
+      schema:
+        openAPIV3Schema:
+          type: object
+          properties:
+            spec:
+              type: object
+              required:
+                - plugins
+              properties:
+                desc:

Review comment:
       And remove this one.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-977764516


   @neverCase  There is no problem overall, please delete the desc field and run `make codegen` again. Then we can merge this PR. Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase edited a comment on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase edited a comment on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-977787567


   > @neverCase There is no problem overall, please delete the desc field and run `make codegen` again. Then we can merge this PR. Thanks!
   
   @tao12345666333 
   ok, one minute


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-976123911


   #746 is deleting v1 and v2alpha1, so we don't need to keep these two versions in the CRD definition.
   
   In addition, please fix the lint error. Thanks!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r754173264



##########
File path: pkg/kube/apisix/apis/config/v2beta2/types.go
##########
@@ -195,3 +195,40 @@ type ApisixRouteList struct {
 	metav1.ListMeta `json:"metadata" yaml:"metadata"`
 	Items           []ApisixRoute `json:"items,omitempty" yaml:"items,omitempty"`
 }
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+
+// ApisixPluginConfig is the Schema for the ApisixPluginConfig resource.
+// An ApisixPluginConfig is used to support a group of plugin configs
+type ApisixPluginConfig struct {
+	metav1.TypeMeta   `json:",inline" yaml:",inline"`
+	metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
+
+	// Spec defines the desired state of ApisixPluginConfigSpec.
+	Spec   ApisixPluginConfigSpec `json:"spec" yaml:"spec"`
+	Status v2alpha1.ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`

Review comment:
       I ignored it before, i will update with the next commit




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r755927851



##########
File path: pkg/kube/apisix/apis/config/v2beta2/types.go
##########
@@ -195,3 +195,40 @@ type ApisixRouteList struct {
 	metav1.ListMeta `json:"metadata" yaml:"metadata"`
 	Items           []ApisixRoute `json:"items,omitempty" yaml:"items,omitempty"`
 }
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+
+// ApisixPluginConfig is the Schema for the ApisixPluginConfig resource.
+// An ApisixPluginConfig is used to support a group of plugin configs
+type ApisixPluginConfig struct {
+	metav1.TypeMeta   `json:",inline" yaml:",inline"`
+	metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
+
+	// Spec defines the desired state of ApisixPluginConfigSpec.
+	Spec   ApisixPluginConfigSpec `json:"spec" yaml:"spec"`
+	Status v2alpha1.ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`
+}
+
+// ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec.
+type ApisixPluginConfigSpec struct {
+	// +kubebuilder:validation:MinLength=1
+	Desc string `json:"desc,omitempty" yaml:"desc,omitempty"`

Review comment:
       If we look at it from the point of view of consistency with other resources, we really don’t need to keep it.
   
   @neverCase could you please remove this field?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase edited a comment on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase edited a comment on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-973810404


   - [x] Add ApisixPluginConfig custom resource. Only need to modify YAML.
   - [x] Add ApisixPluginConfig data structures.
   - [x] Add client implementation to interact with Apache APISIX.
   - [ ] Add ApisixPluginConfig translator, it can convert ApisixPluginConfig data structure into APISIX.
   - [ ] Add ApisixPluginConfig controller loop, It watches the ApisixPluginConfig resource in the Kubernetes cluster and converts it to the ApisixPluginConfig data structure.
   - [ ] Add docs to describe it.
   
   I had add client implementation in the early commit.
   Now what i need to do is adding ApisixPluginConfig translator


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-955239263


   Just run make codegen
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r727737286



##########
File path: pkg/kube/apisix/apis/config/v1alpha1/types.go
##########
@@ -0,0 +1,47 @@
+package v1alpha1
+
+import (
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2alpha1"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+// +kubebuilder:object:generate=true
+// +kubebuilder:printcolumn:name="Id",type="date",JSONPath=".metadata.namespace"

Review comment:
       the type is incorrect




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r727799807



##########
File path: pkg/kube/apisix/apis/config/v1alpha1/types.go
##########
@@ -0,0 +1,47 @@
+package v1alpha1
+
+import (
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2alpha1"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+// +kubebuilder:object:generate=true
+// +kubebuilder:printcolumn:name="Id",type="date",JSONPath=".metadata.namespace"

Review comment:
       hi, i'm busy now just after the national vocation -,-.
   i will update my code later.

##########
File path: pkg/kube/apisix/apis/config/v1alpha1/types.go
##########
@@ -0,0 +1,47 @@
+package v1alpha1
+
+import (
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+	"github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2alpha1"
+)
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+// +kubebuilder:object:generate=true
+// +kubebuilder:printcolumn:name="Id",type="date",JSONPath=".metadata.namespace"

Review comment:
       hi, i'm busy now just after the national vocation -,-.
   i will update my code latter.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-947513337


   @tao12345666333  hi, i'm back.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-957058525


   @tao12345666333  hi, i had run the `make codegen` and `make lint`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tokers commented on a change in pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#discussion_r754163982



##########
File path: pkg/kube/apisix/apis/config/v2beta2/types.go
##########
@@ -195,3 +195,40 @@ type ApisixRouteList struct {
 	metav1.ListMeta `json:"metadata" yaml:"metadata"`
 	Items           []ApisixRoute `json:"items,omitempty" yaml:"items,omitempty"`
 }
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+
+// ApisixPluginConfig is the Schema for the ApisixPluginConfig resource.
+// An ApisixPluginConfig is used to support a group of plugin configs
+type ApisixPluginConfig struct {
+	metav1.TypeMeta   `json:",inline" yaml:",inline"`
+	metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
+
+	// Spec defines the desired state of ApisixPluginConfigSpec.
+	Spec   ApisixPluginConfigSpec `json:"spec" yaml:"spec"`
+	Status v2alpha1.ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`

Review comment:
       I think the reference from `v2beta2` to `v2alpha1` is not so elegant. Of course it doesn't affect this PR's review.
   
   cc @tao12345666333 .

##########
File path: samples/deploy/crd/v1/ApisixPluginConfig.yaml
##########
@@ -0,0 +1,270 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  name: apisixpluginconfigs.apisix.apache.org
+spec:
+  group: apisix.apache.org
+  scope: Namespaced
+  names:
+    plural: apisixpluginconfigs
+    singular: apisixpluginconfig
+    kind: ApisixPluginConfig
+    shortNames:
+      - apc
+  versions:
+    - name: v1
+      served: true
+      storage: false
+      deprecated: true
+      subresources:
+        status: {}
+      additionalPrinterColumns:
+        - jsonPath: .spec.desc
+          name: Desc
+          type: string
+          priority: 0
+        - jsonPath: .metadata.creationTimestamp
+          name: Age
+          type: date
+          priority: 0
+      schema:
+        openAPIV3Schema:
+          type: object
+          properties:
+            spec:
+              type: object
+              required:
+                - plugins
+              properties:
+                desc:
+                  type: string
+                  minLength: 1
+                plugins:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      name:
+                        type: string
+                        minLength: 1
+                      enable:
+                        type: boolean
+                      config:
+                        type: object
+                  required:
+                    - name
+                    - enable
+            status:
+              type: object
+              properties:
+                conditions:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      "type":
+                        type: string
+                      reason:
+                        type: string
+                      status:
+                        type: string
+                      message:
+                        type: string
+                      observedGeneration:
+                        type: integer
+    - name: v2alpha1
+      served: true
+      storage: false
+      deprecated: true
+      subresources:
+        status: {}
+      additionalPrinterColumns:
+        - jsonPath: .spec.desc
+          name: Desc
+          type: string
+          priority: 0
+        - jsonPath: .metadata.creationTimestamp
+          name: Age
+          type: date
+          priority: 0
+      schema:
+        openAPIV3Schema:
+          type: object
+          properties:
+            spec:
+              type: object
+              required:
+                - plugins
+              properties:
+                desc:
+                  type: string
+                  minLength: 1
+                plugins:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      name:
+                        type: string
+                        minLength: 1
+                      enable:
+                        type: boolean
+                      config:
+                        type: object
+                  required:
+                    - name
+                    - enable
+            status:
+              type: object
+              properties:
+                conditions:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      "type":
+                        type: string
+                      reason:
+                        type: string
+                      status:
+                        type: string
+                      message:
+                        type: string
+                      observedGeneration:
+                        type: integer
+    - name: v2beta1
+      served: true
+      storage: false
+      deprecated: true
+      subresources:
+        status: {}
+      additionalPrinterColumns:
+        - jsonPath: .spec.desc
+          name: Desc
+          type: string
+          priority: 0
+        - jsonPath: .metadata.creationTimestamp
+          name: Age
+          type: date
+          priority: 0
+      schema:
+        openAPIV3Schema:
+          type: object
+          properties:
+            spec:
+              type: object
+              required:
+                - plugins
+              properties:
+                desc:
+                  type: string
+                  minLength: 1
+                plugins:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      name:
+                        type: string
+                        minLength: 1
+                      enable:
+                        type: boolean
+                      config:
+                        type: object
+                  required:
+                    - name
+                    - enable
+            status:
+              type: object
+              properties:
+                conditions:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      "type":
+                        type: string
+                      reason:
+                        type: string
+                      status:
+                        type: string
+                      message:
+                        type: string
+                      observedGeneration:
+                        type: integer
+    - name: v2beta2
+      served: true
+      storage: true
+      subresources:
+        status: {}
+      additionalPrinterColumns:
+        - jsonPath: .spec.desc
+          name: Desc
+          type: string
+          priority: 0
+        - jsonPath: .metadata.creationTimestamp
+          name: Age
+          type: date
+          priority: 0
+      schema:
+        openAPIV3Schema:
+          type: object
+          properties:
+            spec:
+              type: object
+              required:
+                - plugins
+              properties:
+                desc:
+                  type: string
+                  minLength: 1
+                plugins:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      name:
+                        type: string
+                        minLength: 1
+                      enable:
+                        type: boolean
+                      config:
+                        type: object
+                  required:
+                    - name
+                    - enable
+            status:
+              type: object
+              properties:
+                conditions:
+                  type: array
+                  items:
+                    type: object
+                    properties:
+                      "type":
+                        type: string
+                      reason:
+                        type: string
+                      status:
+                        type: string
+                      message:
+                        type: string
+                      observedGeneration:
+                        type: integer

Review comment:
       Please add the EOL symbol.

##########
File path: samples/deploy/crd/v1/ApisixPluginConfig.yaml
##########
@@ -0,0 +1,270 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  name: apisixpluginconfigs.apisix.apache.org
+spec:
+  group: apisix.apache.org
+  scope: Namespaced
+  names:
+    plural: apisixpluginconfigs
+    singular: apisixpluginconfig
+    kind: ApisixPluginConfig
+    shortNames:
+      - apc
+  versions:
+    - name: v1

Review comment:
       Shall we keep the old `v1` version for new objects?

##########
File path: pkg/kube/apisix/apis/config/v2beta2/types.go
##########
@@ -195,3 +195,40 @@ type ApisixRouteList struct {
 	metav1.ListMeta `json:"metadata" yaml:"metadata"`
 	Items           []ApisixRoute `json:"items,omitempty" yaml:"items,omitempty"`
 }
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +kubebuilder:subresource:status
+
+// ApisixPluginConfig is the Schema for the ApisixPluginConfig resource.
+// An ApisixPluginConfig is used to support a group of plugin configs
+type ApisixPluginConfig struct {
+	metav1.TypeMeta   `json:",inline" yaml:",inline"`
+	metav1.ObjectMeta `json:"metadata" yaml:"metadata"`
+
+	// Spec defines the desired state of ApisixPluginConfigSpec.
+	Spec   ApisixPluginConfigSpec `json:"spec" yaml:"spec"`
+	Status v2alpha1.ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`
+}
+
+// ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec.
+type ApisixPluginConfigSpec struct {
+	// +kubebuilder:validation:MinLength=1
+	Desc string `json:"desc,omitempty" yaml:"desc,omitempty"`

Review comment:
       Is this necessary? The `Desc` for the underlying `plugin_config` object is used for the management purpose, I think it's not useful for users, they can add descriptions from the annotations.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tao12345666333 commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-977834008


   wait for CI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] tokers commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
tokers commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-976331016


   > @tao12345666333 I had fixed the lint error about my commits
   > 
   > ```shell
   > golangci-lint run
   > pkg/kube/apisix/apis/config/v2beta2/types.go:211: File is not `gofmt`-ed with `-s` (gofmt)
   > 	Status ApisixStatus  `json:"status,omitempty" yaml:"status,omitempty"`
   > pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
   > 	"github.com/apache/apisix-ingress-controller/pkg/metrics"
   > pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
   > 	"github.com/apache/apisix-ingress-controller/pkg/metrics"
   > ```
   > 
   > But there were still some errors left:
   > 
   > ```shell
   > golangci-lint run
   > pkg/apisix/plugin_test.go:25: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
   > 	"github.com/apache/apisix-ingress-controller/pkg/metrics"
   > pkg/apisix/schema_test.go:24: File is not `goimports`-ed with -local github.com/apache/apisix-ingress-controller (goimports)
   > 	"github.com/apache/apisix-ingress-controller/pkg/metrics"
   > ```
   > 
   > Maybe this caused by my latest golangci-lint `golangci-lint has version 1.42.1 built from 54f4301 on 2021-09-04T14:39:09Z` so what could I do to fix it or just ignore it
   
   If it's reported by the lint tool, let's fix it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-ingress-controller] neverCase commented on pull request #694: feat: init ApisixPluginConfig crd #4 (#638)

Posted by GitBox <gi...@apache.org>.
neverCase commented on pull request #694:
URL: https://github.com/apache/apisix-ingress-controller/pull/694#issuecomment-973810404


   - [x] Add ApisixPluginConfig custom resource. Only need to modify YAML.
   - [x] Add ApisixPluginConfig data structures.
   - [ ] Add client implementation to interact with Apache APISIX.
   - [ ] Add ApisixPluginConfig translator, it can convert ApisixPluginConfig data structure into APISIX.
   - [ ] Add ApisixPluginConfig controller loop, It watches the ApisixPluginConfig resource in the Kubernetes cluster and converts it to the ApisixPluginConfig data structure.
   - [ ] Add docs to describe it.
   
   I will add client implementation to interact with Apache APISIX later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org