Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enterprise Feeds v2.0.0 #312

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions stable/feeds/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
name: feeds
type: application
version: "1.0.1"
appVersion: "4.9.3"
kubeVersion: 1.23.x - 1.27.x || 1.23.x-x - 1.27.x-x
version: "2.0.0"
appVersion: "5.0.0"
kubeVersion: 1.23.x - 1.27.x || 1.23.x-x - 1.28.x-x
description: Anchore feeds service
keywords:
- "anchore"
Expand Down
30 changes: 19 additions & 11 deletions stable/feeds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ anchoreConfig:
| `url` | Set a custom feeds URL. Useful when using a feeds service endpoint that is external from the cluster. | `""` |
| `fullnameOverride` | overrides the fullname set on resources | `""` |
| `nameOverride` | overrides the name set on resources | `""` |
| `image` | Image used for feeds deployment | `docker.io/anchore/enterprise:v4.9.3` |
| `image` | Image used for feeds deployment | `docker.io/anchore/enterprise:v5.0.0` |
| `imagePullPolicy` | Image pull policy used by all deployments | `IfNotPresent` |
| `imagePullSecretName` | Name of Docker credentials secret for access to private repos | `anchore-enterprise-pullcreds` |
| `serviceAccountName` | Name of a service account used to run all Feeds pods | `""` |
Expand All @@ -331,7 +331,6 @@ anchoreConfig:
| `service.annotations` | Annotations for Anchore Feeds service | `{}` |
| `service.labels` | Labels for Anchore Feeds service | `{}` |
| `service.nodePort` | nodePort for Anchore Feeds service | `""` |
| `service.apiVersion` | the apiVersion for the service when communicating with Anchore Feeds | `v2` |
| `scratchVolume.mountPath` | The mount path of an external volume for scratch space for image analysis | `/anchore_scratch` |
| `scratchVolume.fixGroupPermissions` | Enable an initContainer that will fix the fsGroup permissions | `false` |
| `scratchVolume.details` | Details for the k8s volume to be created | `{}` |
Expand Down Expand Up @@ -457,15 +456,15 @@ anchoreConfig:

### Ingress Parameters

| Name | Description | Value |
| -------------------------- | ------------------------------------------------------------------ | ----------------------------- |
| `ingress.enabled` | Create an ingress resource for external Anchore service APIs | `false` |
| `ingress.labels` | Labels for the ingress resource | `{}` |
| `ingress.annotations` | Annotations for the ingress resource | `{}` |
| `ingress.hosts` | List of custom hostnames for the Anchore Feeds API | `[]` |
| `ingress.paths` | The path used for accessing the Anchore Feeds API | `["/v1/feeds/","/v2/feeds/"]` |
| `ingress.tls` | Configure tls for the ingress resource | `[]` |
| `ingress.ingressClassName` | sets the ingress class name. As of k8s v1.18, this should be nginx | `nginx` |
| Name | Description | Value |
| -------------------------- | ------------------------------------------------------------------ | ---------------- |
| `ingress.enabled` | Create an ingress resource for external Anchore service APIs | `false` |
| `ingress.labels` | Labels for the ingress resource | `{}` |
| `ingress.annotations` | Annotations for the ingress resource | `{}` |
| `ingress.hosts` | List of custom hostnames for the Anchore Feeds API | `[]` |
| `ingress.paths` | The path used for accessing the Anchore Feeds API | `["/v2/feeds/"]` |
| `ingress.tls` | Configure tls for the ingress resource | `[]` |
| `ingress.ingressClassName` | sets the ingress class name. As of k8s v1.18, this should be nginx | `nginx` |


### Google CloudSQL DB Parameters
Expand All @@ -482,12 +481,21 @@ anchoreConfig:
| `cloudsql.extraArgs` | a list of extra arguments to be passed into the cloudsql container command. eg | `[]` |


## Release Notes

