Commit 8a3fd6f2 authored by Tim Leers's avatar Tim Leers

ci: run only if mr is open or on default branch

parent 1f04d820
...@@ -37,11 +37,13 @@ test: ...@@ -37,11 +37,13 @@ test:
image: golang:1.21 image: golang:1.21
stage: test stage: test
rules: rules:
- changes: - if: $CI_MERGE_REQUEST_ID
changes:
- cmd/**/*.go - cmd/**/*.go
- pkg/**/*.go - pkg/**/*.go
- go.mod - go.mod
- go.sum - go.sum
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
before_script: before_script:
- apt-get update -q - apt-get update -q
- apt-get install -y golang-golang-x-tools pandoc git - apt-get install -y golang-golang-x-tools pandoc git
......
...@@ -169,7 +169,6 @@ func NewIngressController( ...@@ -169,7 +169,6 @@ func NewIngressController(
incomplRetryDelay time.Duration, incomplRetryDelay time.Duration,
maxSyncRetries uint, maxSyncRetries uint,
) (*IngressController, error) { ) (*IngressController, error) {
ingc := IngressController{ ingc := IngressController{
log: log, log: log,
client: kubeClient, client: kubeClient,
...@@ -232,8 +231,7 @@ func NewIngressController( ...@@ -232,8 +231,7 @@ func NewIngressController(
} }
if namespace == api_v1.NamespaceAll { if namespace == api_v1.NamespaceAll {
ingc.informers.ns = ingc.informers.ns = infFactory.Core().V1().Namespaces().Informer()
infFactory.Core().V1().Namespaces().Informer()
nsDeleteFunc := cache.ResourceEventHandlerFuncs{ nsDeleteFunc := cache.ResourceEventHandlerFuncs{
DeleteFunc: ingc.deleteNs, DeleteFunc: ingc.deleteNs,
} }
...@@ -351,7 +349,7 @@ func (ingc *IngressController) updateObj(old, new interface{}) { ...@@ -351,7 +349,7 @@ func (ingc *IngressController) updateObj(old, new interface{}) {
kind := "Unknown" kind := "Unknown"
switch old.(type) { switch old.(type) {
case *net_v1.Ingress: case *net_v1.Ingress:
kind = "Ingress" kind = "Ingresse"
case *net_v1.IngressClass: case *net_v1.IngressClass:
kind = "IngressClass" kind = "IngressClass"
case *api_v1.Service: case *api_v1.Service:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment