Skip to content

Commit 6478e13

Browse files
committed
Remove deployment key and config items.
Signed-off-by: Rodrigo Reis <[email protected]>
1 parent d0128cb commit 6478e13

File tree

2 files changed

+0
-71
lines changed

2 files changed

+0
-71
lines changed

cluster/cluster.yaml

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -714,63 +714,6 @@ Resources:
714714
- !Sub "arn:aws:iam::${AWS::AccountId}:policy/ZalandoCloud-AllowPowerUser"
715715
RoleName: "{{.Cluster.LocalID}}-deployment"
716716
Type: 'AWS::IAM::Role'
717-
{{- if and (eq .Cluster.ConfigItems.deployment_secret_key_managed "true") (ne .Cluster.Environment "e2e") }}
718-
DeploymentSecretKey:
719-
Properties:
720-
Description: Key used by deployment pipeline for secret encryption/decryption
721-
EnableKeyRotation: false
722-
Enabled: true
723-
KeyPolicy:
724-
Id: "{{.Cluster.LocalID}}-deployment-key"
725-
Statement:
726-
- Action:
727-
- 'kms:ReEncrypt*'
728-
- 'kms:Create*'
729-
- 'kms:Describe*'
730-
- 'kms:Enable*'
731-
- 'kms:Encrypt'
732-
- 'kms:Decrypt'
733-
- 'kms:List*'
734-
- 'kms:Put*'
735-
- 'kms:Update*'
736-
- 'kms:Revoke*'
737-
- 'kms:Disable*'
738-
- 'kms:Get*'
739-
- 'kms:Delete*'
740-
- 'kms:ScheduleKeyDeletion'
741-
- 'kms:CancelKeyDeletion'
742-
- 'kms:TagResource'
743-
- 'kms:UntagResource'
744-
Effect: Allow
745-
Principal:
746-
AWS: !Sub 'arn:aws:iam::${AWS::AccountId}:root'
747-
Resource: '*'
748-
Sid: Allow access for Key Administrators
749-
- Action:
750-
- 'kms:Decrypt'
751-
Effect: Allow
752-
# Avoid circular dependencies because CF still can't do this properly
753-
Principal: "*"
754-
Condition:
755-
ArnEquals:
756-
aws:PrincipalArn:
757-
- !GetAtt DeploymentIAMRole.Arn
758-
- !Sub "arn:aws:iam::${AWS::AccountId}:role/{{.Cluster.LocalID}}-deployment-service-deployment"
759-
Resource: '*'
760-
Sid: Allow access for deployment system to decrypt the keys
761-
Version: 2012-10-17
762-
KeyUsage: ENCRYPT_DECRYPT
763-
Type: 'AWS::KMS::Key'
764-
DeletionPolicy: Retain
765-
UpdateReplacePolicy: Retain
766-
DeploymentSecretKeyAlias:
767-
Properties:
768-
AliasName: "alias/{{.Cluster.LocalID}}-deployment-secret"
769-
TargetKeyId: !Ref DeploymentSecretKey
770-
Type: 'AWS::KMS::Alias'
771-
DeletionPolicy: Retain
772-
UpdateReplacePolicy: Retain
773-
{{- end }}
774717
DeploymentServiceBucket:
775718
Type: AWS::S3::Bucket
776719
DeletionPolicy: Delete
@@ -876,17 +819,9 @@ Resources:
876819
- Action:
877820
- kms:Decrypt
878821
Effect: Allow
879-
{{- if and (eq .Cluster.ConfigItems.deployment_secret_key_managed "true") (ne .Cluster.Environment "e2e") }}
880-
Resource:
881-
- !GetAtt DeploymentSecretKey.Arn
882-
{{- else }}
883-
Resource: "*"
884-
{{- if and (eq .Cluster.ConfigItems.deployment_secret_decrypt_any "false") (ne .Cluster.Environment "e2e") }}
885822
Condition:
886823
StringLike:
887824
"kms:RequestAlias": "alias/deployment-secret"
888-
{{- end }}
889-
{{- end }}
890825
- Action:
891826
- 'sts:AssumeRole'
892827
Effect: Allow

cluster/config-defaults.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,9 +1037,3 @@ min_domains_in_pod_topology_spread_enabled: "true"
10371037
# enable CronJobTimeZone
10381038
# https://v1-24.docs.kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones
10391039
cronjob_time_zone_enabled: "true"
1040-
1041-
# flag to control if the deployment secret key is managed by the cluster stack
1042-
# or not. When set to a value != "true" the key will be removed from the stack.
1043-
# TODO: remove after migrating out of all cluster stacks.
1044-
deployment_secret_key_managed: "true"
1045-
deployment_secret_decrypt_any: "true"

0 commit comments

Comments
 (0)