Skip to content

Commit

Permalink
fix some comments (#9688)
Browse files Browse the repository at this point in the history
Signed-off-by: cui fliter <[email protected]>
  • Loading branch information
cuishuang authored Mar 5, 2023
1 parent 640bdac commit 82e836f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/developer-guide/code-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Describe here `kubectl plugin`, `dbg`, `waitshutdown` and cover the hack scripts

### kubectl plugin

It containes kubectl plugin for inspecting your ingress-nginx deployments.
It contains kubectl plugin for inspecting your ingress-nginx deployments.
This part of code can be found in [cmd/plugin](https://github.com/kubernetes/ingress-nginx/tree/main/cmd/plugin) directory
Detail functions flow and available flow can be found in [kubectl-plugin](https://github.com/kubernetes/ingress-nginx/blob/main/docs/kubectl-plugin.md)

Expand Down
2 changes: 1 addition & 1 deletion images/kube-webhook-certgen/rootfs/pkg/k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (k8s *k8s) patchAPIService(ctx context.Context, objectName string, ca []byt
return nil
}

// PatchWebhookConfigurations will patch validatingWebhook and mutatingWebhook clientConfig configurations with
// patchWebhookConfigurations will patch validatingWebhook and mutatingWebhook clientConfig configurations with
// the provided ca data. If failurePolicy is provided, patch all webhooks with this value
func (k8s *k8s) patchWebhookConfigurations(
ctx context.Context,
Expand Down
2 changes: 1 addition & 1 deletion internal/ingress/controller/endpointslices.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"k8s.io/ingress-nginx/pkg/apis/ingress"
)

// getEndpoints returns a list of Endpoint structs for a given service/target port combination.
// getEndpointsFromSlices returns a list of Endpoint structs for a given service/target port combination.
func getEndpointsFromSlices(s *corev1.Service, port *corev1.ServicePort, proto corev1.Protocol, zoneForHints string,
getServiceEndpointsSlices func(string) ([]*discoveryv1.EndpointSlice, error)) []ingress.Endpoint {

Expand Down
2 changes: 1 addition & 1 deletion internal/ingress/controller/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,7 @@ func buildServerName(hostname string) string {
return `~^(?<subdomain>[\w-]+)\.` + strings.Join(parts, "\\.") + `$`
}

// parseComplexNGINXVar parses things like "$my${complex}ngx\$var" into
// parseComplexNginxVarIntoLuaTable parses things like "$my${complex}ngx\$var" into
// [["$var", "complex", "my", "ngx"]]. In other words, 2nd and 3rd elements
// in the result are actual NGINX variable names, whereas first and 4th elements
// are string literals.
Expand Down
7 changes: 4 additions & 3 deletions magefiles/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ package main

import (
"fmt"
"os"
"strings"

semver "github.com/blang/semver/v4"
"github.com/helm/helm/pkg/chartutil"
"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"
yamlpath "github.com/vmware-labs/yaml-jsonpath/pkg/yamlpath"
"gopkg.in/yaml.v3"
"os"
"strings"
)

const HelmChartPath = "charts/ingress-nginx/Chart.yaml"
Expand Down Expand Up @@ -114,7 +115,7 @@ func UpdateChartChangelog() {

}

// UpdateAppVersion Updates the Helm App Version of Ingress Nginx Controller
// UpdateChartValue Updates the Helm ChartValue
func (Helm) UpdateChartValue(key, value string) {
updateChartValue(key, value)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/ingress/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func GetRemovedHosts(rucfg, newcfg *ingress.Configuration) []string {
return oldSet.Difference(newSet).List()
}

// GetRemovedCertificateSerialNumber extracts the difference of certificates between two configurations
// GetRemovedCertificateSerialNumbers extracts the difference of certificates between two configurations
func GetRemovedCertificateSerialNumbers(rucfg, newcfg *ingress.Configuration) []string {
oldCertificates := sets.NewString()
newCertificates := sets.NewString()
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/settings/ssl_passthrough.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var _ = framework.IngressNginxDescribe("[Flag] enable-ssl-passthrough", func() {
host := "testpassthrough.com"
echoName := "echopass"

/* Even with enable-ssl-passthrough enabled, only annotated ingresses may receive the trafic */
/* Even with enable-ssl-passthrough enabled, only annotated ingresses may receive the traffic */
annotations := map[string]string{
"nginx.ingress.kubernetes.io/ssl-passthrough": "true",
}
Expand Down

0 comments on commit 82e836f

Please sign in to comment.