Skip to content

Commit

Permalink
[create-pull-request] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
MauAraujo authored Apr 15, 2024
1 parent 5c18ce7 commit 59e941d
Show file tree
Hide file tree
Showing 17 changed files with 579 additions and 403 deletions.
4 changes: 2 additions & 2 deletions addons/pipes-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: pipes-chart
description: A Helm chart for the ACK service controller for Amazon EventBridge Pipes (Pipes)
version: 1.0.3
appVersion: 1.0.3
version: 1.0.7
appVersion: 1.0.7
home: https://github.com/aws-controllers-k8s/pipes-controller
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources:
Expand Down
319 changes: 169 additions & 150 deletions addons/pipes-chart/crds/pipes.services.k8s.aws_pipes.yaml

Large diffs are not rendered by default.

209 changes: 117 additions & 92 deletions addons/pipes-chart/crds/services.k8s.aws_adoptedresources.yaml

Large diffs are not rendered by default.

54 changes: 32 additions & 22 deletions addons/pipes-chart/crds/services.k8s.aws_fieldexports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.14.0
name: fieldexports.services.k8s.aws
spec:
group: services.k8s.aws
Expand All @@ -21,30 +20,37 @@ spec:
description: FieldExport is the schema for the FieldExport API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: FieldExportSpec defines the desired state of the FieldExport.
properties:
from:
description: ResourceFieldSelector provides the values necessary to
identify an individual field on an individual K8s resource.
description: |-
ResourceFieldSelector provides the values necessary to identify an individual
field on an individual K8s resource.
properties:
path:
type: string
resource:
description: NamespacedResource provides all the values necessary
to identify an ACK resource of a given type (within the same
namespace as the custom resource containing this type).
description: |-
NamespacedResource provides all the values necessary to identify an ACK
resource of a given type (within the same namespace as the custom resource
containing this type).
properties:
group:
type: string
Expand All @@ -62,16 +68,18 @@ spec:
- resource
type: object
to:
description: FieldExportTarget provides the values necessary to identify
the output path for a field export.
description: |-
FieldExportTarget provides the values necessary to identify the
output path for a field export.
properties:
key:
description: Key overrides the default value (`<namespace>.<FieldExport-resource-name>`)
for the FieldExport target
type: string
kind:
description: FieldExportOutputType represents all types that can
be produced by a field export operation
description: |-
FieldExportOutputType represents all types that can be produced by a field
export operation
enum:
- configmap
- secret
Expand All @@ -94,12 +102,14 @@ spec:
description: FieldExportStatus defines the observed status of the FieldExport.
properties:
conditions:
description: A collection of `ackv1alpha1.Condition` objects that
describe the various recoverable states of the field CR
description: |-
A collection of `ackv1alpha1.Condition` objects that describe the various
recoverable states of the field CR
items:
description: Condition is the common struct used by all CRDs managed
by ACK service controllers to indicate terminal states of the
CR and its backend AWS service API resource
description: |-
Condition is the common struct used by all CRDs managed by ACK service
controllers to indicate terminal states of the CR and its backend AWS
service API resource
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status
Expand Down
2 changes: 1 addition & 1 deletion addons/pipes-chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ .Chart.Name }} has been installed.
This chart deploys "public.ecr.aws/aws-controllers-k8s/pipes-controller:1.0.3".
This chart deploys "public.ecr.aws/aws-controllers-k8s/pipes-controller:1.0.7".

