Skip to content

Commit 3f3e8d6

Browse files
authored
Merge pull request #6863 from zalando-incubator/remove-dpeloyment-key
Remove deployment key and config items.
2 parents 1b3b2b7 + 0606144 commit 3f3e8d6

File tree

3 files changed

+0
-72
lines changed

3 files changed

+0
-72
lines changed

cluster/cluster.yaml

Lines changed: 0 additions & 64 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,10 @@ 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 }}
883822
Resource: "*"
884-
{{- if and (eq .Cluster.ConfigItems.deployment_secret_decrypt_any "false") (ne .Cluster.Environment "e2e") }}
885823
Condition:
886824
StringLike:
887825
"kms:RequestAlias": "alias/deployment-secret"
888-
{{- end }}
889-
{{- end }}
890826
- Action:
891827
- 'sts:AssumeRole'
892828
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"

cluster/manifests/deployment-service/controller-statefulset.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ spec:
3232
image: "container-registry.zalando.net/teapot/deployment-controller:master-165"
3333
args:
3434
- "--config-namespace=kube-system"
35-
{{- if eq .Cluster.ConfigItems.deployment_secret_decrypt_any "false" }}
3635
- "--decrypt-kms-alias-arn=arn:aws:kms:{{ .Cluster.Region }}:{{ .Cluster.InfrastructureAccount | getAWSAccountID }}:alias/deployment-secret"
37-
{{- end }}
3836
env:
3937
- name: AWS_REGION
4038
value: "{{.Cluster.Region}}"

0 commit comments

Comments
 (0)