Skip to content

Commit

Permalink
Merge pull request #43 from defenseunicorns/prometheus-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
corang authored Jul 11, 2024
2 parents 857c3c8 + 4a2ed1a commit 35598aa
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @defenseunicorns/uds
# This repository is owned by the Defense Unicorns UDS-Marketplace Team
/* @defenseunicorns/uds-marketplace
34 changes: 32 additions & 2 deletions chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@ metadata:
spec:
{{- if .Values.sso.enabled }}
sso:
- name: Jenkins SSO
- name: Jenkins Login
clientId: uds-package-jenkins
redirectUris:
- "https://jenkins.{{ .Values.domain }}/securityRealm/finishLogin"
{{- end }}

monitor:
- selector:
app.kubernetes.io/name: jenkins
targetPort: 8080
portName: http
path: /prometheus/
description: Metrics

network:
expose:
- service: jenkins
Expand All @@ -22,18 +31,39 @@ spec:
allow:
- direction: Ingress
remoteGenerated: IntraNamespace

- direction: Egress
remoteGenerated: IntraNamespace

- direction: Egress
podLabels:
app.kubernetes.io/name: jenkins
port: 443
description: "Jenkins-plugins & SSO"

- direction: Egress
podLabels:
jenkins/label: jenkins-jenkins-agent
port: 443
description: "Jenkins-jobs phone home"

- direction: Egress
# todo: this is over permissive, need to scope it down
podLabels:
app.kubernetes.io/name: jenkins
remoteGenerated: KubeAPI

# Custom rules for unanticipated scenarios
{{- range .Values.customNetworkPolicies }}
- direction: {{ .direction }}
selector:
{{ .selector | toYaml | nindent 10 }}
{{- if not .remoteGenerated }}
remoteNamespace: {{ .remoteNamespace }}
remoteSelector:
{{ .remoteSelector | toYaml | nindent 10 }}
port: {{ .port }}
{{- else }}
remoteGenerated: {{ .remoteGenerated }}
{{- end }}
description: {{ .description }}
{{- end }}
18 changes: 18 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
domain: "###ZARF_VAR_DOMAIN###"

sso:
enabled: true

# customNetworkPolicies:
# # Notice no `remoteGenerated` field here on custom internal rule
# - direction: Ingress
# selector:
# app: jenkins
# remoteNamespace: jenkins
# remoteSelector:
# app: jenkins
# port: 8180
# description: "Ingress from Jenkins"
# # No `remoteNamespace`, `remoteSelector`, or `port` fields on rule to `remoteGenerated`
# - direction: Egress
# selector:
# app: webservice
# remoteGenerated: Anywhere
# description: "Egress from Mattermost"
7 changes: 7 additions & 0 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ tasks:
- task: setup:k3d-test-cluster
- task: deploy:test-bundle

- name: default-full
description: Create K3D Cluster with UDS-Core + Jenkins
actions:
- task: create-test-bundle
- task: setup:k3d-full-cluster
- task: deploy:test-bundle

- name: create-package
description: Create UDS Jenkins Package
actions:
Expand Down
2 changes: 2 additions & 0 deletions values/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ controller:
- git:5.2.2
- configuration-as-code:1810.v9b_c30a_249a_4c
- oic-auth:4.269.va_7526f34f306
- prometheus:773.v3b_62d8178eec
- cloudbees-disk-usage-simple:203.v3f46a_7462b_1a_
overwritePlugins: true
JCasC:
defaultConfig: true
Expand Down

0 comments on commit 35598aa

Please sign in to comment.