Skip to content

Commit

Permalink
update tags
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
  • Loading branch information
fjogeleit committed Sep 28, 2024
1 parent 3047d63 commit 99afcdb
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 23 deletions.
2 changes: 1 addition & 1 deletion charts/policy-reporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: |
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
type: application
version: 3.0.0-beta.17
version: 3.0.0-beta.18
appVersion: 3.0.0-beta

icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png
Expand Down
6 changes: 3 additions & 3 deletions charts/policy-reporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Policy Reporter watches for PolicyReport Resources.
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord

![Version: 3.0.0-beta.17](https://img.shields.io/badge/Version-3.0.0--beta.17-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0-beta](https://img.shields.io/badge/AppVersion-3.0.0--beta-informational?style=flat-square)
![Version: 3.0.0-beta.18](https://img.shields.io/badge/Version-3.0.0--beta.18-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0-beta](https://img.shields.io/badge/AppVersion-3.0.0--beta-informational?style=flat-square)

## Documentation

Expand Down Expand Up @@ -56,7 +56,7 @@ Check the [Documentation](https://kyverno.github.io/policy-reporter/guide/02-get
| image.registry | string | `"ghcr.io"` | |
| image.repository | string | `"kyverno/policy-reporter"` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.tag | string | `"2d66b8d"` | |
| image.tag | string | `"3047d63"` | |
| imagePullSecrets | list | `[]` | |
| priorityClassName | string | `""` | |
| replicaCount | int | `1` | |
Expand Down Expand Up @@ -416,7 +416,7 @@ Check the [Documentation](https://kyverno.github.io/policy-reporter/guide/02-get
| plugin.kyverno.image.registry | string | `"ghcr.io"` | Image registry |
| plugin.kyverno.image.repository | string | `"kyverno/policy-reporter/kyverno-plugin"` | Image repository |
| plugin.kyverno.image.pullPolicy | string | `"IfNotPresent"` | Image PullPolicy |
| plugin.kyverno.image.tag | string | `"0.2.0"` | Image tag Defaults to `Chart.AppVersion` if omitted |
| plugin.kyverno.image.tag | string | `"0.2.2"` | Image tag Defaults to `Chart.AppVersion` if omitted |
| plugin.kyverno.replicaCount | int | `1` | Deployment replica count |
| plugin.kyverno.logging.encoding | string | `"console"` | log encoding possible encodings are console and json |
| plugin.kyverno.logging.logLevel | int | `0` | log level default info |
Expand Down
4 changes: 2 additions & 2 deletions charts/policy-reporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
registry: ghcr.io
repository: kyverno/policy-reporter
pullPolicy: IfNotPresent
tag: 2d66b8d
tag: 3047d63

imagePullSecrets: []

Expand Down Expand Up @@ -1036,7 +1036,7 @@ plugin:
pullPolicy: IfNotPresent
# -- (string) Image tag
# Defaults to `Chart.AppVersion` if omitted
tag: "0.2.0"
tag: "0.2.2"

# -- Deployment replica count
replicaCount: 1
Expand Down
3 changes: 2 additions & 1 deletion pkg/email/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package email
import (
"context"

"go.uber.org/zap"

"github.com/kyverno/policy-reporter/pkg/kubernetes/namespaces"
"github.com/kyverno/policy-reporter/pkg/validate"
"go.uber.org/zap"
)

type Filter struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/kubernetes/secrets/informer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"sync"
"time"

"github.com/kyverno/policy-reporter/pkg/target"
"go.uber.org/zap"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/metadata"
"k8s.io/client-go/metadata/metadatainformer"
"k8s.io/client-go/tools/cache"

"github.com/kyverno/policy-reporter/pkg/target"
)

type Informer interface {
Expand Down
9 changes: 5 additions & 4 deletions pkg/kubernetes/secrets/informer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import (
"time"

"github.com/google/uuid"
"github.com/kyverno/policy-reporter/pkg/kubernetes/secrets"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/kyverno/policy-reporter/pkg/target/factory"
"github.com/kyverno/policy-reporter/pkg/target/webhook"
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
metafake "k8s.io/client-go/metadata/fake"

"github.com/kyverno/policy-reporter/pkg/kubernetes/secrets"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/kyverno/policy-reporter/pkg/target/factory"
"github.com/kyverno/policy-reporter/pkg/target/webhook"
)

func NewFakeMetaClient() (*metafake.FakeMetadataClient, metafake.MetadataClient) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/listener/cleanup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package listener_test
import (
"testing"

"github.com/stretchr/testify/assert"

"github.com/kyverno/policy-reporter/pkg/listener"
"github.com/kyverno/policy-reporter/pkg/report"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/stretchr/testify/assert"
)

func Test_CleanupListener(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/listener/new_result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import (
"testing"
"time"

"github.com/stretchr/testify/assert"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/kyverno/policy-reporter/pkg/cache"
"github.com/kyverno/policy-reporter/pkg/crd/api/policyreport/v1alpha2"
"github.com/kyverno/policy-reporter/pkg/fixtures"
"github.com/kyverno/policy-reporter/pkg/listener"
"github.com/kyverno/policy-reporter/pkg/report"
"github.com/stretchr/testify/assert"
)

func Test_ResultListener(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/listener/scope_results_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package listener_test
import (
"testing"

"github.com/stretchr/testify/assert"

"github.com/kyverno/policy-reporter/pkg/crd/api/policyreport/v1alpha2"
"github.com/kyverno/policy-reporter/pkg/fixtures"
"github.com/kyverno/policy-reporter/pkg/listener"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/stretchr/testify/assert"
)

func Test_ScopeResultsListener(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/listener/send_result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"context"
"testing"

"github.com/stretchr/testify/assert"

"github.com/kyverno/policy-reporter/pkg/crd/api/policyreport/v1alpha2"
"github.com/kyverno/policy-reporter/pkg/fixtures"
"github.com/kyverno/policy-reporter/pkg/listener"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/stretchr/testify/assert"
)

type client struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/target/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package target_test
import (
"testing"

"github.com/stretchr/testify/assert"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/kyverno/policy-reporter/pkg/crd/api/policyreport/v1alpha2"
"github.com/kyverno/policy-reporter/pkg/fixtures"
"github.com/kyverno/policy-reporter/pkg/report"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/kyverno/policy-reporter/pkg/validate"
"github.com/stretchr/testify/assert"
)

var preport = &v1alpha2.PolicyReport{
Expand Down
4 changes: 3 additions & 1 deletion pkg/target/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"context"
"sync"

"github.com/kyverno/policy-reporter/pkg/helper"
"go.uber.org/zap"

"github.com/kyverno/policy-reporter/pkg/helper"
)

type TargetType = string
Expand Down Expand Up @@ -95,6 +96,7 @@ func (c *Collection) SingleSendClients() []Client {
return c.Type() == SingleSend
})
}

func (c *Collection) SyncClients() []Client {
return helper.Filter(c.Clients(), func(c Client) bool {
return c.Type() == SyncSend
Expand Down
3 changes: 2 additions & 1 deletion pkg/target/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"testing"

"github.com/google/uuid"
"github.com/stretchr/testify/assert"

"github.com/kyverno/policy-reporter/pkg/target"
"github.com/kyverno/policy-reporter/pkg/target/discord"
"github.com/kyverno/policy-reporter/pkg/target/slack"
"github.com/kyverno/policy-reporter/pkg/target/webhook"
"github.com/stretchr/testify/assert"
)

func TestCollection(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/target/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package target_test
import (
"testing"

"github.com/stretchr/testify/assert"

"github.com/kyverno/policy-reporter/pkg/crd/api/policyreport/v1alpha2"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/stretchr/testify/assert"
)

func TestConfig(t *testing.T) {
Expand Down
6 changes: 4 additions & 2 deletions pkg/target/loki/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import (
"github.com/kyverno/policy-reporter/pkg/target/http"
)

var keyReplacer = strings.NewReplacer(".", "_", "]", "", "[", "")
var labelReplacer = strings.NewReplacer("/", "")
var (
keyReplacer = strings.NewReplacer(".", "_", "]", "", "[", "")
labelReplacer = strings.NewReplacer("/", "")
)

// Options to configure the Loki target
type Options struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/target/loki/loki_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import (
"strings"
"testing"

"github.com/stretchr/testify/assert"

"github.com/kyverno/policy-reporter/pkg/fixtures"
"github.com/kyverno/policy-reporter/pkg/target"
"github.com/kyverno/policy-reporter/pkg/target/loki"
"github.com/stretchr/testify/assert"
)

type testClient struct {
Expand Down

0 comments on commit 99afcdb

Please sign in to comment.