wip feat(ci): Auto update k8s manifests, chart: add operator live/readiness probe (#860)
This commit is contained in:
parent
c2c249aa48
commit
97892a4cbd
|
|
@ -1,47 +0,0 @@
|
|||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 30
|
||||
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed.
|
||||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
daysUntilClose: 30
|
||||
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- frozen
|
||||
|
||||
# Set to true to ignore issues in a milestone (defaults to false)
|
||||
exemptMilestones: true
|
||||
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: stale
|
||||
|
||||
issues:
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had recent activity.
|
||||
It will be closed if no further activity occurs.
|
||||
If this issue is still affecting you, just comment with any updates and we'll keep it open.
|
||||
Thank you for your contributions.
|
||||
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: >
|
||||
Closing this issue after a prolonged period of inactivity.
|
||||
If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!
|
||||
|
||||
pulls:
|
||||
# Comment to post when marking a pull request as stale.
|
||||
markComment: >
|
||||
This pull request has been automatically marked as stale because it has not had recent activity.
|
||||
It will be closed if no further activity occurs.
|
||||
If this pull request is still relevant, just comment with any updates and we'll keep it open.
|
||||
Thank you for your contributions.
|
||||
|
||||
# Comment to post when closing a stale pull request. Set to `false` to disable
|
||||
closeComment: >
|
||||
Closing this pull request after a prolonged period of inactivity.
|
||||
If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!
|
||||
|
||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||
limitPerRun: 30
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
name: Update k8s manifests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'website/**'
|
||||
- 'assets/**'
|
||||
- 'backup/**'
|
||||
- '*.md'
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
update-manifest:
|
||||
name: Update k8s manifests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up env vars
|
||||
run: |
|
||||
echo "HELM_VERSION=v$(sed -n 's/HELM_VERSION=//p' config.base.env)" >> $GITHUB_ENV
|
||||
|
||||
- name: Helm lint
|
||||
run: make helm-lint
|
||||
|
||||
#TODO: add also the webhook part and understand if is necessary
|
||||
- name: Helm update plain manifests
|
||||
run: |
|
||||
helm template --set fullnameOverride=jenkins-operator \
|
||||
--set jenkins.enabled=false \
|
||||
--set jenkins.backup.enabled=false \
|
||||
--set jenkins.backup.pvc.enabled=false \
|
||||
--set operator.resources.limits.cpu=100m \
|
||||
--set operator.resources.limits.memory=120Mi \
|
||||
--set operator.resources.requests.cpu=100m \
|
||||
--set operator.resources.requests.memory=120Mi \
|
||||
chart/jenkins-operator/ > deploy/all-in-one-v1alpha2.yaml
|
||||
sed -i '/namespace: default/d' deploy/all-in-one-v1alpha2.yaml
|
||||
|
||||
cp chart/jenkins-operator/crds/jenkins-crd.yaml deploy/crds/jenkins.io_jenkins_crd.yaml
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
commit-message: Auto-updated Kubernetes Manifests
|
||||
branch: manifest-deploy-update
|
||||
title: Auto-updated Kubernetes Manifests
|
||||
body: |
|
||||
Auto-updated Kubernetes Manifests from master commit ${{ github.sha }}
|
||||
|
|
@ -31,7 +31,7 @@ spec:
|
|||
protocol: TCP
|
||||
command:
|
||||
- /manager
|
||||
args:
|
||||
args:
|
||||
{{- if .Values.webhook.enabled }}
|
||||
- --validate-security-warnings
|
||||
{{- end }}
|
||||
|
|
@ -41,6 +41,18 @@ spec:
|
|||
name: webhook-certs
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8081
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: 8081
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
env:
|
||||
- name: WATCH_NAMESPACE
|
||||
value: {{ .Values.jenkins.namespace }}
|
||||
|
|
@ -71,4 +83,4 @@ spec:
|
|||
defaultMode: 420
|
||||
secretName: jenkins-{{ .Values.webhook.certificate.name }}
|
||||
terminationGracePeriodSeconds: 10
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue