From 76268761f9555840fdbe961bde01d56a58fabaa9 Mon Sep 17 00:00:00 2001 From: Juan Jose Jaramillo Date: Wed, 1 May 2024 11:58:00 -0700 Subject: [PATCH] feat: Streamline and rename chart --- .../.helmignore | 0 charts/k8s-agents-operator/Chart.yaml | 6 ++++++ .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 0 .../templates/certmanager.yaml | 0 .../templates/deployment.yaml | 0 .../templates/instrumentation-crd.yaml | 0 .../templates/leader-election-rbac.yaml | 0 .../templates/manager-rbac.yaml | 0 .../mutating-webhook-configuration.yaml | 0 .../templates/newrelic_license_secret.yaml | 0 .../templates/proxy-rbac.yaml | 0 .../templates/reader-rbac.yaml | 0 .../templates/selfsigned-issuer.yaml | 0 .../templates/service.yaml | 0 .../validating-webhook-configuration.yaml | 0 .../templates/webhook-service.yaml | 0 .../values.yaml | 18 ++++++++-------- charts/newrelic-agent-operator/Chart.yaml | 21 ------------------- 19 files changed, 15 insertions(+), 30 deletions(-) rename charts/{newrelic-agent-operator => k8s-agents-operator}/.helmignore (100%) create mode 100644 charts/k8s-agents-operator/Chart.yaml rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/NOTES.txt (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/_helpers.tpl (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/certmanager.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/deployment.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/instrumentation-crd.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/leader-election-rbac.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/manager-rbac.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/mutating-webhook-configuration.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/newrelic_license_secret.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/proxy-rbac.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/reader-rbac.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/selfsigned-issuer.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/service.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/validating-webhook-configuration.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/templates/webhook-service.yaml (100%) rename charts/{newrelic-agent-operator => k8s-agents-operator}/values.yaml (57%) delete mode 100644 charts/newrelic-agent-operator/Chart.yaml diff --git a/charts/newrelic-agent-operator/.helmignore b/charts/k8s-agents-operator/.helmignore similarity index 100% rename from charts/newrelic-agent-operator/.helmignore rename to charts/k8s-agents-operator/.helmignore diff --git a/charts/k8s-agents-operator/Chart.yaml b/charts/k8s-agents-operator/Chart.yaml new file mode 100644 index 00000000..b77a14b9 --- /dev/null +++ b/charts/k8s-agents-operator/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: k8s-agents-operator +description: A Helm chart for the Kubernetes Agents Operator +type: application +version: '0.1.0' +appVersion: '0.1.0' diff --git a/charts/newrelic-agent-operator/templates/NOTES.txt b/charts/k8s-agents-operator/templates/NOTES.txt similarity index 100% rename from charts/newrelic-agent-operator/templates/NOTES.txt rename to charts/k8s-agents-operator/templates/NOTES.txt diff --git a/charts/newrelic-agent-operator/templates/_helpers.tpl b/charts/k8s-agents-operator/templates/_helpers.tpl similarity index 100% rename from charts/newrelic-agent-operator/templates/_helpers.tpl rename to charts/k8s-agents-operator/templates/_helpers.tpl diff --git a/charts/newrelic-agent-operator/templates/certmanager.yaml b/charts/k8s-agents-operator/templates/certmanager.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/certmanager.yaml rename to charts/k8s-agents-operator/templates/certmanager.yaml diff --git a/charts/newrelic-agent-operator/templates/deployment.yaml b/charts/k8s-agents-operator/templates/deployment.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/deployment.yaml rename to charts/k8s-agents-operator/templates/deployment.yaml diff --git a/charts/newrelic-agent-operator/templates/instrumentation-crd.yaml b/charts/k8s-agents-operator/templates/instrumentation-crd.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/instrumentation-crd.yaml rename to charts/k8s-agents-operator/templates/instrumentation-crd.yaml diff --git a/charts/newrelic-agent-operator/templates/leader-election-rbac.yaml b/charts/k8s-agents-operator/templates/leader-election-rbac.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/leader-election-rbac.yaml rename to charts/k8s-agents-operator/templates/leader-election-rbac.yaml diff --git a/charts/newrelic-agent-operator/templates/manager-rbac.yaml b/charts/k8s-agents-operator/templates/manager-rbac.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/manager-rbac.yaml rename to charts/k8s-agents-operator/templates/manager-rbac.yaml diff --git a/charts/newrelic-agent-operator/templates/mutating-webhook-configuration.yaml b/charts/k8s-agents-operator/templates/mutating-webhook-configuration.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/mutating-webhook-configuration.yaml rename to charts/k8s-agents-operator/templates/mutating-webhook-configuration.yaml diff --git a/charts/newrelic-agent-operator/templates/newrelic_license_secret.yaml b/charts/k8s-agents-operator/templates/newrelic_license_secret.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/newrelic_license_secret.yaml rename to charts/k8s-agents-operator/templates/newrelic_license_secret.yaml diff --git a/charts/newrelic-agent-operator/templates/proxy-rbac.yaml b/charts/k8s-agents-operator/templates/proxy-rbac.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/proxy-rbac.yaml rename to charts/k8s-agents-operator/templates/proxy-rbac.yaml diff --git a/charts/newrelic-agent-operator/templates/reader-rbac.yaml b/charts/k8s-agents-operator/templates/reader-rbac.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/reader-rbac.yaml rename to charts/k8s-agents-operator/templates/reader-rbac.yaml diff --git a/charts/newrelic-agent-operator/templates/selfsigned-issuer.yaml b/charts/k8s-agents-operator/templates/selfsigned-issuer.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/selfsigned-issuer.yaml rename to charts/k8s-agents-operator/templates/selfsigned-issuer.yaml diff --git a/charts/newrelic-agent-operator/templates/service.yaml b/charts/k8s-agents-operator/templates/service.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/service.yaml rename to charts/k8s-agents-operator/templates/service.yaml diff --git a/charts/newrelic-agent-operator/templates/validating-webhook-configuration.yaml b/charts/k8s-agents-operator/templates/validating-webhook-configuration.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/validating-webhook-configuration.yaml rename to charts/k8s-agents-operator/templates/validating-webhook-configuration.yaml diff --git a/charts/newrelic-agent-operator/templates/webhook-service.yaml b/charts/k8s-agents-operator/templates/webhook-service.yaml similarity index 100% rename from charts/newrelic-agent-operator/templates/webhook-service.yaml rename to charts/k8s-agents-operator/templates/webhook-service.yaml diff --git a/charts/newrelic-agent-operator/values.yaml b/charts/k8s-agents-operator/values.yaml similarity index 57% rename from charts/newrelic-agent-operator/values.yaml rename to charts/k8s-agents-operator/values.yaml index b8579cc0..2a286cf4 100644 --- a/charts/newrelic-agent-operator/values.yaml +++ b/charts/k8s-agents-operator/values.yaml @@ -1,8 +1,9 @@ -# IMPORTANT: Specify your New Relic Ingest key here. +# -- Ingest license key to use # licenseKey: controllerManager: replicas: 1 + kubeRbacProxy: image: repository: gcr.io/kubebuilder/kube-rbac-proxy @@ -15,7 +16,6 @@ controllerManager: cpu: 5m memory: 64Mi - ## Provide New Relic Agent Operator manager container image and resources. manager: image: repository: ghcr.io/newrelic-experimental/newrelic-agent-operator/newrelic-agent-operator @@ -24,16 +24,15 @@ controllerManager: requests: cpu: 100m memory: 64Mi - # -- Create the manager ServiceAccount serviceAccount: create: true - - ## Enable leader election mechanism for protecting against split brain if multiple operator pods/replicas are started. - ## See more at https://docs.openshift.com/container-platform/4.10/operators/operator_sdk/osdk-leader-election.html + # -- Enable leader election mechanism for protecting against split brain if multiple operator pods/replicas are started + # -- See more at https://docs.openshift.com/container-platform/4.10/operators/operator_sdk/osdk-leader-election.html leaderElection: enabled: true kubernetesClusterDomain: cluster.local + metricsService: ports: - name: https @@ -41,6 +40,7 @@ metricsService: protocol: TCP targetPort: https type: ClusterIP + webhookService: ports: - port: 443 @@ -48,14 +48,14 @@ webhookService: targetPort: 9443 type: ClusterIP -## SecurityContext holds pod-level security attributes and common container settings. -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +# -- SecurityContext holds pod-level security attributes and common container settings +# -- ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: runAsGroup: 65532 runAsNonRoot: true runAsUser: 65532 fsGroup: 65532 -## Admission webhooks make sure only requests with correctly formatted rules will get into the Operator. +# -- Admission webhooks make sure only requests with correctly formatted rules will get into the Operator admissionWebhooks: create: true diff --git a/charts/newrelic-agent-operator/Chart.yaml b/charts/newrelic-agent-operator/Chart.yaml deleted file mode 100644 index 00237c41..00000000 --- a/charts/newrelic-agent-operator/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v2 -name: newrelic-agent-operator -description: A Helm chart for the New Relic Agent Operator -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.5 -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "0.1.2"