Skip to content

Conversation

vijtrip2
Copy link
Contributor

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 link
Contributor

@RedbackThomson RedbackThomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we are here could we update the default image repository (we can set it as the final public ECR repo URL) in the release CLI argument:

&optImageRepository, "image-repository", "amazon/aws-controllers-k8s", "the Docker image repository to use in release artifacts.",

Copy link
Collaborator

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@RedbackThomson RedbackThomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@ack-bot ack-bot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2021
@ack-bot
Copy link
Collaborator

ack-bot commented Jul 23, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jaypipes, RedbackThomson, vijtrip2

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [RedbackThomson,jaypipes,vijtrip2]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-bot ack-bot merged commit 5088c40 into aws-controllers-k8s:main Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants