Skip to content

Commit 46c1269

Browse files
authored
Merge pull request #422 from derailed/rel_v0.21.7
Rel v0.21.7
2 parents 088ee40 + 1a2e75c commit 46c1269

File tree

20 files changed

+242
-176
lines changed

20 files changed

+242
-176
lines changed

.goreleaser.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ builds:
2020
goarch:
2121
- amd64
2222
- arm64
23-
- arm
23+
# - arm
2424
- ppc64le
2525
- s390x
26-
goarm:
27-
- 7
26+
# goarm:
27+
# - 7
2828
flags:
2929
- -trimpath
3030
ldflags:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NAME := popeye
22
PACKAGE := github.com/derailed/$(NAME)
3-
VERSION := v0.21.6
3+
VERSION := v0.21.7
44
GIT := $(shell git rev-parse --short HEAD)
55
DATE := $(shell date +%FT%T%Z)
66
IMG_NAME := derailed/popeye

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ Popeye is a readonly tool, it does not alter any of your Kubernetes resources in
1818

1919
[![Go Report Card](https://goreportcard.com/badge/github.com/derailed/popeye?)](https://goreportcard.com/report/github.com/derailed/popeye)
2020
[![codebeat badge](https://codebeat.co/badges/827e5642-3ccc-4ecc-b22b-5707dbc34cf1)](https://codebeat.co/projects/github-com-derailed-popeye-master)
21-
[![Build Status](https://travis-ci.com/derailed/popeye.svg?branch=master)](https://travis-ci.com/derailed/popeye)
2221
[![release](https://img.shields.io/github/release-pre/derailed/popeye.svg)](https://github.com/derailed/popeye/releases)
23-
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/derailed/popeye/blob/master/LICENSE)
24-
[![docker](https://img.shields.io/docker/cloud/build/derailed/popeye?label=Docker&style=flat)](https://hub.docker.com/r/derailed/popeye/builds)
22+
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/derailed/popeye/blob/master/LICENSE)x
23+
[![Docker Repository on Quay](https://quay.io/repository/derailed/popeye/status "Docker Repository on Quay")](https://quay.io/repository/derailed/popeye)
2524
![GitHub stars](https://img.shields.io/github/stars/derailed/popeye.svg?label=github%20stars)
2625
[![Releases](https://img.shields.io/github/downloads/derailed/popeye/total.svg)]()
2726

@@ -274,12 +273,12 @@ popeye --s3-bucket=NAME-OF-YOUR-S3-BUCKET/OPTIONAL/SUBDIRECTORY --s3-region YOUR
274273
275274
## Docker Support
276275
277-
You can also run Popeye in a container by running it directly from the official docker repo on DockerHub.
276+
You can also run Popeye in a container by running it directly from the official docker repo on Quay.
278277
The default command when you run the docker container is `popeye`, so you customize the scan by using the supported cli flags.
279278
To access your clusters, map your local kubeconfig directory into the container with `-v` :
280279
281280
```shell
282-
docker run --rm -it -v $HOME/.kube:/root/.kube derailed/popeye --context foo -n bar
281+
docker run --rm -it -v $HOME/.kube:/root/.kube quay.io/derailed/popeye --context foo -n bar
283282
```
284283
285284
Running the above docker command with `--rm` means that the container gets deleted when Popeye exits.
@@ -293,7 +292,7 @@ docker run --rm -it \
293292
-v $HOME/.kube:/root/.kube \
294293
-e POPEYE_REPORT_DIR=/tmp/popeye \
295294
-v /tmp:/tmp \
296-
derailed/popeye --context foo -n bar --save --output-file my_report.txt
295+
quay.io/derailed/popeye --context foo -n bar --save --output-file my_report.txt
297296
298297
# Docker has exited, and the container has been deleted, but the file
299298
# is in your /tmp directory because you mapped it into the container

change_logs/release_v0.21.7.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<img src="https://raw.githubusercontent.com/derailed/popeye/master/assets/popeye_logo.png" align="right" width="200" height="auto"/>
2+
3+
# Release v0.21.7
4+
5+
## Notes
6+
7+
Thank you to all that contributed with flushing out issues and enhancements for Popeye! I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev and see if we're happier with some of the fixes! If you've filed an issue please help me verify and close. Your support, kindness and awesome suggestions to make Popeye better is as ever very much noticed and appreciated!
8+
9+
This project offers a GitHub Sponsor button (over here 👆). As you well know this is not pimped out by big corps with deep pockets. If you feel `Popeye` is saving you cycles diagnosing potential cluster issues please consider sponsoring this project!! It does go a long way in keeping our servers lights on and beers in our fridge.
10+
11+
Also if you dig this tool, please make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer)
12+
13+
---
14+
15+
## Maintenance Release
16+
17+
---
18+
19+
## Resolved Issues
20+
21+
* [#414](https://github.com/derailed/popeye/issues/414) Why are there fewer inspection indicators in the new version (0.21.6)?
22+
* [#413](https://github.com/derailed/popeye/issues/413) new version 0.21.6 is not scaning any namespace
23+
* [#408](https://github.com/derailed/popeye/issues/408) v0.21.6 popeye -s po returns nothing and "Booms" with message "No linters matched query"
24+
* [#388](https://github.com/derailed/popeye/issues/388) Filter by namespace intermittently includes all namespaces
25+
26+
---
27+
28+
<img src="https://raw.githubusercontent.com/derailed/popeye/master/assets/imhotep_logo.png" width="32" height="auto"/>&nbsp; © 2024 Imhotep Software LLC. All materials licensed under [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0)

cmd/info.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Authors of Popeye
3+
4+
package cmd
5+
6+
import (
7+
"fmt"
8+
9+
"github.com/derailed/popeye/internal/report"
10+
"github.com/derailed/popeye/pkg"
11+
"github.com/spf13/cobra"
12+
)
13+
14+
func init() {
15+
rootCmd.AddCommand(infoCmd())
16+
}
17+
18+
func infoCmd() *cobra.Command {
19+
return &cobra.Command{
20+
Use: "info",
21+
Short: "Prints Popeye info",
22+
Long: "Prints Popeye information",
23+
Run: func(cmd *cobra.Command, args []string) {
24+
printInfo()
25+
},
26+
}
27+
}
28+
29+
func printInfo() {
30+
printLogo(report.ColorAqua, report.ColorLighSlate)
31+
fmt.Println()
32+
printTuple("Logs", pkg.LogFile)
33+
}

cmd/root.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ var (
3030
}
3131
)
3232

33+
func init() {
34+
initFlags()
35+
}
36+
3337
func execName() string {
3438
n := "popeye"
3539
if strings.HasPrefix(filepath.Base(os.Args[0]), "kubectl-") {
@@ -38,11 +42,6 @@ func execName() string {
3842
return n
3943
}
4044

41-
func init() {
42-
rootCmd.AddCommand(versionCmd())
43-
initFlags()
44-
}
45-
4645
// Execute root command
4746
func Execute() {
4847
if err := rootCmd.Execute(); err != nil {

cmd/version.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ import (
88
"strings"
99

1010
"github.com/derailed/popeye/internal/report"
11-
"github.com/derailed/popeye/pkg"
1211
"github.com/spf13/cobra"
1312
)
1413

14+
func init() {
15+
rootCmd.AddCommand(versionCmd())
16+
}
17+
1518
func versionCmd() *cobra.Command {
1619
return &cobra.Command{
1720
Use: "version",
@@ -28,7 +31,6 @@ func printVersion() {
2831
printTuple("Version", version)
2932
printTuple("Commit", commit)
3033
printTuple("Date", date)
31-
printTuple("Logs", pkg.LogFile)
3234
}
3335

3436
func printTuple(section, value string) {

internal/alias.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ func (a *Aliases) Exclude(gvr types.GVR, sections []string) bool {
219219
if len(sections) == 0 {
220220
return false
221221
}
222+
222223
var matches int
223224
for _, s := range sections {
224225
agvr, ok := a.aliases[s]

internal/cilium/lint/ccnp.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,12 @@ func (s *CiliumClusterwideNetworkPolicy) matchNodesBySel(sel api.EndpointSelecto
128128
if !ok {
129129
return nil, fmt.Errorf("expecting node but got %s", o)
130130
}
131-
fqn := client.FQN("", no.Name)
132-
if matchSelector(no.Labels, sel) {
133-
mm = append(mm, fqn)
131+
ll := make([]string, 0, len(no.Labels))
132+
for k, v := range no.Labels {
133+
ll = append(ll, k+"="+v)
134+
}
135+
if matchSelector(client.AllNamespaces, ll, sel) {
136+
mm = append(mm, client.FQN("", no.Name))
134137
}
135138
}
136139

@@ -148,9 +151,11 @@ func (s *CiliumClusterwideNetworkPolicy) matchCEPsBySel(sel api.EndpointSelector
148151
if !ok {
149152
return nil, fmt.Errorf("expecting cilium endpoint but got %s", o)
150153
}
151-
fqn := client.FQN(cep.Namespace, cep.Name)
152-
if matchSelector(cep.Labels, sel) {
153-
mm = append(mm, fqn)
154+
if cep.Status.Identity == nil {
155+
continue
156+
}
157+
if matchSelector(cep.Namespace, cep.Status.Identity.Labels, sel) {
158+
mm = append(mm, client.FQN(cep.Namespace, cep.Name))
154159
}
155160
}
156161

internal/cilium/lint/cid_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ func TestCiliumIdentity(t *testing.T) {
3131
assert.Nil(t, li.Lint(test.MakeContext("cilium.io/v2/ciliumidentities", "ciliumidentities")))
3232
assert.Equal(t, 3, len(li.Outcome()))
3333

34-
li.Outcome().Dump()
3534
ii := li.Outcome()["default/100"]
3635
assert.Equal(t, 0, len(ii))
3736

0 commit comments

Comments
 (0)