Skip to content

Commit 962494e

Browse files
author
Bobby Brennan
authored
update to 0.3.0 (#162)
* update to 0.3.0 * disable test_k8s for update-version branches * update README
1 parent c816e60 commit 962494e

File tree

7 files changed

+76
-17
lines changed

7 files changed

+76
-17
lines changed

.circleci/config.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ references:
7272
command: |
7373
kubectl apply -f ./deploy/dashboard.yaml
7474
sleep 10
75+
kubectl get pods --namespace polaris
7576
kubectl port-forward --namespace polaris svc/polaris-dashboard 3000:80 &
7677
sleep 5
7778
curl -f http://localhost:3000 > /dev/null
@@ -171,7 +172,11 @@ workflows:
171172
build:
172173
jobs:
173174
- test
174-
- test_k8s
175+
- test_k8s:
176+
# Ignore update-version branch, which changes deploy/ image references before the images are built
177+
filters:
178+
branches:
179+
ignore: /.*\/update-version/
175180
- build:
176181
requires:
177182
- test

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# x.x.x (next release)
22

3+
# 0.3.0
4+
* Added `--set-exit-code-on-error` and `--set-exit-code-below-score` flags to better support CI/CD
35

46
# 0.2.1
57
* [Fix](https://github.com/reactiveops/polaris/issues/146): Fixed logic on RunAsNonRoot check to incorporate settings in podSpec

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,15 @@ The steps are:
9393
2. Make any necessary changes to the chart to support the new version of Polaris (e.g. new RBAC permissions)
9494
3. **Don't merge yet!**
9595
2. Create a PR for this repo
96-
1. Bump the version number in:
96+
1. Create a new branch named `yourname/update-version`
97+
2. Bump the version number in:
9798
1. main.go
9899
2. README.md
99-
2. Regenerate the deployment files. Assuming you've cloned the charts repo to `./charts`:
100+
3. Regenerate the deployment files. Assuming you've cloned the charts repo to `./charts`:
100101
1. `helm template ./charts/stable/polaris/ --name polaris --namespace polaris --set templateOnly=true > deploy/dashboard.yaml`
101102
2. `helm template ./charts/stable/polaris/ --name polaris --namespace polaris --set templateOnly=true --set webhook.enable=true --set dashboard.enable=false > deploy/webhook.yaml`
102-
3. Update CHANGELOG.md
103-
4. Merge your PR
103+
4. Update CHANGELOG.md
104+
5. Merge your PR
104105
3. Tag the latest branch for this repo
105106
1. Pull the latest for the `master` branch
106107
2. Run `git tag $VERSION && git push --tags`

README.md

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Version][version-image]][version-link] [![CircleCI][circleci-image]][circleci-link] [![Go Report Card][goreport-image]][goreport-link]
66
</div>
77

8-
[version-image]: https://img.shields.io/static/v1.svg?label=Version&message=0.2.1&color=239922
8+
[version-image]: https://img.shields.io/static/v1.svg?label=Version&message=0.3.0&color=239922
99
[version-link]: https://github.com/reactiveops/polaris
1010

1111
[goreport-image]: https://goreportcard.com/badge/github.com/reactiveops/polaris
@@ -141,14 +141,53 @@ Polaris validation checks fall into several different categories:
141141

142142
## CLI Options
143143

144-
* `config`: Specify a location for the Polaris config
145-
* `dashboard`: Runs the webserver for Polaris dashboard.
146-
* `dashboard-port`: Port for the dashboard webserver (default `8080`)
147-
* `dashboard-base-path`: Path on which the dashboard is being served (default `/`)
148-
* `webhook`: Runs the webhook webserver.
149-
* `webhook-port`: Port for the webhook webserver (default `9876`)
150-
* `disable-webhook-config-installer`: disable the installer in the webhook server, so it won't install webhook configuration resources during bootstrapping
151-
* `kubeconfig`: Path to a kubeconfig. Only required if out-of-cluster.
144+
```
145+
# high-level flags
146+
-version
147+
Prints the version of Polaris
148+
-config string
149+
Location of Polaris configuration file
150+
-kubeconfig string
151+
Path to a kubeconfig. Only required if out-of-cluster.
152+
-log-level string
153+
Logrus log level (default "info")
154+
-master string
155+
The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
156+
157+
# dashboard flags
158+
-dashboard
159+
Runs the webserver for Polaris dashboard.
160+
-dashboard-base-path string
161+
Path on which the dashboard is served (default "/")
162+
-dashboard-port int
163+
Port for the dashboard webserver (default 8080)
164+
-display-name string
165+
An optional identifier for the audit
166+
167+
# audit flags
168+
-audit
169+
Runs a one-time audit.
170+
-audit-path string
171+
If specified, audits one or more YAML files instead of a cluster
172+
-output-file string
173+
Destination file for audit results
174+
-output-format string
175+
Output format for results - json, yaml, or score (default "json")
176+
-output-url string
177+
Destination URL to send audit results
178+
-set-exit-code-below-score int
179+
When running with --audit, set an exit code of 4 when the score is below this threshold (1-100)
180+
-set-exit-code-on-error
181+
When running with --audit, set an exit code of 3 when the audit contains error-level issues.
182+
183+
# webhook flags
184+
-webhook
185+
Runs the webhook webserver.
186+
-webhook-port int
187+
Port for the webhook webserver (default 9876)
188+
-disable-webhook-config-installer
189+
disable the installer in the webhook server, so it won't install webhook configuration resources during bootstrapping
190+
```
152191

153192
## Contributing
154193
PRs welcome! Check out the [Contributing Guidelines](CONTRIBUTING.md),

deploy/dashboard.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ spec:
161161
- --dashboard
162162
- --config
163163
- /opt/app/config.yaml
164-
image: 'quay.io/reactiveops/polaris:0.2'
164+
image: 'quay.io/reactiveops/polaris:0.3'
165165
imagePullPolicy: 'Always'
166166
name: dashboard
167167
ports:
@@ -199,6 +199,12 @@ spec:
199199
subPath: config.yaml
200200
readOnly: true
201201
serviceAccountName: polaris-dashboard
202+
---
203+
# Source: polaris/templates/audit.job.yaml
204+
205+
---
206+
# Source: polaris/templates/audit.rbac.yaml
207+
202208
---
203209
# Source: polaris/templates/ingress.yaml
204210

deploy/webhook.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ spec:
211211
- --webhook
212212
- --config
213213
- /opt/app/config.yaml
214-
image: 'quay.io/reactiveops/polaris:0.2'
214+
image: 'quay.io/reactiveops/polaris:0.3'
215215
imagePullPolicy: 'Always'
216216
ports:
217217
- containerPort: 9876
@@ -270,6 +270,12 @@ spec:
270270
secretName: polaris-webhook
271271
- name: cr-logs
272272
emptyDir: {}
273+
---
274+
# Source: polaris/templates/audit.job.yaml
275+
276+
---
277+
# Source: polaris/templates/audit.rbac.yaml
278+
273279
---
274280
# Source: polaris/templates/dashboard.deployment.yaml
275281

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import (
4242

4343
const (
4444
// Version represents the current release version of Polaris
45-
Version = "0.2.1"
45+
Version = "0.3.0"
4646
)
4747

4848
func main() {

0 commit comments

Comments
 (0)