For the latest updates and features in Anchore Enterprise, see the official [Release Notes](https://docs.anchore.com/current/docs/releasenotes/).

- **Major Chart Version Change (e.g., v0.1.2 -> v1.0.0)**: Signifies an incompatible breaking change that necessitates manual intervention, such as updates to your values file or data migrations.
- **Minor Chart Version Change (e.g., v0.1.2 -> v0.2.0)**: Indicates a significant change to the deployment that does not require manual intervention.
- **Patch Chart Version Change (e.g., v0.1.2 -> v0.1.3)**: Indicates a backwards-compatible bug fix or documentation update.

### v2.0.0

- Updated Anchore Feeds image to v5.0.0
- Anchore Feeds v5.0.0 introduces a breaking change to the API endpoints, and requires updating any external integrations to use the new endpoints. See the [Migration Guide](https://docs.anchore.com/current/docs/migration_guide/) for more information.
- The following values were removed as only the `v2` API is supported in Anchore Feeds 5.0.0:
- `feeds.service.apiVersion`

### v1.0.0

- This is a stable release of the Anchore Feeds Helm chart and is recommended for production deployments.
Expand Down
6 changes: 3 additions & 3 deletions stable/feeds/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ Return a URL for the external feeds service
*/}}
{{- define "feeds.setGrypeProviderURL" -}}
{{- $grypeProviderFeedsExternalURL := "" }}
{{- $regexSearchPattern := (printf "/%s.*$" .Values.service.apiVersion | toString) }}
{{- $regexSearchPattern := (printf "/v2.*$" | toString) }}
{{- if .Values.url }}
{{- $urlPathSuffix := (default "" (regexFind $regexSearchPattern .Values.url) ) }}
{{- $anchoreFeedsHost := (trimSuffix $urlPathSuffix .Values.url) }}
{{- $grypeProviderFeedsExternalURL = (printf "%s/%s/" $anchoreFeedsHost .Values.service.apiVersion) }}
{{- $grypeProviderFeedsExternalURL = (printf "%s/v2/" $anchoreFeedsHost) }}
{{- else }}
{{- $grypeProviderFeedsExternalURL = (printf "%s://%s:%s/%s/" (include "feeds.setProtocol" .) (include "feeds.fullname" .) (.Values.service.port | toString) .Values.service.apiVersion ) -}}
{{- $grypeProviderFeedsExternalURL = (printf "%s://%s:%s/v2/" (include "feeds.setProtocol" .) (include "feeds.fullname" .) (.Values.service.port | toString)) -}}
{{- end }}
{{- print $grypeProviderFeedsExternalURL }}
{{- end -}}
2 changes: 1 addition & 1 deletion stable/feeds/tests/__snapshot__/configmap_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ should render the configmaps:
ANCHORE_FEEDS_DRIVER_UBUNTU_ENABLED: "true"
ANCHORE_FEEDS_DRIVER_UBUNTU_URL: https://git.launchpad.net/ubuntu-cve-tracker
ANCHORE_FEEDS_DRIVER_WOLFI_ENABLED: "true"
ANCHORE_FEEDS_EXTERNAL_URL: http://test-release-feeds:8448/v1/
ANCHORE_FEEDS_EXTERNAL_URL: http://test-release-feeds:8448/v2/
ANCHORE_FEEDS_GRYPEDB_PERSIST_WORKSPACE: "true"
ANCHORE_FEEDS_GRYPEDB_PRELOAD_ENABLED: "true"
ANCHORE_FEEDS_GRYPEDB_PRELOAD_PATH: /preload/grype-db-workspace.tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ should render proper initContainers:
value: test-release-feeds
- name: ANCHORE_PORT
value: "8448"
image: docker.io/anchore/enterprise:v4.9.3
image: docker.io/anchore/enterprise:v5.0.0
imagePullPolicy: IfNotPresent
name: wait-for-db
25 changes: 4 additions & 21 deletions stable/feeds/tests/configmap_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,20 @@ tests:
asserts:
- matchSnapshot: {}

- it: should render v1 correctly if service.apiVersion is set as v1
template: envvars_configmap.yaml
set:
service.apiVersion: v1
asserts:
- matchRegex:
path: data["ANCHORE_FEEDS_EXTERNAL_URL"]
pattern: http://test-release-feeds:8448/v1/$

- it: should render v1 correctly if service.apiVersion is default
template: envvars_configmap.yaml
asserts:
- matchRegex:
path: data["ANCHORE_FEEDS_EXTERNAL_URL"]
pattern: http://test-release-feeds:8448/v1/$

- it: should render grype url correctly if .Values.url is set
template: envvars_configmap.yaml
set:
service.apiVersion: v1
url: https://something/v1/my-grype/something
url: https://something/v2/my-grype/something
asserts:
- matchRegex:
path: data["ANCHORE_FEEDS_EXTERNAL_URL"]
pattern: https://something/v1/$
pattern: https://something/v2/$

- it: should render grype url correctly if .Values.url is set to a v1 url
template: envvars_configmap.yaml
set:
url: https://something/v1/my-grype/something
url: https://something/v2/my-grype/something
asserts:
- matchRegex:
path: data["ANCHORE_FEEDS_EXTERNAL_URL"]
pattern: https://something/v1/$
pattern: https://something/v2/$
5 changes: 1 addition & 4 deletions stable/feeds/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ nameOverride: ""

## @param image Image used for feeds deployment
##
image: docker.io/anchore/enterprise:v4.9.3
image: docker.io/anchore/enterprise:v5.0.0

## @param imagePullPolicy Image pull policy used by all deployments
## ref: https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
Expand Down Expand Up @@ -92,15 +92,13 @@ affinity: {}
## @param service.annotations Annotations for Anchore Feeds service
## @param service.labels Labels for Anchore Feeds service
## @param service.nodePort nodePort for Anchore Feeds service
## @param service.apiVersion the apiVersion for the service when communicating with Anchore Feeds
##
service:
type: ClusterIP
port: 8448
annotations: {}
labels: {}
nodePort: ""
apiVersion: v1

## @param scratchVolume.mountPath The mount path of an external volume for scratch space for image analysis
## @param scratchVolume.fixGroupPermissions Enable an initContainer that will fix the fsGroup permissions
Expand Down Expand Up @@ -545,7 +543,6 @@ ingress:
## @param ingress.paths The path used for accessing the Anchore Feeds API
##
paths:
- /v1/feeds/
- /v2/feeds/

## @param ingress.tls Configure tls for the ingress resource
Expand Down