pkg/service/helper.go
Function buildEnvVars
has 60 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func buildEnvVars(forSidecar bool, c *core.Config, sv *core.ServiceFileData) []corev1.EnvVar {
proxyEnvs := []corev1.EnvVar{}
if len(c.KnativeProxyHTTP) > 0 {
proxyEnvs = append(proxyEnvs, corev1.EnvVar{
Function buildContainers
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func buildContainers(c *core.Config, sv *core.ServiceFileData) ([]corev1.Container, error) {
// set resource limits.
rl, err := buildResourceLimits(c, sv)
if err != nil {
return nil, err
Function buildService
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func buildService(c *core.Config, sv *core.ServiceFileData, registrySecrets []corev1.LocalObjectReference) (*servingv1.Service, error) {
containers, err := buildContainers(c, sv)
if err != nil {
return nil, err
}
Function buildResourceLimits
has 53 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func buildResourceLimits(cf *core.Config, sv *core.ServiceFileData) (*corev1.ResourceRequirements, error) {
var (
m int
c string
d int