diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml new file mode 100644 index 0000000..731c4b5 --- /dev/null +++ b/.github/workflows/lint-test.yaml @@ -0,0 +1,40 @@ +name: Lint and Test Charts + +on: + pull_request: + paths: + - 'charts/**' + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Fetch history + run: git fetch --prune --unshallow + + - name: Set up Helm + uses: azure/setup-helm@v2.1 + with: + version: v3.5.1 + + - uses: actions/setup-python@v4 + with: + python-version: 3.7 + + - name: Run chart-testing (lint) + id: lint + uses: helm/chart-testing-action@v2.2.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: ct lint \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..81f1e80 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,38 @@ +name: Release Charts + +on: + push: + branches: + - master + paths: + - 'charts/**' + +jobs: + release: + concurrency: staging_environment + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v2.1 + with: + version: latest + + - name: Add dependency chart repos + run: | + helm repo add stable https://charts.helm.sh/stable + helm repo add incubator https://charts.helm.sh/incubator + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.4.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/charts/cluster-descheduler/Chart.yaml b/charts/cluster-descheduler/Chart.yaml index 174b497..118c29a 100644 --- a/charts/cluster-descheduler/Chart.yaml +++ b/charts/cluster-descheduler/Chart.yaml @@ -1,5 +1,7 @@ -description: Descheduler to remove pods violating usage thresholds, affinity violations - and duplicate pod placements +apiVersion: v2 +description: Descheduler to remove pods violating usage thresholds, affinity violations and duplicate pod placements name: cluster-descheduler tags: management,descheduler -version: v0.0.1 +version: 0.0.3 +maintainers: +- name: redhat-cop diff --git a/charts/cluster-descheduler/templates/clusterrolebinding.yaml b/charts/cluster-descheduler/templates/clusterrolebinding.yaml index 1cbabf7..d11d231 100644 --- a/charts/cluster-descheduler/templates/clusterrolebinding.yaml +++ b/charts/cluster-descheduler/templates/clusterrolebinding.yaml @@ -1,4 +1,4 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: diff --git a/charts/cluster-descheduler/templates/cronjob.yaml b/charts/cluster-descheduler/templates/cronjob.yaml index 0f787aa..d379b77 100644 --- a/charts/cluster-descheduler/templates/cronjob.yaml +++ b/charts/cluster-descheduler/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: @@ -35,5 +35,5 @@ spec: - configMap: name: descheduler-policy-configmap name: policy-volume - schedule: {{ .Values.schedule }} + schedule: {{ .Values.schedule | quote }} successfulJobsHistoryLimit: "1" diff --git a/charts/cronjob-aws-ocp-snap/Chart.yaml b/charts/cronjob-aws-ocp-snap/Chart.yaml index ea15a03..cade43f 100644 --- a/charts/cronjob-aws-ocp-snap/Chart.yaml +++ b/charts/cronjob-aws-ocp-snap/Chart.yaml @@ -1,2 +1,5 @@ +apiVersion: v2 name: cronjob-aws-ocp-snap -version: v0.0.1 +version: 0.0.2 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-aws-ocp-snap/templates/cronjob.yaml b/charts/cronjob-aws-ocp-snap/templates/cronjob.yaml index 69c69e2..3262555 100644 --- a/charts/cronjob-aws-ocp-snap/templates/cronjob.yaml +++ b/charts/cronjob-aws-ocp-snap/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: diff --git a/charts/cronjob-etcd-backup/Chart.yaml b/charts/cronjob-etcd-backup/Chart.yaml index 658167d..3d7d647 100644 --- a/charts/cronjob-etcd-backup/Chart.yaml +++ b/charts/cronjob-etcd-backup/Chart.yaml @@ -2,4 +2,6 @@ apiVersion: v2 name: cronjob-etcd-backup description: Deploys a CronJob for creating automated backups of ETCD and storing them on a PersistentVolume type: application -version: 1.0.0 +version: 1.0.1 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-git-sync/Chart.yaml b/charts/cronjob-git-sync/Chart.yaml index 477ca1e..9b6e5a4 100644 --- a/charts/cronjob-git-sync/Chart.yaml +++ b/charts/cronjob-git-sync/Chart.yaml @@ -1,4 +1,7 @@ +apiVersion: v2 description: Scheduled Task to Perform Git Repo Synchronization name: cronjob-git-sync tags: management,cronjob,git,sync -version: v0.0.1 +version: 0.0.2 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-git-sync/templates/cronjob.yaml b/charts/cronjob-git-sync/templates/cronjob.yaml index 069c0c0..0de7e40 100644 --- a/charts/cronjob-git-sync/templates/cronjob.yaml +++ b/charts/cronjob-git-sync/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: @@ -51,5 +51,5 @@ spec: - name: secret-volume secret: secretName: {{ .Values.ssh_key_secret_name }} - schedule: {{ .Values.schedule }} + schedule: {{ .Values.schedule | quote }} successfulJobsHistoryLimit: {{ .Values.success_jobs_history_limit }} diff --git a/charts/cronjob-gitlab-delete-projects/Chart.yaml b/charts/cronjob-gitlab-delete-projects/Chart.yaml index 70b3c1d..2e84738 100644 --- a/charts/cronjob-gitlab-delete-projects/Chart.yaml +++ b/charts/cronjob-gitlab-delete-projects/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: gitlab-cleanup description: A Helm chart to clean up stale gitlab groups and projects - type: application - -version: v0.1.0 +version: 0.1.1 appVersion: v0.1.0 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-gitlab-delete-projects/templates/cronjob.yaml b/charts/cronjob-gitlab-delete-projects/templates/cronjob.yaml index 462bb5b..8f52bd0 100644 --- a/charts/cronjob-gitlab-delete-projects/templates/cronjob.yaml +++ b/charts/cronjob-gitlab-delete-projects/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: diff --git a/charts/cronjob-gitlab-delete-projects/values.yaml b/charts/cronjob-gitlab-delete-projects/values.yaml index 7ac20db..62148e6 100644 --- a/charts/cronjob-gitlab-delete-projects/values.yaml +++ b/charts/cronjob-gitlab-delete-projects/values.yaml @@ -2,19 +2,19 @@ name: gitlab-cleanup image: name: "quay.io/redhat-cop/gitlab-cleanup" - tag: "master" # This is intended to be overridden by the parent Helm chart. + tag: "master" # This is intended to be overridden by the parent Helm chart. -generateSecret: false # set true if you want to create the secret data file. +generateSecret: false # set true if you want to create the secret data file. env: secret: - name: secret-gitlab-info # cronjob references this secret - personalAccessToken: xxxx # real value needed if generateSecret=true - notificationToken: yyyy # real value needed if generateSecret=true - gitlabApiUrl: http://gitlab.ca - parentGroupId: 6 # top level group to search - deleteAfterInHours: 876000 # 1 year - dryRun: TRUE # set this to false to delete something + name: secret-gitlab-info # cronjob references this secret + personalAccessToken: xxxx # real value needed if generateSecret=true + notificationToken: yyyy # real value needed if generateSecret=true + gitlabApiUrl: http://gitlab.ca + parentGroupId: 6 # top level group to search + deleteAfterInHours: 876000 # 1 year + dryRun: TRUE # set this to false to delete something logLevel: DEBUG cron: diff --git a/charts/cronjob-ldap-group-sync-secure/Chart.yaml b/charts/cronjob-ldap-group-sync-secure/Chart.yaml index 9dd4c90..811607e 100644 --- a/charts/cronjob-ldap-group-sync-secure/Chart.yaml +++ b/charts/cronjob-ldap-group-sync-secure/Chart.yaml @@ -1,4 +1,7 @@ +apiVersion: v2 description: Scheduled Task to Perform LDAP Group Synchronization name: cronjob-ldap-group-sync-secure tags: management,cronjob,ldap,group,sync -version: v0.0.1 +version: 0.0.2 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-ldap-group-sync-secure/templates/cronjob.yaml b/charts/cronjob-ldap-group-sync-secure/templates/cronjob.yaml index 5989fb5..372ac9b 100644 --- a/charts/cronjob-ldap-group-sync-secure/templates/cronjob.yaml +++ b/charts/cronjob-ldap-group-sync-secure/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: diff --git a/charts/cronjob-ldap-group-sync/Chart.yaml b/charts/cronjob-ldap-group-sync/Chart.yaml index 0bc9f22..1b04711 100644 --- a/charts/cronjob-ldap-group-sync/Chart.yaml +++ b/charts/cronjob-ldap-group-sync/Chart.yaml @@ -1,4 +1,7 @@ +apiVersion: v2 description: Scheduled Task to Perform LDAP Group Synchronization name: cronjob-ldap-group-sync tags: management,cronjob,ldap,group,sync -version: v0.0.1 +version: 0.0.2 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-ldap-group-sync/templates/cronjob.yaml b/charts/cronjob-ldap-group-sync/templates/cronjob.yaml index 006f7e3..2163acb 100644 --- a/charts/cronjob-ldap-group-sync/templates/cronjob.yaml +++ b/charts/cronjob-ldap-group-sync/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: diff --git a/charts/cronjob-prune-builds-deployments/Chart.yaml b/charts/cronjob-prune-builds-deployments/Chart.yaml index 187c713..2a87dc4 100644 --- a/charts/cronjob-prune-builds-deployments/Chart.yaml +++ b/charts/cronjob-prune-builds-deployments/Chart.yaml @@ -1,4 +1,7 @@ +apiVersion: v2 description: Scheduled Task to Prune Builds or Deployments name: cronjob-prune-builds-deployments tags: management,cronjob,prune,builds,deployments -version: v0.0.1 +version: 0.0.2 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-prune-builds-deployments/templates/cronjob.yaml b/charts/cronjob-prune-builds-deployments/templates/cronjob.yaml index ecfd889..f29a5ca 100644 --- a/charts/cronjob-prune-builds-deployments/templates/cronjob.yaml +++ b/charts/cronjob-prune-builds-deployments/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: diff --git a/charts/cronjob-prune-images/Chart.yaml b/charts/cronjob-prune-images/Chart.yaml index d8236dc..b42ff6a 100644 --- a/charts/cronjob-prune-images/Chart.yaml +++ b/charts/cronjob-prune-images/Chart.yaml @@ -1,4 +1,7 @@ +apiVersion: v2 description: Scheduled Task to Prune Images from Internal Docker Registry name: cronjob-prune-images tags: management,cronjob,prune,images -version: v0.0.1 +version: 0.0.2 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-prune-images/templates/cronjob.yaml b/charts/cronjob-prune-images/templates/cronjob.yaml index 2255ef4..c0e40df 100644 --- a/charts/cronjob-prune-images/templates/cronjob.yaml +++ b/charts/cronjob-prune-images/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: diff --git a/charts/cronjob-prune-projects/Chart.yaml b/charts/cronjob-prune-projects/Chart.yaml index b58950f..2c5b3bc 100644 --- a/charts/cronjob-prune-projects/Chart.yaml +++ b/charts/cronjob-prune-projects/Chart.yaml @@ -1,2 +1,5 @@ +apiVersion: v2 name: cronjob-prune-projects -version: v0.0.1 +version: 0.0.2 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-prune-projects/templates/cronjob.yaml b/charts/cronjob-prune-projects/templates/cronjob.yaml index 8c31598..d6f992c 100644 --- a/charts/cronjob-prune-projects/templates/cronjob.yaml +++ b/charts/cronjob-prune-projects/templates/cronjob.yaml @@ -1,4 +1,4 @@ -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: diff --git a/charts/cronjob-prune-tekton-pipelinerun/Chart.yaml b/charts/cronjob-prune-tekton-pipelinerun/Chart.yaml index 271eb3e..0e3c83e 100644 --- a/charts/cronjob-prune-tekton-pipelinerun/Chart.yaml +++ b/charts/cronjob-prune-tekton-pipelinerun/Chart.yaml @@ -1,4 +1,7 @@ +apiVersion: v2 description: Scheduled task to prune pipelinerun from tekton name: cronjob-prune-tekton-pipelinerun tags: management,cronjob,prune,tekton,pipelinerun -version: v0.0.1 +version: 0.0.2 +maintainers: +- name: redhat-cop diff --git a/charts/cronjob-prune-tekton-pipelinerun/templates/cronjob.yaml b/charts/cronjob-prune-tekton-pipelinerun/templates/cronjob.yaml index 4018a72..1f8afe3 100644 --- a/charts/cronjob-prune-tekton-pipelinerun/templates/cronjob.yaml +++ b/charts/cronjob-prune-tekton-pipelinerun/templates/cronjob.yaml @@ -1,5 +1,5 @@ --- -apiVersion: batch/v1beta1 +apiVersion: batch/v1 kind: CronJob metadata: labels: