Skip to content

Commit

Permalink
Merge pull request #1001 from porter-dev/main
Browse files Browse the repository at this point in the history
Release to production
  • Loading branch information
jose-fully-ported authored Nov 21, 2023
2 parents 6abbf79 + caa9d4d commit f21da91
Show file tree
Hide file tree
Showing 17 changed files with 257 additions and 79 deletions.
8 changes: 4 additions & 4 deletions addons/ack-chart/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
version: 1.0.5
- name: dynamodb-chart
repository: https://chart-addons.getporter.dev
version: 1.2.3
version: 1.2.4
- name: ec2-chart
repository: https://chart-addons.getporter.dev
version: 1.0.7
Expand Down Expand Up @@ -46,7 +46,7 @@ dependencies:
version: 1.2.5
- name: rds-chart
repository: https://chart-addons.getporter.dev
version: 1.1.7
version: 1.1.8
- name: s3-chart
repository: https://chart-addons.getporter.dev
version: 1.0.6
Expand All @@ -62,5 +62,5 @@ dependencies:
- name: sqs-chart
repository: https://chart-addons.getporter.dev
version: 1.0.6
digest: sha256:6edb27f38550600c0b2cce3b45f6b1116fa3433ee5d4db8d4053845aaaa3c7d5
generated: "2023-10-27T21:44:28.472881523Z"
digest: sha256:ac8c20c02fbac7c3f460fc51733188659c5d15f152327fd972293ee0a8fa3c26
generated: "2023-11-20T18:36:29.666770276Z"
6 changes: 3 additions & 3 deletions addons/ack-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: ack-chart
description: A Helm chart containing all ACK charts as sub-charts
type: application
version: 46.1.0
version: 46.1.2
appVersion: "0.0.0"
dependencies:
- name: apigatewayv2-chart
Expand All @@ -22,7 +22,7 @@ dependencies:
condition: cloudtrail.enabled
- name: dynamodb-chart
alias: dynamodb
version: 1.2.3
version: 1.2.4
repository: https://chart-addons.getporter.dev
condition: dynamodb.enabled
- name: ec2-chart
Expand Down Expand Up @@ -82,7 +82,7 @@ dependencies:
condition: prometheusservice.enabled
- name: rds-chart
alias: rds
version: 1.1.7
version: 1.1.8
repository: https://chart-addons.getporter.dev
condition: rds.enabled
- name: s3-chart
Expand Down
4 changes: 2 additions & 2 deletions addons/iam-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
name: iam-chart
description: A Helm chart for the ACK service controller for AWS Identity & Access Management (IAM)
version: 1.3.0
appVersion: 1.3.0
version: 1.3.1
appVersion: 1.3.1
home: https://github.com/aws-controllers-k8s/iam-controller
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources:
Expand Down
2 changes: 1 addition & 1 deletion addons/iam-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/iam-controller:1.3.0".
This chart deploys "public.ecr.aws/aws-controllers-k8s/iam-controller:1.3.1".

Check its status by running:
kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"
Expand Down
2 changes: 1 addition & 1 deletion addons/iam-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

image:
repository: public.ecr.aws/aws-controllers-k8s/iam-controller
tag: 1.3.0
tag: 1.3.1
pullPolicy: IfNotPresent
pullSecrets: []

Expand Down
26 changes: 17 additions & 9 deletions addons/rds-postgresql-aurora/templates/db_instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
apiVersion: rds.services.k8s.aws/v1alpha1
kind: DBCluster
metadata:
name: {{ .Values.config.name }}
namespace: {{ .Release.Namespace }}
name: "{{ .Values.config.name }}"
namespace: "{{ .Release.Namespace }}"
annotations:
services.k8s.aws/region: {{ .Values.vpcConfig.awsRegion }}
services.k8s.aws/region: "{{ .Values.vpcConfig.awsRegion }}"
labels:
porter.run/helm-release-name: "{{ .Release.Name }}"
spec:
Expand All @@ -14,9 +14,9 @@ spec:
databaseName: "{{- include "database_name" . }}"
dbSubnetGroupRef:
from:
name: {{ .Values.config.name }}
name: "{{ .Values.config.name }}"
copyTagsToSnapshot: true
dbClusterIdentifier: {{ .Values.config.name }}
dbClusterIdentifier: "{{ .Values.config.name }}"
enableCloudwatchLogsExports:
- postgresql
engine: aurora-postgresql
Expand All @@ -25,20 +25,24 @@ spec:
masterUsername: "{{ .Values.config.masterUsername }}"
{{ if eq .Values.config.instanceClass "db.serverless" }}
serverlessV2ScalingConfiguration:
maxCapacity: {{ .Values.config.serverlessMaxCapacity }}
minCapacity: {{ .Values.config.serverlessMinCapacity }}
maxCapacity: "{{ .Values.config.serverlessMaxCapacity }}"
minCapacity: "{{ .Values.config.serverlessMinCapacity }}"
{{ end }}
masterUserPassword:
namespace: porter-env-group
name: {{ .Values.config.name }}.1
name: "{{ .Values.config.name }}.1"
key: DB_PASS
storageEncrypted: true
tags:
- key: "porter.run/managed"
value: "true"
- key: "porter.run/service"
value: "rds-postgresql-aurora"
- key: "porter.run/service-name"
value: "{{ $.Values.config.name }}"
vpcSecurityGroupRefs:
- from:
name: {{ .Values.config.name }}-rds
name: "{{ .Values.config.name }}-rds"
{{ $name := .Values.config.name }}
{{ $namespace := .Release.Namespace }}
{{ $awsRegion := .Values.vpcConfig.awsRegion }}
Expand Down Expand Up @@ -73,4 +77,8 @@ spec:
tags:
- key: "porter.run/managed"
value: "true"
- key: "porter.run/service"
value: "rds-postgresql-aurora"
- key: "porter.run/service-name"
value: "{{ $.Values.config.name }}"
{{ end }}
12 changes: 8 additions & 4 deletions addons/rds-postgresql-aurora/templates/parameter_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@
apiVersion: rds.services.k8s.aws/v1alpha1
kind: DBParameterGroup
metadata:
name: {{ .Values.config.name }}
namespace: {{ .Release.Namespace }}
name: "{{ .Values.config.name }}"
namespace: "{{ .Release.Namespace }}"
annotations:
services.k8s.aws/region: {{ .Values.vpcConfig.awsRegion }}
services.k8s.aws/region: "{{ .Values.vpcConfig.awsRegion }}"
labels:
porter.run/helm-release-name: "{{ .Release.Name }}"
spec:
name: {{ .Values.config.name }}
name: "{{ .Values.config.name }}"
description: "Parameter group for {{ .Values.config.name }}"
family: postgres{{ (semver (toString .Values.config.engineVersion)).Major }}
parameterOverrides:
max_wal_senders: "20"
tags:
- key: "porter.run/managed"
value: "true"
- key: "porter.run/service"
value: "rds-postgresql-aurora"
- key: "porter.run/service-name"
value: "{{ $.Values.config.name }}"
22 changes: 11 additions & 11 deletions addons/rds-postgresql-aurora/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ .Values.config.name }}.1
name: "{{ .Values.config.name }}.1"
namespace: porter-env-group
labels:
porter.run/environment-group-name: {{ .Values.config.name }}.1
porter.run/environment-group-name: "{{ .Values.config.name }}.1"
porter.run/environment-group-version: "1"
porter.run/environment-group-datastore: {{ .Values.config.name }}
porter.run/environment-group-datastore: "{{ .Values.config.name }}"
porter.run/environment-group-datastore-type: postgresql-aurora
porter.run/helm-release-name: "{{ .Release.Name }}"
data:
Expand All @@ -17,28 +17,28 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.config.name }}.1
name: "{{ .Values.config.name }}.1"
namespace: porter-env-group
labels:
porter.run/environment-group-name: {{ .Values.config.name }}.1
porter.run/environment-group-name: "{{ .Values.config.name }}.1"
porter.run/environment-group-version: "1"
porter.run/environment-group-datastore: {{ .Values.config.name }}
porter.run/environment-group-datastore: "{{ .Values.config.name }}"
porter.run/environment-group-datastore-type: postgresql-aurora
porter.run/helm-release-name: "{{ .Release.Name }}"
data:
DB_PORT: "5432"
DB_USER: {{ .Values.config.masterUsername }}
DB_USER: "{{ .Values.config.masterUsername }}"
---
apiVersion: services.k8s.aws/v1alpha1
kind: FieldExport
metadata:
name: {{ .Values.config.name }}-host
namespace: {{ .Release.Namespace }}
name: "{{ .Values.config.name }}-host"
namespace: "{{ .Release.Namespace }}"
labels:
porter.run/helm-release-name: "{{ .Release.Name }}"
spec:
to:
name: {{ .Values.config.name }}.1
name: "{{ .Values.config.name }}.1"
namespace: porter-env-group
key: DB_HOST
kind: configmap
Expand All @@ -47,4 +47,4 @@ spec:
resource:
group: rds.services.k8s.aws
kind: DBInstance
name: {{ .Values.config.name }}
name: "{{ .Values.config.name }}"
24 changes: 14 additions & 10 deletions addons/rds-postgresql-aurora/templates/security_group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,28 @@
apiVersion: ec2.services.k8s.aws/v1alpha1
kind: SecurityGroup
metadata:
name: {{ .Values.config.name }}-rds
namespace: {{ .Release.Namespace }}
name: "{{ .Values.config.name }}-rds"
namespace: "{{ .Release.Namespace }}"
annotations:
services.k8s.aws/region: {{ .Values.vpcConfig.awsRegion }}
services.k8s.aws/region: "{{ .Values.vpcConfig.awsRegion }}"
labels:
porter.run/helm-release-name: "{{ .Release.Name }}"
spec:
name: {{ .Values.config.name }}-rds
name: "{{ .Values.config.name }}-rds"
description: "Security Group for {{ .Values.config.name }} PostgresQL Aurora"
vpcID: {{ .Values.vpcConfig.vpcID }}
vpcID: "{{ .Values.vpcConfig.vpcID }}"
ingressRules:
- ipProtocol: tcp
ipRanges:
- cidrIP: "0.0.0.0/0"
fromPort: 5432
toPort: 5432
- ipProtocol: tcp
ipRanges:
- cidrIP: "0.0.0.0/0"
fromPort: 5432
toPort: 5432
tags:
- key: "Name"
value: "{{ .Values.config.name }}-rds"
- key: "porter.run/managed"
value: "true"
- key: "porter.run/service"
value: "rds-postgresql-aurora"
- key: "porter.run/service-name"
value: "{{ $.Values.config.name }}"
79 changes: 75 additions & 4 deletions addons/rds-postgresql-aurora/templates/subnets.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,93 @@
{{- if .Values.vpcConfig.subnetConfig }}
{{- range $k, $v := .Values.vpcConfig.subnetConfig }}
---
apiVersion: ec2.services.k8s.aws/v1alpha1
kind: RouteTable
metadata:
name: "{{ $.Values.vpcConfig.awsRegion }}-rds-{{ $.Values.config.name }}-private-{{ $v.availabilityZone }}"
namespace: "{{ $.Release.Namespace }}"
annotations:
services.k8s.aws/region: "{{ $.Values.vpcConfig.awsRegion }}"
labels:
porter.run/helm-release-name: "{{ $.Release.Name }}"
spec:
routes:
- destinationCIDRBlock: "{{ $.Values.vpcConfig.cidrBlock }}"
gatewayID: "local"
tags:
- key: "porter.run/managed"
value: "true"
- key: "porter.run/service"
value: "rds-postgresql-aurora"
- key: "porter.run/service-name"
value: "{{ $.Values.config.name }}"
- key: "Name"
value: "{{ $.Values.vpcConfig.awsRegion }}-rds-{{ $.Values.config.name }}-private-{{ $v.availabilityZone }}"
vpcID: "{{ $.Values.vpcConfig.vpcID }}"
---
apiVersion: ec2.services.k8s.aws/v1alpha1
kind: Subnet
metadata:
name: "{{ $.Values.vpcConfig.awsRegion }}-rds-{{ $.Values.config.name }}-private-{{ $v.availabilityZone }}"
namespace: "{{ $.Release.Namespace }}"
annotations:
services.k8s.aws/region: "{{ $.Values.vpcConfig.awsRegion }}"
labels:
porter.run/helm-release-name: "{{ $.Release.Name }}"
spec:
assignIPv6AddressOnCreation: false
availabilityZone: "{{ $v.availabilityZone }}"
cidrBlock: "{{ $v.cidrBlock }}"
enableDNS64: false
enableResourceNameDNSAAAARecord: false
enableResourceNameDNSARecord: false
hostnameType: "ip-name"
mapPublicIPOnLaunch: false
routeTableRefs:
- from:
name: "{{ $.Values.vpcConfig.awsRegion }}-rds-{{ $.Values.config.name }}-private-{{ $v.availabilityZone }}"
tags:
- key: "porter.run/managed"
value: "true"
- key: "porter.run/service"
value: "rds-postgresql-aurora"
- key: "porter.run/service-name"
value: "{{ $.Values.config.name }}"
- key: "Name"
value: "{{ $.Values.vpcConfig.awsRegion }}-rds-{{ $.Values.config.name }}-private-{{ $v.availabilityZone }}"
vpcID: "{{ $.Values.vpcConfig.vpcID }}"
{{- end }}
{{- end }}
---
apiVersion: rds.services.k8s.aws/v1alpha1
kind: DBSubnetGroup
metadata:
name: {{ .Values.config.name }}
namespace: {{ .Release.Namespace }}
name: "{{ .Values.config.name }}"
namespace: "{{ .Release.Namespace }}"
annotations:
services.k8s.aws/region: {{ .Values.vpcConfig.awsRegion }}
services.k8s.aws/region: "{{ .Values.vpcConfig.awsRegion }}"
labels:
porter.run/helm-release-name: "{{ .Release.Name }}"
spec:
name: {{ .Values.config.name }}
name: "{{ .Values.config.name }}"
description: "{{ .Values.config.name }} PostgresQL Aurora Subnet Group"
{{- if .Values.vpcConfig.subnetIDs }}
subnetIDs:
{{- range .Values.vpcConfig.subnetIDs }}
- {{ toYaml . }}
{{- end}}
{{- end }}
{{- if .Values.vpcConfig.subnetConfig }}
subnetRefs:
{{- range $k, $v := .Values.vpcConfig.subnetConfig }}
- from:
name: "{{ $.Values.vpcConfig.awsRegion }}-rds-{{ $.Values.config.name }}-private-{{ $v.availabilityZone }}"
{{- end }}
{{- end }}
tags:
- key: "porter.run/managed"
value: "true"
- key: "porter.run/service"
value: "rds-postgresql-aurora"
- key: "porter.run/service-name"
value: "{{ $.Values.config.name }}"
4 changes: 4 additions & 0 deletions addons/rds-postgresql-aurora/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ vpcConfig:
awsRegion: ""
subnetIDs: []
vpcID: ""
cidrBlock: ""
subnetConfig: []
# - availabilityZone: ""
# cidrBlock: ""
4 changes: 4 additions & 0 deletions addons/rds-postgresql/templates/db_instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ spec:
tags:
- key: "porter.run/managed"
value: "true"
- key: "porter.run/service"
value: "rds-postgresql"
- key: "porter.run/service-name"
value: "{{ $.Values.config.name }}"
vpcSecurityGroupRefs:
- from:
name: {{ .Values.config.name }}-rds
Loading

0 comments on commit f21da91

Please sign in to comment.