portainer/portainer

View on GitHub
api/exec/kubernetes_deploy.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function NewKubernetesDeployer has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

func NewKubernetesDeployer(kubernetesTokenCacheManager *kubernetes.TokenCacheManager, kubernetesClientFactory *cli.ClientFactory, datastore dataservices.DataStore, reverseTunnelService portainer.ReverseTunnelService, signatureService portainer.DigitalSignatureService, proxyManager *proxy.Manager, binaryPath string) *KubernetesDeployer {
Severity: Major
Found in api/exec/kubernetes_deploy.go - About 50 mins to fix

    Method KubernetesDeployer.getToken has 7 return statements (exceeds 4 allowed).
    Open

    func (deployer *KubernetesDeployer) getToken(userID portainer.UserID, endpoint *portainer.Endpoint, setLocalAdminToken bool) (string, error) {
        kubeCLI, err := deployer.kubernetesClientFactory.GetKubeClient(endpoint)
        if err != nil {
            return "", err
        }
    Severity: Major
    Found in api/exec/kubernetes_deploy.go - About 45 mins to fix

      Method KubernetesDeployer.command has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func (deployer *KubernetesDeployer) command(operation string, userID portainer.UserID, endpoint *portainer.Endpoint, manifestFiles []string, namespace string) (string, error) {
      Severity: Minor
      Found in api/exec/kubernetes_deploy.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status