Skip to content

Commit

Permalink
update to 0.3.0 (#162)
Browse files Browse the repository at this point in the history
* update to 0.3.0

* disable test_k8s for update-version branches

* update README
  • Loading branch information
Bobby Brennan authored Jul 11, 2019
1 parent c816e60 commit 962494e
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 17 deletions.
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ references:
command: |
kubectl apply -f ./deploy/dashboard.yaml
sleep 10
kubectl get pods --namespace polaris
kubectl port-forward --namespace polaris svc/polaris-dashboard 3000:80 &
sleep 5
curl -f http://localhost:3000 > /dev/null
Expand Down Expand Up @@ -171,7 +172,11 @@ workflows:
build:
jobs:
- test
- test_k8s
- test_k8s:
# Ignore update-version branch, which changes deploy/ image references before the images are built
filters:
branches:
ignore: /.*\/update-version/
- build:
requires:
- test
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# x.x.x (next release)

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

# 0.2.1
* [Fix](https://github.com/reactiveops/polaris/issues/146): Fixed logic on RunAsNonRoot check to incorporate settings in podSpec
Expand Down
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,15 @@ The steps are:
2. Make any necessary changes to the chart to support the new version of Polaris (e.g. new RBAC permissions)
3. **Don't merge yet!**
2. Create a PR for this repo
1. Bump the version number in:
1. Create a new branch named `yourname/update-version`
2. Bump the version number in:
1. main.go
2. README.md
2. Regenerate the deployment files. Assuming you've cloned the charts repo to `./charts`:
3. Regenerate the deployment files. Assuming you've cloned the charts repo to `./charts`:
1. `helm template ./charts/stable/polaris/ --name polaris --namespace polaris --set templateOnly=true > deploy/dashboard.yaml`
2. `helm template ./charts/stable/polaris/ --name polaris --namespace polaris --set templateOnly=true --set webhook.enable=true --set dashboard.enable=false > deploy/webhook.yaml`
3. Update CHANGELOG.md
4. Merge your PR
4. Update CHANGELOG.md
5. Merge your PR
3. Tag the latest branch for this repo
1. Pull the latest for the `master` branch
2. Run `git tag $VERSION && git push --tags`
Expand Down
57 changes: 48 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Version][version-image]][version-link] [![CircleCI][circleci-image]][circleci-link] [![Go Report Card][goreport-image]][goreport-link]
</div>

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

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

## CLI Options

* `config`: Specify a location for the Polaris config
* `dashboard`: Runs the webserver for Polaris dashboard.
* `dashboard-port`: Port for the dashboard webserver (default `8080`)
* `dashboard-base-path`: Path on which the dashboard is being served (default `/`)
* `webhook`: Runs the webhook webserver.
* `webhook-port`: Port for the webhook webserver (default `9876`)
* `disable-webhook-config-installer`: disable the installer in the webhook server, so it won't install webhook configuration resources during bootstrapping
* `kubeconfig`: Path to a kubeconfig. Only required if out-of-cluster.
```
# high-level flags
-version
Prints the version of Polaris
-config string
Location of Polaris configuration file
-kubeconfig string
Path to a kubeconfig. Only required if out-of-cluster.
-log-level string
Logrus log level (default "info")
-master string
The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.
# dashboard flags
-dashboard
Runs the webserver for Polaris dashboard.
-dashboard-base-path string
Path on which the dashboard is served (default "/")
-dashboard-port int
Port for the dashboard webserver (default 8080)
-display-name string
An optional identifier for the audit
# audit flags
-audit
Runs a one-time audit.
-audit-path string
If specified, audits one or more YAML files instead of a cluster
-output-file string
Destination file for audit results
-output-format string
Output format for results - json, yaml, or score (default "json")
-output-url string
Destination URL to send audit results
-set-exit-code-below-score int
When running with --audit, set an exit code of 4 when the score is below this threshold (1-100)
-set-exit-code-on-error
When running with --audit, set an exit code of 3 when the audit contains error-level issues.
# webhook flags
-webhook
Runs the webhook webserver.
-webhook-port int
Port for the webhook webserver (default 9876)
-disable-webhook-config-installer
disable the installer in the webhook server, so it won't install webhook configuration resources during bootstrapping
```

## Contributing
PRs welcome! Check out the [Contributing Guidelines](CONTRIBUTING.md),
Expand Down
8 changes: 7 additions & 1 deletion deploy/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ spec:
- --dashboard
- --config
- /opt/app/config.yaml
image: 'quay.io/reactiveops/polaris:0.2'
image: 'quay.io/reactiveops/polaris:0.3'
imagePullPolicy: 'Always'
name: dashboard
ports:
Expand Down Expand Up @@ -199,6 +199,12 @@ spec:
subPath: config.yaml
readOnly: true
serviceAccountName: polaris-dashboard
---
# Source: polaris/templates/audit.job.yaml

---
# Source: polaris/templates/audit.rbac.yaml

---
# Source: polaris/templates/ingress.yaml

Expand Down
8 changes: 7 additions & 1 deletion deploy/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ spec:
- --webhook
- --config
- /opt/app/config.yaml
image: 'quay.io/reactiveops/polaris:0.2'
image: 'quay.io/reactiveops/polaris:0.3'
imagePullPolicy: 'Always'
ports:
- containerPort: 9876
Expand Down Expand Up @@ -270,6 +270,12 @@ spec:
secretName: polaris-webhook
- name: cr-logs
emptyDir: {}
---
# Source: polaris/templates/audit.job.yaml

---
# Source: polaris/templates/audit.rbac.yaml

---
# Source: polaris/templates/dashboard.deployment.yaml

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (

const (
// Version represents the current release version of Polaris
Version = "0.2.1"
Version = "0.3.0"
)

func main() {
Expand Down

0 comments on commit 962494e

Please sign in to comment.