From 560b5d7fe1bc8659ba23dd4f937b632582005f4a Mon Sep 17 00:00:00 2001 From: Bryant Biggs Date: Thu, 3 Oct 2024 10:16:21 -0500 Subject: [PATCH] chore: Deprecate `amazon-ec2-metadata-mock` to use upstream repo and Public ECR --- README.md | 3 +- stable/amazon-ec2-metadata-mock/.helmignore | 22 -- stable/amazon-ec2-metadata-mock/Chart.yaml | 24 -- stable/amazon-ec2-metadata-mock/README.md | 247 ------------------ .../ci/configmap-values.yaml | 3 - .../ci/default-values.yaml | 2 - .../ci/local-image-values.yaml | 5 - .../ci/service-config-values.yaml | 3 - .../templates/NOTES.txt | 5 - .../templates/_helpers.tpl | 103 -------- .../templates/clusterrole.yaml | 7 - .../templates/clusterrolebinding.yaml | 12 - .../templates/deployment.linux.yaml | 160 ------------ .../templates/deployment.windows.yaml | 145 ---------- .../templates/psp.yaml | 60 ----- .../templates/service.yaml | 15 -- .../templates/serviceaccount.yaml | 11 - .../templates/tests/test-aemm-service.yaml | 57 ---- .../templates/tests/test-config-map.yaml | 19 -- stable/amazon-ec2-metadata-mock/values.yaml | 117 --------- 20 files changed, 2 insertions(+), 1018 deletions(-) delete mode 100644 stable/amazon-ec2-metadata-mock/.helmignore delete mode 100644 stable/amazon-ec2-metadata-mock/Chart.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/README.md delete mode 100644 stable/amazon-ec2-metadata-mock/ci/configmap-values.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/ci/default-values.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/ci/local-image-values.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/ci/service-config-values.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/templates/NOTES.txt delete mode 100644 stable/amazon-ec2-metadata-mock/templates/_helpers.tpl delete mode 100644 stable/amazon-ec2-metadata-mock/templates/clusterrole.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/templates/clusterrolebinding.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/templates/deployment.linux.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/templates/deployment.windows.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/templates/psp.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/templates/service.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/templates/serviceaccount.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/templates/tests/test-aemm-service.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/templates/tests/test-config-map.yaml delete mode 100644 stable/amazon-ec2-metadata-mock/values.yaml diff --git a/README.md b/README.md index 1e0139865..0857d9066 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,8 @@ helm repo add eks https://aws.github.io/eks-charts ### Amazon EC2 Metadata Mock -* [amazon-ec2-metadata-mock](stable/amazon-ec2-metadata-mock): A tool to simulate Amazon EC2 instance metadata service for local testing +> [!WARNING] +> This Helm chart is now deprecated. Please see the current chart located in the [amazon-ec2-metadata-mock](https://github.com/aws/amazon-ec2-metadata-mock/tree/main/helm) repository which is now published on [Public ECR](https://gallery.ecr.aws/aws-ec2/helm/amazon-ec2-metadata-mock) ### CNI Metrics Helper diff --git a/stable/amazon-ec2-metadata-mock/.helmignore b/stable/amazon-ec2-metadata-mock/.helmignore deleted file mode 100644 index 50af03172..000000000 --- a/stable/amazon-ec2-metadata-mock/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# 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 -.vscode/ diff --git a/stable/amazon-ec2-metadata-mock/Chart.yaml b/stable/amazon-ec2-metadata-mock/Chart.yaml deleted file mode 100644 index 890168a1f..000000000 --- a/stable/amazon-ec2-metadata-mock/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -name: amazon-ec2-metadata-mock -description: A Helm chart for Amazon EC2 Metadata Mock -version: 1.11.2 -home: https://github.com/aws/eks-charts -icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png -sources: - - https://github.com/aws/amazon-ec2-metadata-mock - - https://github.com/aws/eks-charts/ -maintainers: - - name: pdk27 - url: https://github.com/pdk27 - email: pdk27@users.noreply.github.com - - name: brycahta - url: https://github.com/brycahta - email: brycahta@users.noreply.github.com -keywords: - - ec2 - - aws-ec2 - - imds - - ec2-instance-metadata - - ec2-instance-metadata-mock - - spot-interruption-mock - - ec2-rebalance-recommendation diff --git a/stable/amazon-ec2-metadata-mock/README.md b/stable/amazon-ec2-metadata-mock/README.md deleted file mode 100644 index c48cd2869..000000000 --- a/stable/amazon-ec2-metadata-mock/README.md +++ /dev/null @@ -1,247 +0,0 @@ -# Amazon EC2 Metadata Mock - -Amazon EC2 Metadata Mock(AEMM) Helm chart for Kubernetes. For more information on this project see the project repo at https://github.com/aws/amazon-ec2-metadata-mock. - -## Prerequisites - -* Kubernetes >= 1.14 - -## Installing the Chart - -The helm chart can be installed from several sources. To install the chart with the release name amazon-ec2-metadata-mock and default configuration, pick a source below: - -#### eks-charts -The chart for this project is hosted in [eks-charts](https://github.com/aws/eks-charts). - -To get started you need to add the eks-charts repo to helm: - -``` -helm repo add eks https://aws.github.io/eks-charts -``` - -Then install with desired configs: - -``` -helm install amazon-ec2-metadata-mock \ - --namespace default -``` - -#### Local chart archive - -Download and Install the chart archive from the latest release -```sh -curl -L https://github.com/aws/amazon-ec2-metadata-mock/releases/download/v1.11.2/amazon-ec2-metadata-mock-1.11.2.tgz -``` - -```sh -helm install amazon-ec2-metadata-mock amazon-ec2-metadata-mock-1.11.2.tgz \ - --namespace default -``` - -#### Unpacked local chart directory - -Download the source code or unpack the archive from latest release and run -```sh -helm install amazon-ec2-metadata-mock ./helm/amazon-ec2-metadata-mock \ - --namespace default -``` ----- -To upgrade an already installed chart named amazon-ec2-metadata-mock: -```sh -helm upgrade amazon-ec2-metadata-mock ./helm/amazon-ec2-metadata-mock \ - --namespace default -``` - -### Installing the Chart with overridden values for AEMM configuration: - -AEMM has an [extensive list of parameters](https://github.com/aws/amazon-ec2-metadata-mock#defaults) that can overridden. For simplicity, a selective list of parameters are configurable using Helm custom `values.yaml` or `--set argument`. To override parameters not listed in `values.yaml` use Kubernetes ConfigMap. - -The [configuration](#configuration) section details the selective list of parameters. Alternatively, to retrieve the same information via helm, run: -```sh -helm show values ./helm/amazon-ec2-metadata-mock -``` - -* Passing a custom values.yaml to helm -```sh -helm install amazon-ec2-metadata-mock ./helm/amazon-ec2-metadata-mock \ - --namespace default -f path/to/myvalues.yaml -``` - -* Passing custom values to Helm via CLI arguments -```sh -helm install amazon-ec2-metadata-mock ./helm/amazon-ec2-metadata-mock \ - --namespace default --set aemm.spot.action="stop",aemm.mockDelaySec=120 -``` - -* Passing a config file to AEMM - - 1. Create a Kubernetes ConfigMap from a custom AEMM configuration file: -See [Readme](https://github.com/aws/amazon-ec2-metadata-mock#configuration) to learn more about AEMM configuration. [Here](https://github.com/aws/amazon-ec2-metadata-mock/blob/main/test/e2e/testdata/output/aemm-config-used.json) is a reference config file to create your own `aemm-config.json` - - Note: - * AEMM's native config `aemm.server.port` needs to be a fixed value (1338) to be able to run AEMM as a K8s service. So, overriding the `aemm.server.port` in the custom config file will work only when AEMM is accessed via the pod directly. To access the AEMM K8s service on a custom port, override `servicePort` (which is a Helm config). - - * The `configMapFileName` is used to mount the configMap on the containers running AEMM. The default file name is `aemm-config.json`. If a non-default file name was used to create the configMap, override `configMapFileName` in order for AEMM to be able to access it. - - ```sh - kubectl create configmap aemm-config-map --from-file path/to/aemm-config.json - ``` - - 2. Create `myvalues.yaml` with overridden value for configMap: -```yaml -configMap: "aemm-config-map" -servicePort: 1550 -``` - - 3. Install AEMM with override: -```sh -helm install amazon-ec2-metadata-mock ./helm/amazon-ec2-metadata-mock \ - --namespace default -f path/to/myvalues.yaml -``` - -## Making a HTTP request to the AEMM server running on a pod - -1. Access AEMM pod / service - i. Set up port-forwarding to access AEMM on your machine: - - ```sh - kubectl get pods --namespace default - ``` - - ```sh - kubectl port-forward pod/ 1338 - ``` - - or - - ``` - kubectl port-forward service/amazon-ec2-metadata-mock-service 1338 - ``` - - ii. Access AEMM from your application using the ClusterIP / DNS of the service or the pod directly. - -2. Make the HTTP request - - ```sh - # From outside the cluster: - - curl http://localhost:1338/latest/meta-data/spot/instance-action - { - "action": "terminate", - "time": "2020-05-04T18:11:37Z" - } - ``` - or - ```sh - # From inside the cluster: - # ClusterIP and port for the service should be available in the application pod's environment, if it was created after the AEMM service. - - curl http://$AMAZON_EC2_METADATA_MOCK_SERVICE_SERVICE_HOST:$AMAZON_EC2_METADATA_MOCK_SERVICE_SERVICE_PORT/latest/meta-data/spot/instance-action - { - "action": "terminate", - "time": "2020-05-04T18:11:37Z" - } - ``` - or - ```sh - # From inside the cluster: - - curl http://amazon-ec2-metadata-mock-service.default.svc.cluster.local:1338/latest/meta-data/spot/instance-action - { - "action": "terminate", - "time": "2020-05-04T18:11:37Z" - } - ``` - -## Uninstalling the Chart - -To uninstall/delete the `amazon-ec2-metadata-mock` release: -```sh -helm uninstall amazon-ec2-metadata-mock -``` -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Contributing to the Chart -While developing, use test/helm/chart-test.sh to test your changes. Preserve and reuse test environment, by using -p and -r options to run tests quickly. -``` -/test/helm/chart-test.sh -h -``` - -Alternatively, the same tests can be run using: -``` -make helm-lint-test # for linting only -make helm-e2e-test # for e2e tests, including linting -``` - -### Versioning -Increment the chart version when one or more files in the helm chart directory changes: -* Increment patch version for readme changes -* Increment minor version for backward compatible changes / new minor version of the app (appVersion) -* Increment major version for incompatible changes / new major version of the app (appVersion) - -## Configuration - -The following tables lists the configurable parameters of the chart and their default values. - -### General -Parameter | Description | Default ---- | --- | --- -`image.repository` | image repository | `public.ecr.aws/aws-ec2/amazon-ec2-metadata-mock` -`image.tag` | image tag | `` -`image.pullPolicy` | image pull policy | `IfNotPresent` -`replicaCount` | defines the number of amazon-ec2-metadata-mock pods to replicate | `1` -`nameOverride` | override for the name of the Helm Chart (default, if not overridden: `amazon-ec2-metadata-mock`) | `""` -`fullnameOverride` | override for the name of the application (default, if not overridden: `amazon-ec2-metadata-mock`) | `""` -`targetNodeOs` | creates node-OS specific deployments (e.g. "linux", "windows", "linux windows") | `linux` -`nodeSelector` | tells both linux and windows deployments where to place the amazon-ec2-metadata-mock pods. | `{}`, meaning every node will receive a pod -`linuxNodeSelector` | tells the linux deployments where to place the amazon-ec2-metadata-mock pods. | `{}`, meaning every linux node will receive a pod -`windowsNodeSelector` | tells the windows deployments where to place the amazon-ec2-metadata-mock pods. | `{}`, meaning every windows node will receive a pod -`podAnnotations` | annotations to add to each pod | `{}` -`linuxAnnotations` | annotations to add to each linux pod | `{}` -`windowsAnnotations` | annotations to add to each windows pod | `{}` -`tolerations` | specifies taints that a pod tolerates so that it can be scheduled to a node with the same taint | `[]` -`linuxTolerations` | specifies taints that a linux pod tolerates so that it can be scheduled to a node with the same taint | `[]` -`windowsTolerations` | specifies taints that a windows pod tolerates so that it can be scheduled to a node with the same taint | `[]` -`updateStrategy` | the update strategy for a Deployment | `RollingUpdate` -`linuxUpdateStrategy` | the update strategy for a linux Deployment | `""` -`windowsUpdateStrategy` | the update strategy for a windows Deployment | `""` -`rbac.pspEnabled` | if `true`, create and use a restricted pod security policy | `false` -`serviceAccount.create` | if `true`, create a new service account | `true` -`serviceAccount.name` | service account to be used | `amazon-ec2-metadata-mock-service-account` -`serviceAccount.annotations` | specifies the annotations for service account | `{}` -`securityContext.runAsUserID` | user ID to run the container | `1000` -`securityContext.runAsGroupID` | group ID to run the container | `1000` -`namespace` | Kubernetes namespace to use for AEMM pods | `default` -`configMap` | name of the Kubernetes ConfigMap to use to pass a config file for AEMM overrides | `""` -`configMapFileName` | name of the file used to create the Kubernetes ConfigMap | `aemm-config.json` -`servicePort` | port to run AEMM K8s Service on | `1338` -`serviceName` | name of the AEMM K8s Service | `amazon-ec2-metadata-mock-service` - -### Helm chart tests -Parameter | Description | Default ---- | --- | --- -`test.image` | test image to use in the test pod | `centos` -`test.imageTag` | test image tag | `latest` -`test.pullPolicy` | test image pull policy | `IfNotPresent` - -### AEMM parameters -A selective list of AEMM parameters are configurable via Helm CLI and values.yaml file. -Use the [Kubernetes ConfigMap option](#installing-the-chart-with-overridden-values-for-aemm-configuration) to configure [other AEMM parameters](https://github.com/aws/amazon-ec2-metadata-mock/blob/main/test/e2e/testdata/output/aemm-config-used.json). - -Parameter | Description | Default in Helm | Default AEMM configuration ---- | --- | --- | --- -`aemm.server.hostname` | hostname to run AEMM on | `""`, in order to listen on all available interfaces e.g. ClusterIP | `0.0.0.0` -`aemm.mockDelaySec` | spot itn delay in seconds, relative to the start time of AEMM | `0` | `0` -`aemm.mockTriggerTime` | spot itn trigger time in RFC3339 format | `""` | `""` -`aemm.mockIPCount` | number of IPs that can receive spot interrupts and/or scheduled events; subsequent requests will return 404 | `""` | `2` -`aemm.imdsv2` | if true, IMDSv2 only works | `false` | `false`, meaning both IMDSv1/v2 work -`aemm.rebalanceDelaySec` | rebalance rec delay in seconds, relative to the start time of AEMM | `0` | `0` -`aemm.rebalanceTriggerTime` | rebalance rec trigger time in RFC3339 format | `""` | `""` -`aemm.spot.action` | action in the spot interruption notice | `""` | `terminate` -`aemm.spot.time` | time in the spot interruption notice | `""` | HTTP request time + 2 minutes -`aemm.spot.rebalanceRecTime` | time in the rebalance recommendation notification | `""` | HTTP request time -`aemm.events.code` | event code in the scheduled event | `""` | `system-reboot` -`aemm.events.notAfter` | the latest end time for the scheduled event | `""` | Start time of AEMM + 7 days -`aemm.events.notBefore` | the earliest start time for the scheduled event | `""` | Start time of AEMM -`aemm.events.notBeforeDeadline` | the deadline for starting the event | `""` | Start time of AEMM + 9 days -`aemm.events.state` | state of the scheduled event | `""` | `active` diff --git a/stable/amazon-ec2-metadata-mock/ci/configmap-values.yaml b/stable/amazon-ec2-metadata-mock/ci/configmap-values.yaml deleted file mode 100644 index 7249f4eb8..000000000 --- a/stable/amazon-ec2-metadata-mock/ci/configmap-values.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -configMap: "test-aemm-configmap" -configMapFileName: "test-aemm-config.yaml" diff --git a/stable/amazon-ec2-metadata-mock/ci/default-values.yaml b/stable/amazon-ec2-metadata-mock/ci/default-values.yaml deleted file mode 100644 index 224d924a3..000000000 --- a/stable/amazon-ec2-metadata-mock/ci/default-values.yaml +++ /dev/null @@ -1,2 +0,0 @@ -# empty values.yaml file must be present for Helm chart tests to run with default values -# https://github.com/helm/charts/blob/master/test/README.md#providing-custom-test-values diff --git a/stable/amazon-ec2-metadata-mock/ci/local-image-values.yaml b/stable/amazon-ec2-metadata-mock/ci/local-image-values.yaml deleted file mode 100644 index f17292dc6..000000000 --- a/stable/amazon-ec2-metadata-mock/ci/local-image-values.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -image: - repository: "amazon-ec2-metadata-mock" - tag: "test-latest" - pullPolicy: "Never" diff --git a/stable/amazon-ec2-metadata-mock/ci/service-config-values.yaml b/stable/amazon-ec2-metadata-mock/ci/service-config-values.yaml deleted file mode 100644 index e0f3fd8f6..000000000 --- a/stable/amazon-ec2-metadata-mock/ci/service-config-values.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -servicePort: 1550 -serviceName: "my-aemm" diff --git a/stable/amazon-ec2-metadata-mock/templates/NOTES.txt b/stable/amazon-ec2-metadata-mock/templates/NOTES.txt deleted file mode 100644 index 58070c13e..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/NOTES.txt +++ /dev/null @@ -1,5 +0,0 @@ -{{ .Release.Name }} has been {{- if .Release.IsInstall }} installed {{ else }} updated. {{- end}} - -Some useful commands: -kubectl get pods --namespace {{ .Release.Namespace }} -kubectl port-forward service/amazon-ec2-metadata-mock 1338 diff --git a/stable/amazon-ec2-metadata-mock/templates/_helpers.tpl b/stable/amazon-ec2-metadata-mock/templates/_helpers.tpl deleted file mode 100644 index 46de543a5..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/_helpers.tpl +++ /dev/null @@ -1,103 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "amazon-ec2-metadata-mock.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 "amazon-ec2-metadata-mock.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 -}} - -{{/* -Equivalent to "amazon-ec2-metadata-mock.fullname" except that "-win" indicator is appended to the end. -Name will not exceed 63 characters. -*/}} -{{- define "amazon-ec2-metadata-mock.fullname.windows" -}} -{{- include "amazon-ec2-metadata-mock.fullname" . | trunc 59 | trimSuffix "-" | printf "%s-win" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "amazon-ec2-metadata-mock.labels" -}} -app.kubernetes.io/name: {{ include "amazon-ec2-metadata-mock.name" . }} -helm.sh/chart: {{ include "amazon-ec2-metadata-mock.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "amazon-ec2-metadata-mock.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "amazon-ec2-metadata-mock.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "amazon-ec2-metadata-mock.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Get the default node selector term prefix. - -In 1.14 "beta.kubernetes.io" was deprecated and is scheduled for removal in 1.18. -See https://v1-14.docs.kubernetes.io/docs/setup/release/notes/#deprecations -*/}} -{{- define "amazon-ec2-metadata-mock.defaultNodeSelectorTermsPrefix" -}} - {{- $k8sVersion := printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | replace "+" "" -}} - {{- semverCompare "<1.18" $k8sVersion | ternary "beta.kubernetes.io" "kubernetes.io" -}} -{{- end -}} - -{{/* -Get the default node selector OS term. -*/}} -{{- define "amazon-ec2-metadata-mock.defaultNodeSelectorTermsOs" -}} - {{- list (include "amazon-ec2-metadata-mock.defaultNodeSelectorTermsPrefix" .) "os" | join "/" -}} -{{- end -}} - -{{/* -Get the default node selector Arch term. -*/}} -{{- define "amazon-ec2-metadata-mock.defaultNodeSelectorTermsArch" -}} - {{- list (include "amazon-ec2-metadata-mock.defaultNodeSelectorTermsPrefix" .) "arch" | join "/" -}} -{{- end -}} - -{{/* -Get the node selector OS term. -*/}} -{{- define "amazon-ec2-metadata-mock.nodeSelectorTermsOs" -}} - {{- or .Values.nodeSelectorTermsOs (include "amazon-ec2-metadata-mock.defaultNodeSelectorTermsOs" .) -}} -{{- end -}} - -{{/* -Get the node selector Arch term. -*/}} -{{- define "amazon-ec2-metadata-mock.nodeSelectorTermsArch" -}} - {{- or .Values.nodeSelectorTermsArch (include "amazon-ec2-metadata-mock.defaultNodeSelectorTermsArch" .) -}} -{{- end -}} \ No newline at end of file diff --git a/stable/amazon-ec2-metadata-mock/templates/clusterrole.yaml b/stable/amazon-ec2-metadata-mock/templates/clusterrole.yaml deleted file mode 100644 index 971578b72..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/clusterrole.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# ClusterRole without any permissions for AEMM - -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "amazon-ec2-metadata-mock.fullname" . }} -rules: [] # empty rules array to disallow all permissions for AEMM \ No newline at end of file diff --git a/stable/amazon-ec2-metadata-mock/templates/clusterrolebinding.yaml b/stable/amazon-ec2-metadata-mock/templates/clusterrolebinding.yaml deleted file mode 100644 index 5f920a0cf..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ include "amazon-ec2-metadata-mock.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ template "amazon-ec2-metadata-mock.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: {{ include "amazon-ec2-metadata-mock.fullname" . }} - apiGroup: rbac.authorization.k8s.io diff --git a/stable/amazon-ec2-metadata-mock/templates/deployment.linux.yaml b/stable/amazon-ec2-metadata-mock/templates/deployment.linux.yaml deleted file mode 100644 index 0972feabd..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/deployment.linux.yaml +++ /dev/null @@ -1,160 +0,0 @@ -{{- if (lower .Values.targetNodeOs | contains "linux") -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "amazon-ec2-metadata-mock.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: -{{ include "amazon-ec2-metadata-mock.labels" . | indent 4 }} -spec: - replicas: {{ toYaml .Values.replicaCount }} - strategy: - type: {{ toYaml .Values.updateStrategy }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "amazon-ec2-metadata-mock.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsOs" . }}: linux - template: - metadata: - {{- if (or .Values.podAnnotations .Values.linuxPodAnnotations) }} - annotations: - {{- range $key, $value := (mergeOverwrite (dict) .Values.podAnnotations .Values.linuxPodAnnotations) }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - labels: - app.kubernetes.io/name: {{ include "amazon-ec2-metadata-mock.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsOs" . }}: linux - spec: - nodeSelector: - {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsOs" . }}: linux - {{- with .Values.nodeSelector }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.linuxNodeSelector }} - {{- toYaml . | nindent 8 }} - {{- end }} - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsOs" . | quote }} - operator: In - values: - - linux - - key: {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsArch" . | quote }} - operator: In - values: - - amd64 - - arm - - arm64 - tolerations: - {{- with .Values.tolerations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.linuxTolerations }} - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "amazon-ec2-metadata-mock.serviceAccountName" . }} - hostNetwork: false # turn off host network to prevent undesired exposure of AEMM web server - {{- if .Values.configMap }} - volumes: - - name: "aemm-config" - configMap: - name: {{ .Values.configMap }} - {{- end }} - containers: - - name: {{ include "amazon-ec2-metadata-mock.name" . }} - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if (or .Values.arguments .Values.linuxArguments) }} - args: - {{ range .Values.arguments }} - - {{ . }} - {{ end }} - {{ range .Values.linuxArguments }} - - {{ . }} - {{ end }} - {{- end }} - securityContext: - readOnlyRootFilesystem: true - runAsNonRoot: true - runAsUser: {{ .Values.securityContext.runAsUserID }} - runAsGroup: {{ .Values.securityContext.runAsGroupID }} - allowPrivilegeEscalation: false - {{- if .Values.configMap }} - volumeMounts: - - name: "aemm-config" - mountPath: {{ with $file := .Values.configMapFileName | default "aemm-config.json" }} {{ printf "/%s/%s" "config" $file }} {{ end }} - subPath: {{ .Values.configMapFileName | default "aemm-config.json" }} - readOnly: true - {{- end }} - env: - {{- if .Values.configMap }} - - name: AEMM_CONFIG_FILE - value: {{ with $file := .Values.configMapFileName | default "aemm-config.json" }} {{ printf "/%s/%s" "config" $file }} {{ end }} - {{- end }} - - name: AEMM_SERVER_HOSTNAME # override hostname in order to listen on all available interfaces e.g. ClusterIP - value: {{ .Values.aemm.server.hostname | default "" | quote }} - {{- if .Values.aemm.mockDelaySec }} - - name: AEMM_MOCK_DELAY_SEC - value: {{ .Values.aemm.mockDelaySec | quote }} - {{- end }} - {{- if .Values.aemm.mockTriggerTime }} - - name: AEMM_MOCK_TRIGGER_TIME - value: {{ .Values.aemm.mockTriggerTime | quote }} - {{- end }} - {{- if .Values.aemm.mockIPCount }} - - name: AEMM_MOCK_IP_COUNT - value: {{ .Values.aemm.mockIPCount | quote }} - {{- end }} - {{- if .Values.aemm.imdsv2 }} - - name: AEMM_IMDSV2 - value: {{ .Values.aemm.imdsv2 | quote }} - {{- end }} - {{- if .Values.aemm.rebalanceDelaySec }} - - name: AEMM_REBALANCE_DELAY_SEC - value: {{ .Values.aemm.rebalanceDelaySec | quote }} - {{- end }} - {{- if .Values.aemm.rebalanceTriggerTime }} - - name: AEMM_REBALANCE_TRIGGER_TIME - value: {{ .Values.aemm.rebalanceTriggerTime | quote }} - {{- end }} - {{- if .Values.aemm.events.code }} - - name: AEMM_EVENTS_CODE - value: {{ .Values.aemm.events.code | quote }} - {{- end }} - {{- if .Values.aemm.events.notAfter }} - - name: AEMM_EVENTS_NOT_AFTER - value: {{ .Values.aemm.events.notAfter | quote }} - {{- end }} - {{- if .Values.aemm.events.notBefore }} - - name: AEMM_EVENTS_NOT_BEFORE - value: {{ .Values.aemm.events.notBefore | quote }} - {{- end }} - {{- if .Values.aemm.events.notBeforeDeadline }} - - name: AEMM_EVENTS_NOT_BEFORE_DEADLINE - value: {{ .Values.aemm.events.notBeforeDeadline | quote }} - {{- end }} - {{- if .Values.aemm.events.state }} - - name: AEMM_EVENTS_STATE - value: {{ .Values.aemm.events.state | quote }} - {{- end }} - {{- if .Values.aemm.spot.action }} - - name: AEMM_SPOT_ACTION - value: {{ .Values.aemm.spot.action | quote }} - {{- end }} - {{- if .Values.aemm.spot.time }} - - name: AEMM_SPOT_TIME - value: {{ .Values.aemm.spot.time | quote }} - {{- end }} - {{- if .Values.aemm.spot.rebalanceRecTime }} - - name: AEMM_SPOT_REBALANCE_REC_TIME - value: {{ .Values.aemm.spot.rebalanceRecTime | quote }} - {{- end }} - resources: - {{- toYaml .Values.resources | nindent 12 }} -{{- end -}} \ No newline at end of file diff --git a/stable/amazon-ec2-metadata-mock/templates/deployment.windows.yaml b/stable/amazon-ec2-metadata-mock/templates/deployment.windows.yaml deleted file mode 100644 index 07ad0995b..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/deployment.windows.yaml +++ /dev/null @@ -1,145 +0,0 @@ -{{- if (lower .Values.targetNodeOs | contains "windows") -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "amazon-ec2-metadata-mock.fullname.windows" . }} - namespace: {{ .Release.Namespace }} - labels: -{{ include "amazon-ec2-metadata-mock.labels" . | indent 4 }} -spec: - replicas: {{ toYaml .Values.replicaCount }} - strategy: - type: {{ toYaml .Values.updateStrategy }} - selector: - matchLabels: - app.kubernetes.io/name: {{ include "amazon-ec2-metadata-mock.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsOs" . }}: windows - template: - metadata: - {{- if (or .Values.podAnnotations .Values.windowsPodAnnotations) }} - annotations: - {{- range $key, $value := (mergeOverwrite (dict) .Values.podAnnotations .Values.windowsPodAnnotations) }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - labels: - app.kubernetes.io/name: {{ include "amazon-ec2-metadata-mock.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsOs" . }}: windows - spec: - nodeSelector: - {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsOs" . }}: windows - {{- with .Values.nodeSelector }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.windowsNodeSelector }} - {{- toYaml . | nindent 8 }} - {{- end }} - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsOs" . | quote }} - operator: In - values: - - windows - - key: {{ include "amazon-ec2-metadata-mock.nodeSelectorTermsArch" . | quote }} - operator: In - values: - - amd64 - tolerations: - {{- with .Values.tolerations }} - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.windowsTolerations }} - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ template "amazon-ec2-metadata-mock.serviceAccountName" . }} - hostNetwork: false # turn off host network to prevent undesired exposure of AEMM web server - {{- if .Values.configMap }} - volumes: - - name: "aemm-config" - configMap: - name: {{ .Values.configMap }} - {{- end }} - containers: - - name: {{ include "amazon-ec2-metadata-mock.name" . }} - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if (or .Values.arguments .Values.windowsArguments) }} - args: - {{ range .Values.arguments }} - - {{ . }} - {{ end }} - {{ range .Values.windowsArguments }} - - {{ . }} - {{ end }} - {{- end }} - env: - {{- if .Values.configMap }} - - name: AEMM_CONFIG_FILE - value: {{ with $file := .Values.configMapFileName | default "aemm-config.json" }} {{ printf "/%s/%s" "config" $file }} {{ end }} - {{- end }} - - name: AEMM_SERVER_HOSTNAME # override hostname in order to listen on all available interfaces e.g. ClusterIP - value: {{ .Values.aemm.server.hostname | default "" | quote }} - {{- if .Values.aemm.mockDelaySec }} - - name: AEMM_MOCK_DELAY_SEC - value: {{ .Values.aemm.mockDelaySec | quote }} - {{- end }} - {{- if .Values.aemm.mockTriggerTime }} - - name: AEMM_MOCK_TRIGGER_TIME - value: {{ .Values.aemm.mockTriggerTime | quote }} - {{- end }} - {{- if .Values.aemm.mockIPCount }} - - name: AEMM_MOCK_IP_COUNT - value: {{ .Values.aemm.mockIPCount | quote }} - {{- end }} - {{- if .Values.aemm.imdsv2 }} - - name: AEMM_IMDSV2 - value: {{ .Values.aemm.imdsv2 | quote }} - {{- end }} - {{- if .Values.aemm.rebalanceDelaySec }} - - name: AEMM_REBALANCE_DELAY_SEC - value: {{ .Values.aemm.rebalanceDelaySec | quote }} - {{- end }} - {{- if .Values.aemm.rebalanceTriggerTime }} - - name: AEMM_REBALANCE_TRIGGER_TIME - value: {{ .Values.aemm.rebalanceTriggerTime | quote }} - {{- end }} - {{- if .Values.aemm.events.code }} - - name: AEMM_EVENTS_CODE - value: {{ .Values.aemm.events.code | quote }} - {{- end }} - {{- if .Values.aemm.events.notAfter }} - - name: AEMM_EVENTS_NOT_AFTER - value: {{ .Values.aemm.events.notAfter | quote }} - {{- end }} - {{- if .Values.aemm.events.notBefore }} - - name: AEMM_EVENTS_NOT_BEFORE - value: {{ .Values.aemm.events.notBefore | quote }} - {{- end }} - {{- if .Values.aemm.events.notBeforeDeadline }} - - name: AEMM_EVENTS_NOT_BEFORE_DEADLINE - value: {{ .Values.aemm.events.notBeforeDeadline | quote }} - {{- end }} - {{- if .Values.aemm.events.state }} - - name: AEMM_EVENTS_STATE - value: {{ .Values.aemm.events.state | quote }} - {{- end }} - {{- if .Values.aemm.spot.action }} - - name: AEMM_SPOT_ACTION - value: {{ .Values.aemm.spot.action | quote }} - {{- end }} - {{- if .Values.aemm.spot.time }} - - name: AEMM_SPOT_TIME - value: {{ .Values.aemm.spot.time | quote }} - {{- end }} - {{- if .Values.aemm.spot.rebalanceRecTime }} - - name: AEMM_SPOT_REBALANCE_REC_TIME - value: {{ .Values.aemm.spot.rebalanceRecTime | quote }} - {{- end }} - resources: - {{- toYaml .Values.resources | nindent 12 }} -{{- end -}} \ No newline at end of file diff --git a/stable/amazon-ec2-metadata-mock/templates/psp.yaml b/stable/amazon-ec2-metadata-mock/templates/psp.yaml deleted file mode 100644 index 5daeba3e5..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/psp.yaml +++ /dev/null @@ -1,60 +0,0 @@ -{{- if .Values.rbac.pspEnabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "amazon-ec2-metadata-mock.fullname" . }} - labels: -{{ include "amazon-ec2-metadata-mock.labels" . | indent 4 }} - annotations: - seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' -spec: - privileged: false - hostIPC: false - hostNetwork: false # turn off host network to prevent undesired exposure of AEMM web server - hostPorts: - - min: 1024 - max: 65535 - hostPID: false - readOnlyRootFilesystem: false - allowPrivilegeEscalation: false - allowedCapabilities: - - '*' - fsGroup: - rule: RunAsAny - runAsUser: - rule: RunAsAny - seLinux: - rule: RunAsAny - supplementalGroups: - rule: RunAsAny - volumes: - - '*' ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "amazon-ec2-metadata-mock.fullname" . }}-psp - labels: -{{ include "amazon-ec2-metadata-mock.labels" . | indent 4 }} -rules: - - apiGroups: ['policy'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - - {{ template "amazon-ec2-metadata-mock.fullname" . }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "amazon-ec2-metadata-mock.fullname" . }}-psp - labels: -{{ include "amazon-ec2-metadata-mock.labels" . | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "amazon-ec2-metadata-mock.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ template "amazon-ec2-metadata-mock.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/stable/amazon-ec2-metadata-mock/templates/service.yaml b/stable/amazon-ec2-metadata-mock/templates/service.yaml deleted file mode 100644 index 35d098b8b..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Values.serviceName }} - namespace: {{ .Release.Namespace }} - labels: -{{ include "amazon-ec2-metadata-mock.labels" . | indent 4 }} -spec: - type: "ClusterIP" - selector: - app.kubernetes.io/instance: {{ .Release.Name }} - ports: - - protocol: TCP - port: {{ .Values.servicePort | default 1338 }} - targetPort: 1338 diff --git a/stable/amazon-ec2-metadata-mock/templates/serviceaccount.yaml b/stable/amazon-ec2-metadata-mock/templates/serviceaccount.yaml deleted file mode 100644 index 5109084b4..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/serviceaccount.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "amazon-ec2-metadata-mock.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{- with .Values.serviceAccount.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} - labels: -{{ include "amazon-ec2-metadata-mock.labels" . | indent 4 }} \ No newline at end of file diff --git a/stable/amazon-ec2-metadata-mock/templates/tests/test-aemm-service.yaml b/stable/amazon-ec2-metadata-mock/templates/tests/test-aemm-service.yaml deleted file mode 100644 index c9adf0975..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/tests/test-aemm-service.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# E2E tests to test the following post Helm chart installation: -## a simple http request to the service -## configmap setup, if set in the values file - -# The tests are run for each *values.yaml file in helm/amazon-ec2-metadata-mock/ci folder. -# https://github.com/helm/charts/blob/master/test/README.md#providing-custom-test-values - -apiVersion: v1 -kind: Pod -metadata: - name: "{{ .Release.Name }}-helm-e2e-test" - annotations: - "helm.sh/hook": "test" - "helm.sh/hook-delete-policy": "before-hook-creation" - "helm.sh/hook-weight": "1" # create config-map first -spec: - restartPolicy: Never - {{- if .Values.configMap }} - volumes: - - name: "aemm-config" - configMap: - name: {{ .Values.configMap }} - {{- end }} - containers: - - name: simple-service-test - imagePullPolicy: "{{ .Values.test.pullPolicy }}" - image: "{{ .Values.test.image }}:{{ .Values.test.imageTag }}" - command: - - "bash" - - "-c" - - | - SERVICE_NAME=$(echo {{ .Values.serviceName }} | tr '-' '_' | tr [:lower:] [:upper:]) - HOST_VAR=$(echo "${SERVICE_NAME}_SERVICE_HOST") - PORT_VAR=$(echo "${SERVICE_NAME}_SERVICE_PORT") - ACTUAL=$(curl http://${!HOST_VAR}:${!PORT_VAR}/latest/meta-data/services/domain) - EXPECTED="amazonaws.com" - [[ "$ACTUAL" == "$EXPECTED" ]] && exit 0 || exit 1 - {{- if .Values.configMap }} - - name: config-map-test - imagePullPolicy: "{{ .Values.test.pullPolicy }}" - image: "{{ .Values.test.image }}:{{ .Values.test.imageTag }}" - volumeMounts: - - name: "aemm-config" - mountPath: "config/{{ .Values.configMapFileName }}" - subPath: {{ .Values.configMapFileName }} - readOnly: true - command: - - "bash" - - "-c" - - | - SERVICE_NAME=$(echo {{ .Values.serviceName }} | tr '-' '_' | tr [:lower:] [:upper:]) - HOST_VAR=$(echo "${SERVICE_NAME}_SERVICE_HOST") - PORT_VAR=$(echo "${SERVICE_NAME}_SERVICE_PORT") - ACTUAL=$(curl http://${!HOST_VAR}:${!PORT_VAR}/latest/meta-data/spot/termination-time) - EXPECTED="1994-05-15T00:00:00Z" - [[ "$ACTUAL" == "$EXPECTED" ]] && exit 0 || exit 1 - {{- end }} diff --git a/stable/amazon-ec2-metadata-mock/templates/tests/test-config-map.yaml b/stable/amazon-ec2-metadata-mock/templates/tests/test-config-map.yaml deleted file mode 100644 index 3df045a40..000000000 --- a/stable/amazon-ec2-metadata-mock/templates/tests/test-config-map.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Configmap used for E2E testing -# The tests are run for each *values.yaml file in helm/amazon-ec2-metadata-mock/ci folder. - -{{- if .Values.configMap }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Values.configMap }} - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": "test" - "helm.sh/hook": "pre-install" - "helm.sh/hook-weight": "-1" # # create config-map before the test pod - "helm.sh/hook-delete-policy": "before-hook-creation" -data: - {{ .Values.configMapFileName }}: | - spot: - time: "1994-05-15T00:00:00Z" -{{- end }} \ No newline at end of file diff --git a/stable/amazon-ec2-metadata-mock/values.yaml b/stable/amazon-ec2-metadata-mock/values.yaml deleted file mode 100644 index a84376829..000000000 --- a/stable/amazon-ec2-metadata-mock/values.yaml +++ /dev/null @@ -1,117 +0,0 @@ -# Default values to be passed into the chart's templates. - -image: - repository: "public.ecr.aws/aws-ec2/amazon-ec2-metadata-mock" - tag: "v1.11.2" - pullPolicy: "IfNotPresent" - -# replicaCount defines the number of pods to replicate -replicaCount: 1 - -# nameOverride overrides the name of the helm chart -nameOverride: "" -# fullnameOverride overrides the name of the application -fullnameOverride: "" - -# targetNodeOs creates node-OS specific deployments (e.g. "linux", "windows", "linux windows") -targetNodeOs: "linux" - -resources: - requests: - memory: "64Mi" - cpu: "50m" - limits: - memory: "128Mi" - cpu: "100m" - -# nodeSelector tells both linux and windows deployments where to place the amazon-ec2-metadata-mock pods -# By default, this value is empty and every node will receive a pod. -nodeSelector: {} -# linuxNodeSelector tells the linux deployments where to place the amazon-ec2-metadata-mock pods -# pods. By default, this value is empty and every linux node will receive a pod. -linuxNodeSelector: {} -# windowsNodeSelector tells the windows deployments where to place the amazon-ec2-metadata-mock pods -# pods. By default, this value is empty and every windows node will receive a pod. -windowsNodeSelector: {} - -nodeSelectorTermsOs: "" -nodeSelectorTermsArch: "" - -# podAnnotations define annotations to add to each pod -podAnnotations: {} -linuxAnnotations: {} -windowsAnnotations: {} - -# tolerations specify taints that a pod tolerates so that it can be scheduled to a node with that taint -tolerations: [] -linuxTolerations: [] -windowsTolerations: [] - -# arguments represent CLI args to use when starting amazon-ec2-metadata-mock -arguments: [] -linuxArguments: [] -windowsArguments: [] - -# updateStrategy represents the update strategy for a Deployment -updateStrategy: "RollingUpdate" -linuxUpdateStrategy: "" -windowsUpdateStrategy: "" - -rbac: - # rbac.pspEnabled, if `true` a restricted pod security policy is created and used - pspEnabled: false - -serviceAccount: - # create represents whether a service account should be created - create: true - # name is the name of the service account to use. If name is not set and create is true, - # a name is generated using fullname template - name: "amazon-ec2-metadata-mock-service-account" - annotations: {} - -securityContext: - runAsUserID: "1000" - runAsGroupID: "1000" - -# configMap represents the name of an EXISTING configMap to use -# configMap can be used to pass a config file with the complete set of AEMM configuration overrides, not just limited to AEMM CLI flags. Learn more in README. -configMap: "" - -# configMapFileName represents the name of the file used to create the configMap. Learn more in README. -# supported file extenstions - https://github.com/spf13/viper/blob/master/viper.go#L328 -configMapFileName: "aemm-config.json" - -# servicePort represents the port to run the AEMM K8s service on. This can be any port of user's choice. -# note: this port is different from the native AEMM config - aemm.server.port which is not supported when AEMM is run as a K8s service. Learn more in README. -servicePort: "1338" - -serviceName: "amazon-ec2-metadata-mock-service" - -# aemm represents all the CLI flag configuration for Amazon EC2 Metadata Mock (AEMM) -# Null / empty values here means that AEMM will run with defaults configured in the tool -# Refer to the readme for descriptions and defaults - https://github.com/aws/amazon-ec2-metadata-mock/blob/main/helm/amazon-ec2-metadata-mock/README.md -aemm: - server: - hostname: "" - mockDelaySec: 0 - mockTriggerTime: "" - mockIPCount: 2 - imdsv2: false - rebalanceDelaySec: 0 - rebalanceTriggerTime: "" - spot: - action: "" - time: "" - rebalanceRecTime: "" - events: - code: "" - notAfter: "" - notBefore: "" - notBeforeDeadline: "" - state: "" - -# test configuration -test: - image: "centos" - imageTag: "latest" - pullPolicy: "IfNotPresent"