Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shalberd committed Aug 2, 2024
1 parent f43743b commit 57ad671
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (r *OpenshiftNotebookReconciler) ReconcileAllNetworkPolicies(notebook *nbv1
log := r.Log.WithValues("notebook", notebook.Name, "namespace", notebook.Namespace)

// Generate the desired Network Policies
desiredNotebookNetworkPolicy := NewNotebookNetworkPolicy(notebook, log)
desiredNotebookNetworkPolicy := NewNotebookNetworkPolicy(notebook, log, namespace: r.Namespace)

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in argument list

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in argument list

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in argument list

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in argument list

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in argument list

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in argument list

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in argument list

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in argument list

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / govulncheck (components/odh-notebook-controller)

missing ',' in argument list

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / govulncheck (components/odh-notebook-controller)

undefined: namespace

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / govulncheck (components/odh-notebook-controller)

r.Namespace undefined (type *OpenshiftNotebookReconciler has no field or method Namespace)

Check failure on line 46 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / golangci-lint (components/odh-notebook-controller)

missing ',' in argument list (typecheck)

// Create Network Policies if they do not already exist
err := r.reconcileNetworkPolicy(desiredNotebookNetworkPolicy, ctx, notebook)
Expand Down Expand Up @@ -128,9 +128,8 @@ func CompareNotebookNetworkPolicies(np1 netv1.NetworkPolicy, np2 netv1.NetworkPo
}

// NewNotebookNetworkPolicy defines the desired network policy for Notebook port
func NewNotebookNetworkPolicy(notebook *nbv1.Notebook, log logr.Logger) *netv1.NetworkPolicy {
func NewNotebookNetworkPolicy(notebook *nbv1.Notebook, log logr.Logger, namespace: string) *netv1.NetworkPolicy {

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

mixed named and unnamed parameters

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in parameter list

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

mixed named and unnamed parameters

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in parameter list

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

mixed named and unnamed parameters

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in parameter list

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

mixed named and unnamed parameters

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in parameter list

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

mixed named and unnamed parameters

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in parameter list

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

mixed named and unnamed parameters

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / build

missing ',' in parameter list

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / govulncheck (components/odh-notebook-controller)

mixed named and unnamed parameters

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / govulncheck (components/odh-notebook-controller)

missing ',' in parameter list

Check failure on line 131 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / golangci-lint (components/odh-notebook-controller)

missing ',' in parameter list (typecheck)
npProtocol := corev1.ProtocolTCP
namespace, err := getControllerNamespace()
if err != nil {

Check failure on line 133 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / govulncheck (components/odh-notebook-controller)

undefined: err
log.Error(err, "Get controller / main namespace error, not creating NetworkPolicy resource that allows all ingress traffic to the oauth port of a notebook from main namespace")

Check failure on line 134 in components/odh-notebook-controller/controllers/notebook_network.go

View workflow job for this annotation

GitHub Actions / govulncheck (components/odh-notebook-controller)

undefined: err
return nil
Expand Down

0 comments on commit 57ad671

Please sign in to comment.