diff --git a/packs/rbacmanager-1.10.0/README.md b/packs/rbacmanager-1.10.0/README.md new file mode 100644 index 00000000..b4e86fff --- /dev/null +++ b/packs/rbacmanager-1.10.0/README.md @@ -0,0 +1,90 @@ +# RBAC Manager + +[RBAC Manager](https://fairwindsops.github.io/rbac-manager/) was designed to simplify authorization in Kubernetes. This is an operator that supports declarative configuration for RBAC with new custom resources. Instead of managing role bindings or service accounts directly, you can specify a desired state and RBAC Manager will make the necessary changes to achieve that state. + +This project has three main goals: +1. Provide a declarative approach to RBAC that is more approachable and scalable. +2. Reduce the amount of configuration required for great auth. +3. Enable automation of RBAC configuration updates with CI/CD. + +## Prerequisites + +As of chart version 1.6.0 Kubernetes 1.16+, Helm 2.10+ + +Helm 3 will be made mandatory in the future. + +## Parameters + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| image.repository | string | `"us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager"` | The image to run for rbac manager | +| image.tag | string | `"v1.10.0"` | The tag of the image to run. **Note:** Requires the prefix 'v' for version 1.10.0+ | +| image.digest | string | `""` | The digest of the image to run | +| image.pullPolicy | string | `"Always"` | The image pullPolicy. Recommend not changing this | +| image.imagePullSecrets | list | `[]` | | +| extraArgs | object | `{}` | A map of flag=value to pass to rbac-manager | +| installCRDs | bool | `true` | If true, install and upgrade CRDs. See the Helm documentation for [best practices regarding CRDs](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#install-a-crd-declaration-before-using-the-resource). | +| crds.additionalLabels | object | `{}` | add additional labels to the installed CRDs | +| rbac.additionalLabels | object | `{}` | add additional labels to the installed RBAC resources | +| resources | object | `{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}` | A resources block for the rbac-manager pods | +| priorityClassName | string | `""` | The name of a priorityClass to use | +| nodeSelector | object | `{}` | Deployment nodeSelector | +| tolerations | list | `[]` | Deployment tolerations | +| affinity | object | `{}` | Deployment affinity | +| podAnnotations | object | `{}` | Annotations to apply to the pods | +| podLabels | object | `{}` | Labels to apply to the pod | +| podSecurityContext | object | `{}` | securityContext to apply to the whole pod | +| securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsNonRoot":true}` | securityContext to apply to the rbac-manager container | +| deploymentLabels | object | `{}` | Labels to apply to the Deployment resource | +| serviceMonitor.enabled | bool | `false` | If true, a ServiceMonitor will be created for Prometheus | +| serviceMonitor.additionalLabels | list | `[]` | Additional labels to ServiceMonitor | +| serviceMonitor.annotations | object | `{}` | Annotations to apply to the serviceMonitor and headless service | +| serviceMonitor.namespace | string | `""` | The namespace to deploy the serviceMonitor into | +| serviceMonitor.interval | string | `"60s"` | How often to scrape the metrics endpoint | +| serviceMonitor.relabelings | list | `[]` | RelabelConfigs to apply to samples before scraping | + +## Upgrade + +### Upgrading to Chart Version 2.0.0 +**Breaking:** The default container image is now `us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager`. The previous default, `quay.io/reactiveops/rbac-manager`, is deprecated. + +To remain on Quay during migration, set `image.repository` (and `image.tag` if needed) in your values. + +### Upgrading to Chart Version 1.0.0 +The upgrade to version 1.0.0 of this chart removes support for installing RBAC Definitions as part of the chart values. This change was made to simplify CRD installation with Helm. We recommend installing RBAC Definitions separately from the chart. + +For backwards compatibility with the chart originally included in the rbac-manager repository, we've removed the Helm `install-crd` hook from this chart. Unfortunately as part of improving backwards compatibility with the chart in the rbac-manager repository, we have made it more difficult to upgrade from the inital versions of the charts here. + +Some quirks in Helm make the upgrade process from 0.x of this chart to 1.x challenging due to the potential of the RBAC Definition CRD getting deleted. In most cases, reinstalling the chart will be the best path forward. + +If either of the following apply and you are upgrading from an earlier version of the chart found in this repository, keep on reading: +1. A momentary lapse in access granted by RBAC Definitions is unacceptable. +2. You're using auth tokens from Service Accounts created by RBAC Manager. + +The following process has worked repeatedly for us to upgrade from an older version of this chart to 1.0.0. These steps worked with Helm and Tiller 2.12.3 for us, but due to the absurdity of this process, we can't guarantee it will work for you. + +1. Install rbac-manager with chart that uses install-crd hook (`fairwinds-stable/rbac-manager@0.2.1`) +2. Upgrade to rbac-manager chart that doesn't use install-crd hook (`fairwinds-stable/rbac-manager@1.0.0`) - this upgrade fails but is important later +3. Upgrade to original rbac-manager chart that uses install-crd hook (`fairwinds-stable/rbac-manager@0.2.1`) - this works +4. Rollback to revision 2 - this fails +5. Rollback to revision 2 - this works + +In the above workflow, an RBAC Definition installed between revision 1 and 2 should persist through to revision 5. This process is admittedly quite strange, and in our testing the second rollback (step 5) is indeed required for this process to work. + +## Usage + +We recommend installing rbac-manager in its own namespace and specifying the version to ensure consistency: + +```bash +helm repo add fairwinds-stable [https://charts.fairwinds.com/stable](https://charts.fairwinds.com/stable) +helm install rbac-manager fairwinds-stable/rbac-manager --namespace rbac-manager --set image.tag=v1.10.0 +``` + +## References +https://github.com/FairwindsOps/rbac-manager +https://rbac-manager.docs.fairwinds.com/ + + + + + diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager-2.0.0.tgz b/packs/rbacmanager-1.10.0/charts/rbac-manager-2.0.0.tgz new file mode 100644 index 00000000..56bb4a8e Binary files /dev/null and b/packs/rbacmanager-1.10.0/charts/rbac-manager-2.0.0.tgz differ diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/.helmignore b/packs/rbacmanager-1.10.0/charts/rbac-manager/.helmignore new file mode 100644 index 00000000..f0c13194 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/Chart.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/Chart.yaml new file mode 100644 index 00000000..87535a92 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +appVersion: 1.10.0 +description: A Kubernetes operator that simplifies the management of Role Bindings + and Service Accounts. +home: https://rbac-manager.docs.fairwinds.com +icon: https://raw.githubusercontent.com/FairwindsOps/charts/master/stable/rbac-manager/icon.png +keywords: +- rbac +- authorization +kubeVersion: '>= 1.22.0-0' +maintainers: +- email: andy@fairwinds.com + name: sudermanjr +name: rbac-manager +sources: +- https://github.com/FairwindsOps/charts/tree/master/stable/rbac-manager +- https://github.com/FairwindsOps/rbac-manager +version: 2.0.0 diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/README.md b/packs/rbacmanager-1.10.0/charts/rbac-manager/README.md new file mode 100644 index 00000000..6e127341 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/README.md @@ -0,0 +1,85 @@ +# RBAC Manager + +[RBAC Manager](https://fairwindsops.github.io/rbac-manager/) was designed to simplify authorization in Kubernetes. This is an operator that supports declarative configuration for RBAC with new custom resources. Instead of managing role bindings or service accounts directly, you can specify a desired state and RBAC Manager will make the necessary changes to achieve that state. + +This project has three main goals: + +1. Provide a declarative approach to RBAC that is more approachable and scalable. +2. Reduce the amount of configuration required for great auth. +3. Enable automation of RBAC configuration updates with CI/CD. + +More information about RBAC Manager is available on [GitHub](https://github.com/FairwindsOps/rbac-manager) as well as from the [official documentation](https://fairwindsops.github.io/rbac-manager/). + +## Installation + +We recommend installing rbac-manager in its own namespace and a simple release name: + +``` +helm repo add fairwinds-stable https://charts.fairwinds.com/stable +helm install rbac-manager fairwinds-stable/rbac-manager --namespace rbac-manager +``` + +## Prerequisites + +As of chart version 1.6.0 Kubernetes 1.16+, Helm 2.10+ + +Helm 3 will be made mandatory in the future. + +## Upgrading to Chart Version 2.0.0 + +**Breaking:** The default container image is now `us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager`. The previous default, `quay.io/reactiveops/rbac-manager`, is deprecated. + +To remain on Quay during migration, set `image.repository` (and `image.tag` if needed) in your values. + +## Upgrading to Chart Version 1.0.0 + +The upgrade to version 1.0.0 of this chart removes support for installing RBAC Definitions as part of the chart values. This change was made to simplify CRD installation with Helm. We recommend installing RBAC Definitions separately from the chart. + +For backwards compatibility with the chart originally included in the rbac-manager repository, we've removed the Helm `install-crd` hook from this chart. Unfortunately as part of improving backwards compatibility with the chart in the rbac-manager repository, we have made it more difficult to upgrade from the inital versions of the charts here. + +Some quirks in Helm make the upgrade process from 0.x of this chart to 1.x challenging due to the potential of the RBAC Definition CRD getting deleted. In most cases, reinstalling the chart will be the best path forward. + +If either of the following apply and you are upgrading from an earlier version of the chart found in this repository, keep on reading: + +1. A momentary lapse in access granted by RBAC Definitions is unacceptable +2. You're using auth tokens from Service Accounts created by RBAC Manager + +The following process has worked repeatedly for us to upgrade from an older version of this chart to 1.0.0. These steps worked with Helm and Tiller 2.12.3 for us, but due to the absurdity of this process, we can't guarantee it will work for you. + +1. Install rbac-manager with chart that uses install-crd hook (fairwinds-stable/rbac-manager@0.2.1) +2. Upgrade to rbac-manager chart that doesn't use install-crd hook (fairwinds-stable/rbac-manager@1.0.0) - this upgrade fails but is important later +3. Upgrade to original rbac-manager chart that uses install-crd hook (fairwinds-stable/rbac-manager@0.2.1) - this works +4. Rollback to revision 2 - this fails +5. Rollback to revision 2 - this works + +In the above workflow, an RBAC Definition installed between revision 1 and 2 should persist through to revision 5. This process is admittedly quite strange, and in our testing the second rollback (step 5) is indeed required for this process to work. + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| image.repository | string | `"us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager"` | The image to run for rbac manager | +| image.tag | string | `""` | The tag of the image to run. Defaults to the Chart's AppVersion | +| image.digest | string | `""` | The digest of the image to run | +| image.pullPolicy | string | `"Always"` | The image pullPolicy. Recommend not changing this | +| image.imagePullSecrets | list | `[]` | | +| extraArgs | object | `{}` | A map of flag=value to pass to rbac-manager | +| installCRDs | bool | `true` | If true, install and upgrade CRDs. See the Helm documentation for [best practices regarding CRDs](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#install-a-crd-declaration-before-using-the-resource). | +| crds.additionalLabels | object | `{}` | add additional labels to the installed CRDs | +| rbac.additionalLabels | object | `{}` | add additional labels to the installed RBAC resources | +| resources | object | `{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}` | A resources block for the rbac-manager pods | +| priorityClassName | string | `""` | The name of a priorityClass to use | +| nodeSelector | object | `{}` | Deployment nodeSelector | +| tolerations | list | `[]` | Deployment tolerations | +| affinity | object | `{}` | Deployment affinity | +| podAnnotations | object | `{}` | Annotations to apply to the pods | +| podLabels | object | `{}` | Labels to apply to the pod | +| podSecurityContext | object | `{}` | securityContext to apply to the whole pod | +| securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsNonRoot":true}` | securityContext to apply to the rbac-manager container | +| deploymentLabels | object | `{}` | Labels to apply to the Deployment resource | +| serviceMonitor.enabled | bool | `false` | If true, a ServiceMonitor will be created for Prometheus | +| serviceMonitor.additionalLabels | list | `[]` | Additional labels to ServiceMonitor | +| serviceMonitor.annotations | object | `{}` | Annotations to apply to the serviceMonitor and headless service | +| serviceMonitor.namespace | string | `""` | The namespace to deploy the serviceMonitor into | +| serviceMonitor.interval | string | `"60s"` | How often to scrape the metrics endpoint | +| serviceMonitor.relabelings | list | `[]` | RelabelConfigs to apply to samples before scraping | diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/README.md.gotmpl b/packs/rbacmanager-1.10.0/charts/rbac-manager/README.md.gotmpl new file mode 100644 index 00000000..1aed5204 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/README.md.gotmpl @@ -0,0 +1,57 @@ +# RBAC Manager + +[RBAC Manager](https://fairwindsops.github.io/rbac-manager/) was designed to simplify authorization in Kubernetes. This is an operator that supports declarative configuration for RBAC with new custom resources. Instead of managing role bindings or service accounts directly, you can specify a desired state and RBAC Manager will make the necessary changes to achieve that state. + +This project has three main goals: + +1. Provide a declarative approach to RBAC that is more approachable and scalable. +2. Reduce the amount of configuration required for great auth. +3. Enable automation of RBAC configuration updates with CI/CD. + +More information about RBAC Manager is available on [GitHub](https://github.com/FairwindsOps/rbac-manager) as well as from the [official documentation](https://fairwindsops.github.io/rbac-manager/). + +## Installation + +We recommend installing rbac-manager in its own namespace and a simple release name: + +``` +helm repo add fairwinds-stable https://charts.fairwinds.com/stable +helm install rbac-manager fairwinds-stable/rbac-manager --namespace rbac-manager +``` + +## Prerequisites + +As of chart version 1.6.0 Kubernetes 1.16+, Helm 2.10+ + +Helm 3 will be made mandatory in the future. + +## Upgrading to Chart Version 2.0.0 + +**Breaking:** The default container image is now `us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager`. The previous default, `quay.io/reactiveops/rbac-manager`, is deprecated. + +To remain on Quay during migration, set `image.repository` (and `image.tag` if needed) in your values. + +## Upgrading to Chart Version 1.0.0 + +The upgrade to version 1.0.0 of this chart removes support for installing RBAC Definitions as part of the chart values. This change was made to simplify CRD installation with Helm. We recommend installing RBAC Definitions separately from the chart. + +For backwards compatibility with the chart originally included in the rbac-manager repository, we've removed the Helm `install-crd` hook from this chart. Unfortunately as part of improving backwards compatibility with the chart in the rbac-manager repository, we have made it more difficult to upgrade from the inital versions of the charts here. + +Some quirks in Helm make the upgrade process from 0.x of this chart to 1.x challenging due to the potential of the RBAC Definition CRD getting deleted. In most cases, reinstalling the chart will be the best path forward. + +If either of the following apply and you are upgrading from an earlier version of the chart found in this repository, keep on reading: + +1. A momentary lapse in access granted by RBAC Definitions is unacceptable +2. You're using auth tokens from Service Accounts created by RBAC Manager + +The following process has worked repeatedly for us to upgrade from an older version of this chart to 1.0.0. These steps worked with Helm and Tiller 2.12.3 for us, but due to the absurdity of this process, we can't guarantee it will work for you. + +1. Install rbac-manager with chart that uses install-crd hook (fairwinds-stable/rbac-manager@0.2.1) +2. Upgrade to rbac-manager chart that doesn't use install-crd hook (fairwinds-stable/rbac-manager@1.0.0) - this upgrade fails but is important later +3. Upgrade to original rbac-manager chart that uses install-crd hook (fairwinds-stable/rbac-manager@0.2.1) - this works +4. Rollback to revision 2 - this fails +5. Rollback to revision 2 - this works + +In the above workflow, an RBAC Definition installed between revision 1 and 2 should persist through to revision 5. This process is admittedly quite strange, and in our testing the second rollback (step 5) is indeed required for this process to work. + +{{ template "chart.valuesSection" . }} diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/ci/digest-values.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/ci/digest-values.yaml new file mode 100644 index 00000000..bfc3c7a3 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/ci/digest-values.yaml @@ -0,0 +1,2 @@ +image: + digest: sha256:6d19fab047a0fa6c687e94bb6bf02f73bc304938add5501aefc1524a2bf381b1 diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/ci/test-values.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/ci/test-values.yaml new file mode 100644 index 00000000..dbb44e88 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/ci/test-values.yaml @@ -0,0 +1,5 @@ +extraArgs: + log-level: DEBUG + +deploymentLabels: + test: test diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/icon.png b/packs/rbacmanager-1.10.0/charts/rbac-manager/icon.png new file mode 100644 index 00000000..15c9a8ac Binary files /dev/null and b/packs/rbacmanager-1.10.0/charts/rbac-manager/icon.png differ diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/NOTES.txt b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/NOTES.txt new file mode 100644 index 00000000..68b09bad --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/NOTES.txt @@ -0,0 +1,7 @@ +Thanks for installing RBAC Manager! To see what it's doing, use `kubectl logs` for your new RBAC Manager pod. + +If you haven't already installed an RBAC Definition to configure your authorization, visit https://rbac-manager.docs.fairwinds.com/ for more information. + +For more information on integrating RBAC with common authentication patterns, visit https://rbac-manager.docs.fairwinds.com/ -> Cloud Provider Auth. + +If you run into any problems or find something missing in the documentation, don't hesitate to open an issue here: https://github.com/fairwindsops/rbac-manager/issues. diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/_helpers.tpl b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/_helpers.tpl new file mode 100644 index 00000000..b257503a --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/_helpers.tpl @@ -0,0 +1,48 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "rbac-manager.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "rbac-manager.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "rbac-manager.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +RBAC Manager OSS images use v-prefixed semver tags on Artifact Registry (e.g. v1.10.0). +*/}} +{{- define "rbac-manager.imageTag" -}} +{{- if .Values.image.tag -}} +{{- .Values.image.tag -}} +{{- else -}} +{{- $v := .Chart.AppVersion -}} +{{- if hasPrefix "v" $v -}} +{{- $v -}} +{{- else -}} +{{- printf "v%s" $v -}} +{{- end -}} +{{- end -}} +{{- end -}} diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/clusterrole.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/clusterrole.yaml new file mode 100644 index 00000000..55f55aec --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/clusterrole.yaml @@ -0,0 +1,49 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "rbac-manager.fullname" . }} + labels: + app: {{ template "rbac-manager.name" . }} + chart: {{ template "rbac-manager.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.rbac.additionalLabels }} +{{ toYaml .Values.rbac.additionalLabels | indent 4 }} + {{- end }} + +rules: + - apiGroups: + - rbacmanager.reactiveops.io + resources: + - rbacdefinitions + verbs: + - get + - list + - watch + - apiGroups: + - rbac.authorization.k8s.io + - authorization.k8s.io + resources: + - '*' + verbs: + - '*' + - apiGroups: + - "" # core + resources: + - serviceaccounts + verbs: + - '*' + - apiGroups: + - "" # core + resources: + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - rbacmanager.reactiveops.io + resources: + - rbacdefinitions/finalizers + verbs: + - "*" diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/clusterrolebinding.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/clusterrolebinding.yaml new file mode 100644 index 00000000..2a93f716 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/clusterrolebinding.yaml @@ -0,0 +1,20 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "rbac-manager.fullname" . }} + labels: + app: {{ template "rbac-manager.name" . }} + chart: {{ template "rbac-manager.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.rbac.additionalLabels }} +{{ toYaml .Values.rbac.additionalLabels | indent 4 }} + {{- end }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "rbac-manager.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ template "rbac-manager.fullname" . }} + namespace: {{ .Release.Namespace | quote }} diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/customresourcedefinition.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/customresourcedefinition.yaml new file mode 100644 index 00000000..df9f5289 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/customresourcedefinition.yaml @@ -0,0 +1,119 @@ +{{- if .Values.installCRDs }} +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: rbacdefinitions.rbacmanager.reactiveops.io + labels: + app: {{ template "rbac-manager.name" . }} + chart: {{ template "rbac-manager.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.crds.additionalLabels }} +{{ toYaml .Values.crds.additionalLabels | indent 4 }} + {{- end }} +spec: + group: rbacmanager.reactiveops.io + names: + kind: RBACDefinition + plural: rbacdefinitions + singular: rbacdefinition + shortNames: + - rbd + - rbacdef + scope: Cluster + versions: + - name: v1beta1 + served: true + storage: true + schema: + openAPIV3Schema: + required: + - rbacBindings + type: object + properties: + rbacBindings: + items: + properties: + clusterRoleBindings: + items: + properties: + clusterRole: + type: string + required: + - clusterRole + type: object + type: array + name: + type: string + roleBindings: + items: + properties: + clusterRole: + type: string + namespace: + type: string + namespaceSelector: + type: object + properties: + matchLabels: + type: object + additionalProperties: + type: string + matchExpressions: + type: array + items: + type: object + properties: + key: + type: string + operator: + type: + string + enum: + - Exists + - DoesNotExist + - In + - NotIn + values: + type: array + items: + type: string + required: + - key + - operator + role: + type: string + type: object + type: array + subjects: + items: + type: object + properties: + automountServiceAccountToken: + type: boolean + imagePullSecrets: + type: array + items: + type: string + kind: + type: string + enum: + - Group + - ServiceAccount + - User + name: + type: string + namespace: + type: string + required: + - name + - kind + type: array + required: + - name + - subjects + type: object + type: array + status: + type: object +{{- end -}} diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/deployment.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/deployment.yaml new file mode 100644 index 00000000..054306d9 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/deployment.yaml @@ -0,0 +1,88 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "rbac-manager.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "rbac-manager.name" . }} + chart: {{ template "rbac-manager.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.deploymentLabels }} + {{ toYaml .Values.deploymentLabels | nindent 4 }} + {{- end }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ template "rbac-manager.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "rbac-manager.name" . }} + release: {{ .Release.Name }} + {{- if .Values.podLabels }} +{{ toYaml .Values.podLabels | indent 8 }} + {{- end }} + {{- if .Values.podAnnotations }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8 }} + {{- end }} + spec: + serviceAccountName: {{ template "rbac-manager.fullname" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.image.imagePullSecrets }} + imagePullSecrets: + {{- range .Values.image.imagePullSecrets }} + - name: {{ . }} + {{- end}} + {{- end}} +{{- if .Values.priorityClassName }} + priorityClassName: {{ .Values.priorityClassName }} +{{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}{{- if (.Values.image.digest) -}} @{{ .Values.image.digest }}{{- else -}}:{{ include "rbac-manager.imageTag" . }}{{- end -}}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - /rbac-manager + {{- range $name, $value := .Values.extraArgs }} + - --{{ $name }}={{ $value }} + {{- end }} + readinessProbe: + httpGet: + scheme: HTTP + path: /metrics + port: 8042 + initialDelaySeconds: 5 + timeoutSeconds: 3 + periodSeconds: 3 + failureThreshold: 3 + livenessProbe: + httpGet: + scheme: HTTP + path: /metrics + port: 8042 + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} + ports: + # metrics port + - name: http-metrics + containerPort: 8042 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 10 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/headless-service.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/headless-service.yaml new file mode 100644 index 00000000..97c5ce07 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/headless-service.yaml @@ -0,0 +1,27 @@ +{{- if and .Values.serviceMonitor.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "rbac-manager.fullname" . }}-headless + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "rbac-manager.name" . }} + chart: {{ template "rbac-manager.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.serviceMonitor.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + clusterIP: None + selector: + app: {{ template "rbac-manager.name" . }} + release: {{ .Release.Name }} + type: ClusterIP + ports: + - name: metrics + port: 8042 + protocol: TCP + targetPort: 8042 +{{- end }} diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/serviceaccount.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/serviceaccount.yaml new file mode 100644 index 00000000..74de138b --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "rbac-manager.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "rbac-manager.name" . }} + chart: {{ template "rbac-manager.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.rbac.additionalLabels }} +{{ toYaml .Values.rbac.additionalLabels | indent 4 }} + {{- end }} diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/servicemonitor.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/servicemonitor.yaml new file mode 100644 index 00000000..f5dd0e0b --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/templates/servicemonitor.yaml @@ -0,0 +1,36 @@ +{{- if .Values.serviceMonitor.enabled }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "rbac-manager.fullname" . }} + namespace: {{ .Values.serviceMonitor.namespace | default .Release.Namespace }} + labels: + app: {{ template "rbac-manager.name" . }} + chart: {{ template "rbac-manager.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.serviceMonitor.additionalLabels }} +{{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }} + {{- end }} +{{- with .Values.serviceMonitor.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + endpoints: + - interval: {{ .Values.serviceMonitor.interval }} + port: metrics + path: /metrics + {{- with .Values.serviceMonitor.relabelings }} + relabelings: + {{- toYaml . | nindent 6 }} + {{- end }} + selector: + matchLabels: + app: {{ template "rbac-manager.name" . }} + release: {{ .Release.Name }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/packs/rbacmanager-1.10.0/charts/rbac-manager/values.yaml b/packs/rbacmanager-1.10.0/charts/rbac-manager/values.yaml new file mode 100644 index 00000000..70b88f16 --- /dev/null +++ b/packs/rbacmanager-1.10.0/charts/rbac-manager/values.yaml @@ -0,0 +1,80 @@ +image: + # image.repository -- The image to run for rbac manager + repository: us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager + # image.tag -- The tag of the image to run. Defaults to the Chart's AppVersion + tag: "" + # image.digest -- The digest of the image to run + digest: "" + # image.pullPolicy -- The image pullPolicy. Recommend not changing this + pullPolicy: Always + # imagePullSecrets -- A list of imagePullSecrets to reference for pulling the image + imagePullSecrets: [] + +# extraArgs -- A map of flag=value to pass to rbac-manager +extraArgs: {} + +# installCRDs -- If true, install and upgrade CRDs. See the Helm documentation for [best practices regarding CRDs](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#install-a-crd-declaration-before-using-the-resource). +installCRDs: true + +crds: +# crds.additionalLabels -- add additional labels to the installed CRDs + additionalLabels: {} + +rbac: +# rbac.additionalLabels -- add additional labels to the installed RBAC resources + additionalLabels: {} + +# resources -- A resources block for the rbac-manager pods +resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + +# priorityClassName -- The name of a priorityClass to use +priorityClassName: "" + +# nodeSelector -- Deployment nodeSelector +nodeSelector: {} + +# tolerations -- Deployment tolerations +tolerations: [] + +# affinity -- Deployment affinity +affinity: {} + +# podAnnotations -- Annotations to apply to the pods +podAnnotations: {} +# podLabels -- Labels to apply to the pod +podLabels: {} + +# podSecurityContext -- securityContext to apply to the whole pod +podSecurityContext: {} +# securityContext -- securityContext to apply to the rbac-manager container +securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + capabilities: + drop: + - ALL + +# deploymentLabels -- Labels to apply to the Deployment resource +deploymentLabels: {} + +serviceMonitor: + # serviceMonitor.enabled -- If true, a ServiceMonitor will be created for Prometheus + enabled: false + # serviceMonitor.additionalLabels -- Additional labels to ServiceMonitor + additionalLabels: [] + # serviceMonitor.annotations -- Annotations to apply to the serviceMonitor and headless service + annotations: {} + # serviceMonitor.namespace -- The namespace to deploy the serviceMonitor into + namespace: "" + # serviceMonitor.interval -- How often to scrape the metrics endpoint + interval: 60s + # serviceMonitor.relabelings -- RelabelConfigs to apply to samples before scraping + relabelings: [] diff --git a/packs/rbacmanager-1.10.0/logo.png b/packs/rbacmanager-1.10.0/logo.png new file mode 100644 index 00000000..15c9a8ac Binary files /dev/null and b/packs/rbacmanager-1.10.0/logo.png differ diff --git a/packs/rbacmanager-1.10.0/pack.json b/packs/rbacmanager-1.10.0/pack.json new file mode 100644 index 00000000..20fb262d --- /dev/null +++ b/packs/rbacmanager-1.10.0/pack.json @@ -0,0 +1,38 @@ +{ + "addonType": "authentication", + "annotations": { + "source": "community", + "contributor" : "spectrocloud" + }, + "cloudTypes": [ + "all" + ], + "charts": [ + "charts/rbac-manager-2.0.0.tgz" + ], + "displayName": "RBAC Manager", + "layer":"addon", + "name": "rbac-manager", + "version": "1.10.0", + "constraints": { + "dependencies": [ + { + "packName": "kubernetes", + "layer": "k8s", + "minVersion": "1.29", + "maxVersion": "", + "type": "optional" + } + ], + "resources": [ + { + "type": "cpu", + "minLimit": 100 + }, + { + "type": "memory", + "minLimit": 128 + } + ] + } +} diff --git a/packs/rbacmanager-1.10.0/values.yaml b/packs/rbacmanager-1.10.0/values.yaml new file mode 100644 index 00000000..e8de153f --- /dev/null +++ b/packs/rbacmanager-1.10.0/values.yaml @@ -0,0 +1,94 @@ +pack: + namespace: "rbac-manager" + content: + images: + - image: us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager:v1.10.0 + + charts: + - repo: + name: rbac-manager + version: 2.0.0 + + +charts: + rbac-manager: + image: + # image.repository -- The image to run for rbac manager + repository: us-docker.pkg.dev/fairwinds-ops/oss/rbac-manager + # image.tag -- The tag of the image to run. Defaults to the Chart's AppVersion + tag: "v1.10.0" + # image.digest -- The digest of the image to run + digest: "" + # image.pullPolicy -- The image pullPolicy. Recommend not changing this + pullPolicy: Always + # imagePullSecrets -- A list of imagePullSecrets to reference for pulling the image + imagePullSecrets: [] + + # extraArgs -- A map of flag=value to pass to rbac-manager + extraArgs: {} + + # installCRDs -- If true, install and upgrade CRDs. See the Helm documentation for [best practices regarding CRDs](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#install-a-crd-declaration-before-using-the-resource). + installCRDs: true + + crds: + # crds.additionalLabels -- add additional labels to the installed CRDs + additionalLabels: {} + + rbac: + # rbac.additionalLabels -- add additional labels to the installed RBAC resources + additionalLabels: {} + + # resources -- A resources block for the rbac-manager pods + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 100m + memory: 128Mi + + # priorityClassName -- The name of a priorityClass to use + priorityClassName: "" + + # nodeSelector -- Deployment nodeSelector + nodeSelector: {} + + # tolerations -- Deployment tolerations + tolerations: [] + + # affinity -- Deployment affinity + affinity: {} + + # podAnnotations -- Annotations to apply to the pods + podAnnotations: {} + # podLabels -- Labels to apply to the pod + podLabels: {} + + # podSecurityContext -- securityContext to apply to the whole pod + podSecurityContext: {} + # securityContext -- securityContext to apply to the rbac-manager container + securityContext: + allowPrivilegeEscalation: false + privileged: false + readOnlyRootFilesystem: true + runAsNonRoot: true + capabilities: + drop: + - ALL + + # deploymentLabels -- Labels to apply to the Deployment resource + deploymentLabels: {} + + serviceMonitor: + # serviceMonitor.enabled -- If true, a ServiceMonitor will be created for Prometheus + enabled: false + # serviceMonitor.additionalLabels -- Additional labels to ServiceMonitor + additionalLabels: [] + # serviceMonitor.annotations -- Annotations to apply to the serviceMonitor and headless service + annotations: {} + # serviceMonitor.namespace -- The namespace to deploy the serviceMonitor into + namespace: "" + # serviceMonitor.interval -- How often to scrape the metrics endpoint + interval: 60s + # serviceMonitor.relabelings -- RelabelConfigs to apply to samples before scraping + relabelings: []