Skip to content
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

fix: helm generation checker pipeline #1209

Merged
merged 3 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .github/workflows/validate-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,18 @@ jobs:
path: ./bin
key: build-tools-${{ github.ref_name }}

- name: Generate current YAML
run: |
helm template helm/chart > current.yaml

- name: Generate new Helm Chart
- name: Generate helm charts
env:
RELEASE_REGISTRY: ghcr.keptn.sh/keptn
run: make helm-package

- name: Generate new YAML
run: |
helm template helm/chart > new.yaml

- name: Compare YAML files
- name: Compare YAML file changes
run: |
if ! diff -rq current.yaml new.yaml &>/dev/null; then
echo "Helm charts were not re-generated. Please regenerate them using make helm-package"
exit 1
else
if [ -z "$(git status --porcelain)" ]; then
echo ""
echo "There are no changes in the manifests"
else
echo ""
echo "Helm charts were not re-generated. Please regenerate them using make helm-package RELEASE_REGISTRY=ghcr.keptn.sh/keptn"
exit 1
fi
9 changes: 7 additions & 2 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ ignore: |
**/rendered/release.yaml
examples/support/observability/config/prometheus
dashboards/grafana
operator/config/crd/bases
metrics-operator/config/crd/bases
operator/config/crd/bases/*
metrics-operator/config/crd/bases/*
klt-cert-manager/config/crd/bases/*
operator/config/rbac/role.yaml
metrics-operator/config/rbac/role.yaml
klt-cert-manager/config/rbac/role.yaml
helm/chart/templates
helm/chart/rendered.yaml
helm/chart/values.yaml
helmchart.yaml

rules:
Expand Down
60 changes: 30 additions & 30 deletions helm/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ certificateOperator:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
- ALL
readOnlyRootFilesystem: true
runAsGroup: 65532
runAsUser: 65532
Expand Down Expand Up @@ -56,7 +56,7 @@ lifecycleOperator:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
- ALL
privileged: false
runAsGroup: 65532
runAsNonRoot: true
Expand Down Expand Up @@ -104,16 +104,16 @@ lifecycleOperator:
topologySpreadConstraints: []
lifecycleOperatorMetricsService:
ports:
- name: metrics
port: 2222
protocol: TCP
targetPort: metrics
- name: metrics
port: 2222
protocol: TCP
targetPort: metrics
type: ClusterIP
lifecycleWebhookService:
ports:
- port: 443
protocol: TCP
targetPort: 9443
- port: 443
protocol: TCP
targetPort: 9443
type: ClusterIP
metricsManagerConfig:
controllerManagerConfigYaml:
Expand All @@ -132,7 +132,7 @@ metricsOperator:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
- ALL
env:
exposeKeptnMetrics: "true"
metricsControllerLogLevel: "0"
Expand Down Expand Up @@ -164,23 +164,23 @@ metricsOperator:
topologySpreadConstraints: []
metricsOperatorService:
ports:
- name: https
port: 8443
protocol: TCP
targetPort: https
- name: custom-metrics
port: 443
targetPort: custom-metrics
- name: metrics
port: 9999
protocol: TCP
targetPort: metrics
- name: https
port: 8443
protocol: TCP
targetPort: https
- name: custom-metrics
port: 443
targetPort: custom-metrics
- name: metrics
port: 9999
protocol: TCP
targetPort: metrics
type: ClusterIP
metricsWebhookService:
ports:
- port: 443
protocol: TCP
targetPort: 9443
- port: 443
protocol: TCP
targetPort: 9443
type: ClusterIP
scheduler:
nodeSelector: {}
Expand All @@ -190,7 +190,7 @@ scheduler:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
Expand Down Expand Up @@ -228,8 +228,8 @@ schedulerConfig:
leaderElection:
leaderElect: false
profiles:
- plugins:
permit:
enabled:
- name: KLCPermit
schedulerName: keptn-scheduler
- plugins:
permit:
enabled:
- name: KLCPermit
schedulerName: keptn-scheduler
100 changes: 50 additions & 50 deletions klt-cert-manager/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,44 @@ metadata:
creationTimestamp: null
name: certificate-operator-role
rules:
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- get
- list
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand All @@ -51,15 +51,15 @@ metadata:
name: certificate-operator-role
namespace: keptn-lifecycle-toolkit-system
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
Loading