Check its status by running:
kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"
Expand Down
108 changes: 100 additions & 8 deletions addons/pipes-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{/* The name of the application this chart installs */}}
{{- define "app.name" -}}
{{- define "ack-pipes-controller.app.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

Expand All @@ -8,7 +8,7 @@ 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 "app.fullname" -}}
{{- define "ack-pipes-controller.app.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
Expand All @@ -22,27 +22,119 @@ If release name contains chart name it will be used as a full name.
{{- end -}}

{{/* The name and version as used by the chart label */}}
{{- define "chart.name-version" -}}
{{- define "ack-pipes-controller.chart.name-version" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/* The name of the service account to use */}}
{{- define "service-account.name" -}}
{{- define "ack-pipes-controller.service-account.name" -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}

{{- define "watch-namespace" -}}
{{- define "ack-pipes-controller.watch-namespace" -}}
{{- if eq .Values.installScope "namespace" -}}
{{ .Values.watchNamespace | default .Release.Namespace }}
{{- end -}}
{{- end -}}

{{/* The mount path for the shared credentials file */}}
{{- define "aws.credentials.secret_mount_path" -}}
{{- define "ack-pipes-controller.aws.credentials.secret_mount_path" -}}
{{- "/var/run/secrets/aws" -}}
{{- end -}}

{{/* The path the shared credentials file is mounted */}}
{{- define "aws.credentials.path" -}}
{{- printf "%s/%s" (include "aws.credentials.secret_mount_path" .) .Values.aws.credentials.secretKey -}}
{{- define "ack-pipes-controller.aws.credentials.path" -}}
{{ $secret_mount_path := include "ack-pipes-controller.aws.credentials.secret_mount_path" . }}
{{- printf "%s/%s" $secret_mount_path .Values.aws.credentials.secretKey -}}
{{- end -}}

{{/* The rules a of ClusterRole or Role */}}
{{- define "ack-pipes-controller.rbac-rules" -}}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- patch
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- patch
- watch
- apiGroups:
- pipes.services.k8s.aws
resources:
- pipes
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- pipes.services.k8s.aws
resources:
- pipes/status
verbs:
- get
- patch
- update
- apiGroups:
- services.k8s.aws
resources:
- adoptedresources
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- services.k8s.aws
resources:
- adoptedresources/status
verbs:
- get
- patch
- update
- apiGroups:
- services.k8s.aws
resources:
- fieldexports
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- services.k8s.aws
resources:
- fieldexports/status
verbs:
- get
- patch
- update
{{- end }}
26 changes: 26 additions & 0 deletions addons/pipes-chart/templates/caches-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ack-namespaces-cache-pipes-controller
roleRef:
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io
name: ack-namespaces-cache-pipes-controller
subjects:
- kind: ServiceAccount
name: ack-pipes-controller
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ack-configmaps-cache-pipes-controller
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
apiGroup: rbac.authorization.k8s.io
name: ack-configmaps-cache-pipes-controller
subjects:
- kind: ServiceAccount
name: ack-pipes-controller
namespace: {{ .Release.Namespace }}
28 changes: 28 additions & 0 deletions addons/pipes-chart/templates/caches-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ack-namespaces-cache-pipes-controller
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ack-configmaps-cache-pipes-controller
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
31 changes: 23 additions & 8 deletions addons/pipes-chart/templates/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
apiVersion: rbac.authorization.k8s.io/v1
{{ if eq .Values.installScope "cluster" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "app.fullname" . }}
name: {{ include "ack-pipes-controller.app.fullname" . }}
roleRef:
kind: ClusterRole
{{ else }}
apiGroup: rbac.authorization.k8s.io
name: ack-pipes-controller
subjects:
- kind: ServiceAccount
name: {{ include "ack-pipes-controller.service-account.name" . }}
namespace: {{ .Release.Namespace }}
{{ else if eq .Values.installScope "namespace" }}
{{ $wn := include "ack-pipes-controller.watch-namespace" . }}
{{ $namespaces := split "," $wn }}
{{ $fullname := include "ack-pipes-controller.app.fullname" . }}
{{ $releaseNamespace := .Release.Namespace }}
{{ $serviceAccountName := include "ack-pipes-controller.service-account.name" . }}
{{ range $namespaces }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "app.fullname" . }}
namespace: {{ .Release.Namespace }}
name: {{ $fullname }}
namespace: {{ . }}
roleRef:
kind: Role
{{ end }}
apiGroup: rbac.authorization.k8s.io
name: ack-pipes-controller
subjects:
- kind: ServiceAccount
name: {{ include "service-account.name" . }}
namespace: {{ .Release.Namespace }}
name: {{ $serviceAccountName }}
namespace: {{ $releaseNamespace }}
{{ end }}
{{ end }}
Loading

0 comments on commit 59e941d

Please sign in to comment.