You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update for helm charts to use latest ecr-public repository. (#136)
Issue #, if available: aws-controllers-k8s/community#829
Description of changes:
* Update `build-controller-release` script to use latest ecr-public repository as image repository
* Update Chart.yaml.tpl for chart name so that helm charts can be properly added as dependencies. (Fixing helm chart semver issue)
* Update values.yaml.tpl to form image url correctly due to latest changes
------
make test successful
```
➜ code-generator git:(new-ecr) make test
go test -tags codegen ./...
? github.com/aws-controllers-k8s/code-generator/cmd/ack-generate [no test files]
? github.com/aws-controllers-k8s/code-generator/cmd/ack-generate/command [no test files]
ok github.com/aws-controllers-k8s/code-generator/pkg/generate/ack 0.883s
ok github.com/aws-controllers-k8s/code-generator/pkg/generate/code (cached)
? github.com/aws-controllers-k8s/code-generator/pkg/generate/config [no test files]
? github.com/aws-controllers-k8s/code-generator/pkg/generate/crossplane [no test files]
? github.com/aws-controllers-k8s/code-generator/pkg/generate/olm [no test files]
? github.com/aws-controllers-k8s/code-generator/pkg/generate/templateset [no test files]
? github.com/aws-controllers-k8s/code-generator/pkg/metadata [no test files]
ok github.com/aws-controllers-k8s/code-generator/pkg/model (cached)
ok github.com/aws-controllers-k8s/code-generator/pkg/model/multiversion (cached)
ok github.com/aws-controllers-k8s/code-generator/pkg/names (cached)
? github.com/aws-controllers-k8s/code-generator/pkg/testutil [no test files]
? github.com/aws-controllers-k8s/code-generator/pkg/util [no test files]
? github.com/aws-controllers-k8s/code-generator/pkg/version [no test files]
```
------
latest generated ecr dummy helm artifacts:
```
➜ code-generator git:(new-ecr) ✗ ./scripts/build-controller-release.sh ecr v0.0.9
Building release artifacts for ecr-v0.0.9
Generating common custom resource definitions
Generating custom resource definitions for ecr
Generating RBAC manifests for ecr
```
```
Chart.yaml
apiVersion: v1
name: ecr-chart
description: A Helm chart for the ACK service controller for ecr
version: v0.0.9
appVersion: v0.0.9
home: https://github.com/aws-controllers-k8s/ecr-controller
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources:
- https://github.com/aws-controllers-k8s/ecr-controller
maintainers:
- name: ACK Admins
url: https://github.com/orgs/aws-controllers-k8s/teams/ack-admin
- name: ecr Admins
url: https://github.com/orgs/aws-controllers-k8s/teams/ecr-maintainer
keywords:
- aws
- kubernetes
- ecr
```
```
values.yaml
# Default values for ack-ecr-controller.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
image:
repository: public.ecr.aws/u2r4f3v7/ecr-controller
tag: v0.0.9
pullPolicy: IfNotPresent
pullSecrets: []
nameOverride: ""
fullnameOverride: ""
deployment:
annotations: {}
labels: {}
containerPort: 8080
metrics:
service:
# Set to true to automatically create a Kubernetes Service resource for the
# Prometheus metrics server endpoint in controller
create: false
# Which Type to use for the Kubernetes Service?
# See: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
type: "ClusterIP"
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "100m"
aws:
# If specified, use the AWS region for AWS API calls
region: ""
account_id: ""
endpoint_url: ""
# log level for the controller
log:
enable_development_logging: false
level: info
# If specified, the service controller will watch for object creation only in the provided namespace
watchNamespace: ""
resourceTags:
# Configures the ACK service controller to always set key/value pairs tags on resources that it manages.
- services.k8s.aws/managed=true
- services.k8s.aws/created=%UTCNOW%
- services.k8s.aws/namespace=%KUBERNETES_NAMESPACE%
serviceAccount:
# Specifies whether a service account should be created
create: true
# The name of the service account to use.
name: ack-ecr-controller
annotations: {}
# eks.amazonaws.com/role-arn: arn:aws:iam::AWS_ACCOUNT_ID:role/IAM_ROLE_NAME
```
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Copy file name to clipboardExpand all lines: cmd/ack-generate/command/release.go
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ var releaseCmd = &cobra.Command{
40
40
41
41
funcinit() {
42
42
releaseCmd.PersistentFlags().StringVar(
43
-
&optImageRepository, "image-repository", "amazon/aws-controllers-k8s", "the Docker image repository to use in release artifacts.",
43
+
&optImageRepository, "image-repository", "", "the Docker image repository to use in release artifacts. Defaults to 'public.ecr.aws/aws-controllers-k8s/$service-controller'",
44
44
)
45
45
releaseCmd.PersistentFlags().StringVar(
46
46
&optServiceAccountName, "service-account-name", "default", "The name of the ServiceAccount AND ClusterRole used for ACK service controller",
0 commit comments