-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add monitoring virtualservices for alertmanager / prometheus #977
Draft
joelmccoy
wants to merge
10
commits into
main
Choose a base branch
from
add-monitoring-virtualservices
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
25be2e5
feat: add virtual services / authservice for monitoring package
joelmccoy b68a2b0
fix: reorder authservice
joelmccoy 8986de8
fix: remove authservice in front of prometheus
joelmccoy bb2e477
chore: remove authservice
joelmccoy 10fa01b
chore: add back in sso
joelmccoy eb5f67f
feat: add authz policies and virtual services
joelmccoy 7ff5088
chore: add license
joelmccoy 38d7b9e
Merge branch 'main' into add-monitoring-virtualservices
joelmccoy 9cacc6d
chore: remove custom
joelmccoy 3c2a1a1
chore: cleanup custom
joelmccoy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/prometheus-stack/chart/templates/alertmanager-authz-policy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2024 Defense Unicorns | ||
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial | ||
|
||
apiVersion: security.istio.io/v1beta1 | ||
kind: AuthorizationPolicy | ||
metadata: | ||
name: monitoring-alertmanager-authz-policy | ||
namespace: monitoring | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: alertmanager | ||
action: ALLOW | ||
rules: | ||
- from: | ||
- source: | ||
namespaces: | ||
- monitoring | ||
to: | ||
- operation: | ||
methods: | ||
- GET | ||
- POST | ||
paths: | ||
- /* |
22 changes: 22 additions & 0 deletions
22
src/prometheus-stack/chart/templates/alertmanager-internal-vs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2024 Defense Unicorns | ||
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial | ||
|
||
apiVersion: networking.istio.io/v1 | ||
kind: VirtualService | ||
metadata: | ||
name: alertmanager-internal | ||
namespace: monitoring | ||
spec: | ||
hosts: | ||
- kube-prometheus-stack-alertmanager.monitoring.svc.cluster.local | ||
http: | ||
- route: | ||
- destination: | ||
host: kube-prometheus-stack-alertmanager.monitoring.svc.cluster.local | ||
port: | ||
number: 9093 | ||
headers: | ||
request: | ||
set: | ||
authorization: "internal-traffic" | ||
|
27 changes: 27 additions & 0 deletions
27
src/prometheus-stack/chart/templates/prometheus-authz-policy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2024 Defense Unicorns | ||
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial | ||
|
||
apiVersion: security.istio.io/v1beta1 | ||
kind: AuthorizationPolicy | ||
metadata: | ||
name: monitoring-prometheus-authz-policy | ||
namespace: monitoring | ||
spec: | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: prometheus | ||
action: ALLOW | ||
rules: | ||
- from: | ||
- source: | ||
namespaces: | ||
- monitoring | ||
- grafana | ||
to: | ||
- operation: | ||
methods: | ||
- GET | ||
- POST | ||
paths: | ||
- /* | ||
|
22 changes: 22 additions & 0 deletions
22
src/prometheus-stack/chart/templates/prometheus-internal-vs.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2024 Defense Unicorns | ||
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial | ||
|
||
apiVersion: networking.istio.io/v1 | ||
kind: VirtualService | ||
metadata: | ||
name: prometheus-internal | ||
namespace: monitoring | ||
spec: | ||
hosts: | ||
- kube-prometheus-stack-prometheus.monitoring.svc.cluster.local | ||
http: | ||
- route: | ||
- destination: | ||
host: kube-prometheus-stack-prometheus.monitoring.svc.cluster.local | ||
port: | ||
number: 9090 | ||
headers: | ||
request: | ||
set: | ||
authorization: "internal-traffic" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
# Copyright 2024 Defense Unicorns | ||
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial | ||
|
||
domain: "###ZARF_VAR_DOMAIN###" | ||
|
||
sso: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved this up the list in the standard bundle as it should be deployed after keycloak. and tests were failing as monitoring gets deployed before authservice if left alone.