-
Notifications
You must be signed in to change notification settings - Fork 345
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
feat: support TLS #95
Conversation
@gxthrj Please resolve the conflicts. |
resolved |
Codecov Report
@@ Coverage Diff @@
## master #95 +/- ##
==========================================
+ Coverage 58.28% 59.73% +1.44%
==========================================
Files 15 16 +1
Lines 501 524 +23
==========================================
+ Hits 292 313 +21
- Misses 185 187 +2
Partials 24 24
Continue to review full report at Codecov.
|
cmd/ingress/ingress.go
Outdated
@@ -102,6 +102,8 @@ func NewIngressCommand() *cobra.Command { | |||
c.ApisixUpstream() | |||
// ApisixService | |||
c.ApisixService() | |||
// ApisixTls | |||
c.ApisixTls() |
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.
What about c.ApisixTLS
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.
Done, change the method name to ApisixTLS
pkg/ingress/apisix/tls.go
Outdated
|
||
type ApisixTlsCRD ingress.ApisixTls | ||
|
||
// Convert convert to apisix.Service from ingress.ApisixService CRD |
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.
The comment is not right.
Should be:
// Convert convert to apisix.Ssl from ingress.ApisixTls CRD
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.
Done
pkg/ingress/apisix/tls_test.go
Outdated
"github.com/stretchr/testify/assert" | ||
"gopkg.in/yaml.v2" | ||
"k8s.io/api/core/v1" | ||
"testing" |
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.
Standard packages should be put at the beginning of import block.
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.
Done
pkg/ingress/controller/apisix_tls.go
Outdated
|
||
func (c *ApisixTlsController) Run(stop <-chan struct{}) error { | ||
if ok := cache.WaitForCacheSync(stop); !ok { | ||
glog.Errorf("sync ApisixService cache failed") |
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.
Since we have the pkg/log
, we should no longer use glog.
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.
Done
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: apisixtlses.apisix.apache.org |
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.
I am not sure whether the es
suffix is right. If singular and plural homographs, use apisixtls.apisix.apache.org
.
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.
It is the requirement of CRD , requires to be plural.
related #52