diff --git a/addons/cloudtrail-chart/Chart.yaml b/addons/cloudtrail-chart/Chart.yaml index 9db18b5d9..55f7b141c 100644 --- a/addons/cloudtrail-chart/Chart.yaml +++ b/addons/cloudtrail-chart/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: cloudtrail-chart description: A Helm chart for the ACK service controller for AWS CloudTrail (CloudTrail) -version: 1.0.6 -appVersion: 1.0.6 +version: 1.0.8 +appVersion: 1.0.8 home: https://github.com/aws-controllers-k8s/cloudtrail-controller icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png sources: diff --git a/addons/cloudtrail-chart/crds/cloudtrail.services.k8s.aws_eventdatastores.yaml b/addons/cloudtrail-chart/crds/cloudtrail.services.k8s.aws_eventdatastores.yaml index dc1d51bea..04c0eb4fd 100644 --- a/addons/cloudtrail-chart/crds/cloudtrail.services.k8s.aws_eventdatastores.yaml +++ b/addons/cloudtrail-chart/crds/cloudtrail.services.k8s.aws_eventdatastores.yaml @@ -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: eventdatastores.cloudtrail.services.k8s.aws spec: group: cloudtrail.services.k8s.aws @@ -21,41 +20,67 @@ spec: description: EventDataStore is the Schema for the EventDataStores 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: "EventDataStoreSpec defines the desired state of EventDataStore. - \n A storage lake of event data against which you can run complex SQL-based - queries. An event data store can include events that you have logged - on your account from the last 90 to 2555 days (about three months to - up to seven years). To select events for an event data store, use advanced - event selectors (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-advanced)." + description: |- + EventDataStoreSpec defines the desired state of EventDataStore. + + + A storage lake of event data against which you can run complex SQL-based + queries. An event data store can include events that you have logged on your + account from the last 90 to 2555 days (about three months to up to seven + years). To select events for an event data store, use advanced event selectors + (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-advanced). properties: advancedEventSelectors: - description: The advanced event selectors to use to select the events - for the data store. For more information about how to use advanced - event selectors, see Log events by using advanced event selectors - (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-advanced) + description: |- + The advanced event selectors to use to select the events for the data store. + For more information about how to use advanced event selectors, see Log events + by using advanced event selectors (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-advanced) in the CloudTrail User Guide. items: - description: "Advanced event selectors let you create fine-grained - selectors for the following CloudTrail event record fields. They - help you control costs by logging only those events that are important - to you. For more information about advanced event selectors, see - Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) - in the CloudTrail User Guide. \n - readOnly \n - eventSource \n - - eventName \n - eventCategory \n - resources.type \n - resources.ARN - \n You cannot apply both event selectors and advanced event selectors - to a trail." + description: |- + Advanced event selectors let you create fine-grained selectors for the following + CloudTrail event record fields. They help you control costs by logging only + those events that are important to you. For more information about advanced + event selectors, see Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html) + in the CloudTrail User Guide. + + + - readOnly + + + - eventSource + + + - eventName + + + - eventCategory + + + - resources.type + + + - resources.ARN + + + You cannot apply both event selectors and advanced event selectors to a trail. properties: fieldSelectors: items: @@ -95,21 +120,22 @@ spec: type: object type: array multiRegionEnabled: - description: Specifies whether the event data store includes events - from all regions, or only from the region in which the event data - store is created. + description: |- + Specifies whether the event data store includes events from all regions, + or only from the region in which the event data store is created. type: boolean name: description: The name of the event data store. type: string organizationEnabled: - description: Specifies whether an event data store collects events - logged for an organization in Organizations. + description: |- + Specifies whether an event data store collects events logged for an organization + in Organizations. type: boolean retentionPeriod: - description: The retention period of the event data store, in days. - You can set a retention period of up to 2555 days, the equivalent - of seven years. + description: |- + The retention period of the event data store, in days. You can set a retention + period of up to 2555 days, the equivalent of seven years. format: int64 type: integer tags: @@ -124,10 +150,10 @@ spec: type: object type: array terminationProtectionEnabled: - description: Specifies whether termination protection is enabled for - the event data store. If termination protection is enabled, you - cannot delete the event data store until termination protection - is disabled. + description: |- + Specifies whether termination protection is enabled for the event data store. + If termination protection is enabled, you cannot delete the event data store + until termination protection is disabled. type: boolean required: - name @@ -136,24 +162,26 @@ spec: description: EventDataStoreStatus defines the observed state of EventDataStore properties: ackResourceMetadata: - description: All CRs managed by ACK have a common `Status.ACKResourceMetadata` - member that is used to contain resource sync state, account ownership, + description: |- + All CRs managed by ACK have a common `Status.ACKResourceMetadata` member + that is used to contain resource sync state, account ownership, constructed ARN for the resource properties: arn: - description: 'ARN is the Amazon Resource Name for the resource. - This is a globally-unique identifier and is set only by the - ACK service controller once the controller has orchestrated - the creation of the resource OR when it has verified that an - "adopted" resource (a resource where the ARN annotation was - set by the Kubernetes user on the CR) exists and matches the - supplied CR''s Spec field values. TODO(vijat@): Find a better - strategy for resources that do not have ARN in CreateOutputResponse - https://github.com/aws/aws-controllers-k8s/issues/270' + description: |- + ARN is the Amazon Resource Name for the resource. This is a + globally-unique identifier and is set only by the ACK service controller + once the controller has orchestrated the creation of the resource OR + when it has verified that an "adopted" resource (a resource where the + ARN annotation was set by the Kubernetes user on the CR) exists and + matches the supplied CR's Spec field values. + TODO(vijat@): Find a better strategy for resources that do not have ARN in CreateOutputResponse + https://github.com/aws/aws-controllers-k8s/issues/270 type: string ownerAccountID: - description: OwnerAccountID is the AWS Account ID of the account - that owns the backend AWS service API resource. + description: |- + OwnerAccountID is the AWS Account ID of the account that owns the + backend AWS service API resource. type: string region: description: Region is the AWS region in which the resource exists @@ -164,14 +192,16 @@ spec: - region type: object conditions: - description: All CRS managed by ACK have a common `Status.Conditions` - member that contains a collection of `ackv1alpha1.Condition` objects - that describe the various terminal states of the CR and its backend - AWS service API resource + description: |- + All CRS managed by ACK have a common `Status.Conditions` member that + contains a collection of `ackv1alpha1.Condition` objects that describe + the various terminal states of the CR and its backend AWS service API + resource 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 @@ -205,9 +235,10 @@ spec: description: The status of event data store creation. type: string updatedTimestamp: - description: The timestamp that shows when an event data store was - updated, if applicable. UpdatedTimestamp is always either the same - or newer than the time shown in CreatedTimestamp. + description: |- + The timestamp that shows when an event data store was updated, if applicable. + UpdatedTimestamp is always either the same or newer than the time shown in + CreatedTimestamp. format: date-time type: string type: object diff --git a/addons/cloudtrail-chart/crds/cloudtrail.services.k8s.aws_trails.yaml b/addons/cloudtrail-chart/crds/cloudtrail.services.k8s.aws_trails.yaml index 81c96650e..e6a7e27dd 100644 --- a/addons/cloudtrail-chart/crds/cloudtrail.services.k8s.aws_trails.yaml +++ b/addons/cloudtrail-chart/crds/cloudtrail.services.k8s.aws_trails.yaml @@ -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: trails.cloudtrail.services.k8s.aws spec: group: cloudtrail.services.k8s.aws @@ -21,95 +20,138 @@ spec: description: Trail is the Schema for the Trails 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: "TrailSpec defines the desired state of Trail. \n The settings - for a trail." + description: |- + TrailSpec defines the desired state of Trail. + + + The settings for a trail. properties: cloudWatchLogsLogGroupARN: - description: Specifies a log group name using an Amazon Resource Name - (ARN), a unique identifier that represents the log group to which - CloudTrail logs will be delivered. Not required unless you specify - CloudWatchLogsRoleArn. + description: |- + Specifies a log group name using an Amazon Resource Name (ARN), a unique + identifier that represents the log group to which CloudTrail logs will be + delivered. Not required unless you specify CloudWatchLogsRoleArn. type: string cloudWatchLogsRoleARN: - description: Specifies the role for the CloudWatch Logs endpoint to - assume to write to a user's log group. + description: |- + Specifies the role for the CloudWatch Logs endpoint to assume to write to + a user's log group. type: string enableLogFileValidation: - description: "Specifies whether log file integrity validation is enabled. - The default is false. \n When you disable log file integrity validation, - the chain of digest files is broken after one hour. CloudTrail does - not create digest files for log files that were delivered during - a period in which log file integrity validation was disabled. For - example, if you enable log file integrity validation at noon on - January 1, disable it at noon on January 2, and re-enable it at - noon on January 10, digest files will not be created for the log - files delivered from noon on January 2 to noon on January 10. The - same applies whenever you stop CloudTrail logging or delete a trail." + description: |- + Specifies whether log file integrity validation is enabled. The default is + false. + + + When you disable log file integrity validation, the chain of digest files + is broken after one hour. CloudTrail does not create digest files for log + files that were delivered during a period in which log file integrity validation + was disabled. For example, if you enable log file integrity validation at + noon on January 1, disable it at noon on January 2, and re-enable it at noon + on January 10, digest files will not be created for the log files delivered + from noon on January 2 to noon on January 10. The same applies whenever you + stop CloudTrail logging or delete a trail. type: boolean includeGlobalServiceEvents: - description: Specifies whether the trail is publishing events from - global services such as IAM to the log files. + description: |- + Specifies whether the trail is publishing events from global services such + as IAM to the log files. type: boolean isMultiRegionTrail: - description: Specifies whether the trail is created in the current - region or in all regions. The default is false, which creates a - trail only in the region where you are signed in. As a best practice, - consider creating trails that log events in all regions. + description: |- + Specifies whether the trail is created in the current region or in all regions. + The default is false, which creates a trail only in the region where you + are signed in. As a best practice, consider creating trails that log events + in all regions. type: boolean isOrganizationTrail: - description: Specifies whether the trail is created for all accounts - in an organization in Organizations, or only for the current Amazon - Web Services account. The default is false, and cannot be true unless - the call is made on behalf of an Amazon Web Services account that - is the management account for an organization in Organizations. + description: |- + Specifies whether the trail is created for all accounts in an organization + in Organizations, or only for the current Amazon Web Services account. The + default is false, and cannot be true unless the call is made on behalf of + an Amazon Web Services account that is the management account for an organization + in Organizations. type: boolean kmsKeyID: - description: "Specifies the KMS key ID to use to encrypt the logs - delivered by CloudTrail. The value can be an alias name prefixed - by \"alias/\", a fully specified ARN to an alias, a fully specified - ARN to a key, or a globally unique identifier. \n CloudTrail also - supports KMS multi-Region keys. For more information about multi-Region - keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) - in the Key Management Service Developer Guide. \n Examples: \n - - alias/MyAliasName \n - arn:aws:kms:us-east-2:123456789012:alias/MyAliasName - \n - arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 - \n - 12345678-1234-1234-1234-123456789012" + description: |- + Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. + The value can be an alias name prefixed by "alias/", a fully specified ARN + to an alias, a fully specified ARN to a key, or a globally unique identifier. + + + CloudTrail also supports KMS multi-Region keys. For more information about + multi-Region keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) + in the Key Management Service Developer Guide. + + + Examples: + + + - alias/MyAliasName + + + - arn:aws:kms:us-east-2:123456789012:alias/MyAliasName + + + - arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 + + + - 12345678-1234-1234-1234-123456789012 type: string name: - description: "Specifies the name of the trail. The name must meet - the following requirements: \n - Contain only ASCII letters (a-z, - A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-) - \n - Start with a letter or number, and end with a letter or number - \n - Be between 3 and 128 characters \n - Have no adjacent periods, - underscores or dashes. Names like my-_namespace and my--namespace - are not valid. \n - Not be in IP address format (for example, 192.168.5.4)" + description: |- + Specifies the name of the trail. The name must meet the following requirements: + + + - Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores + (_), or dashes (-) + + + - Start with a letter or number, and end with a letter or number + + + - Be between 3 and 128 characters + + + - Have no adjacent periods, underscores or dashes. Names like my-_namespace + and my--namespace are not valid. + + + - Not be in IP address format (for example, 192.168.5.4) type: string s3BucketName: - description: Specifies the name of the Amazon S3 bucket designated - for publishing log files. See Amazon S3 Bucket Naming Requirements - (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html). + description: |- + Specifies the name of the Amazon S3 bucket designated for publishing log + files. See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html). type: string s3KeyPrefix: - description: Specifies the Amazon S3 key prefix that comes after the - name of the bucket you have designated for log file delivery. For - more information, see Finding Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html). + description: |- + Specifies the Amazon S3 key prefix that comes after the name of the bucket + you have designated for log file delivery. For more information, see Finding + Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html). The maximum length is 200 characters. type: string snsTopicName: - description: Specifies the name of the Amazon SNS topic defined for - notification of log file delivery. The maximum length is 256 characters. + description: |- + Specifies the name of the Amazon SNS topic defined for notification of log + file delivery. The maximum length is 256 characters. type: string tags: items: @@ -130,24 +172,26 @@ spec: description: TrailStatus defines the observed state of Trail properties: ackResourceMetadata: - description: All CRs managed by ACK have a common `Status.ACKResourceMetadata` - member that is used to contain resource sync state, account ownership, + description: |- + All CRs managed by ACK have a common `Status.ACKResourceMetadata` member + that is used to contain resource sync state, account ownership, constructed ARN for the resource properties: arn: - description: 'ARN is the Amazon Resource Name for the resource. - This is a globally-unique identifier and is set only by the - ACK service controller once the controller has orchestrated - the creation of the resource OR when it has verified that an - "adopted" resource (a resource where the ARN annotation was - set by the Kubernetes user on the CR) exists and matches the - supplied CR''s Spec field values. TODO(vijat@): Find a better - strategy for resources that do not have ARN in CreateOutputResponse - https://github.com/aws/aws-controllers-k8s/issues/270' + description: |- + ARN is the Amazon Resource Name for the resource. This is a + globally-unique identifier and is set only by the ACK service controller + once the controller has orchestrated the creation of the resource OR + when it has verified that an "adopted" resource (a resource where the + ARN annotation was set by the Kubernetes user on the CR) exists and + matches the supplied CR's Spec field values. + TODO(vijat@): Find a better strategy for resources that do not have ARN in CreateOutputResponse + https://github.com/aws/aws-controllers-k8s/issues/270 type: string ownerAccountID: - description: OwnerAccountID is the AWS Account ID of the account - that owns the backend AWS service API resource. + description: |- + OwnerAccountID is the AWS Account ID of the account that owns the + backend AWS service API resource. type: string region: description: Region is the AWS region in which the resource exists @@ -158,14 +202,16 @@ spec: - region type: object conditions: - description: All CRS managed by ACK have a common `Status.Conditions` - member that contains a collection of `ackv1alpha1.Condition` objects - that describe the various terminal states of the CR and its backend - AWS service API resource + description: |- + All CRS managed by ACK have a common `Status.Conditions` member that + contains a collection of `ackv1alpha1.Condition` objects that describe + the various terminal states of the CR and its backend AWS service API + resource 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 @@ -194,9 +240,12 @@ spec: description: Specifies whether log file integrity validation is enabled. type: boolean snsTopicARN: - description: "Specifies the ARN of the Amazon SNS topic that CloudTrail - uses to send notifications when log files are delivered. The format - of a topic ARN is: \n arn:aws:sns:us-east-2:123456789012:MyTopic" + description: |- + Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications + when log files are delivered. The format of a topic ARN is: + + + arn:aws:sns:us-east-2:123456789012:MyTopic type: string type: object type: object diff --git a/addons/cloudtrail-chart/crds/services.k8s.aws_adoptedresources.yaml b/addons/cloudtrail-chart/crds/services.k8s.aws_adoptedresources.yaml index d8d512618..65eff7353 100644 --- a/addons/cloudtrail-chart/crds/services.k8s.aws_adoptedresources.yaml +++ b/addons/cloudtrail-chart/crds/services.k8s.aws_adoptedresources.yaml @@ -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: adoptedresources.services.k8s.aws spec: group: services.k8s.aws @@ -21,14 +20,19 @@ spec: description: AdoptedResource is the schema for the AdoptedResource 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 @@ -42,129 +46,149 @@ spec: additionalKeys: additionalProperties: type: string - description: AdditionalKeys represents any additional arbitrary - identifiers used when describing the target resource. + description: |- + AdditionalKeys represents any additional arbitrary identifiers used when + describing the target resource. type: object arn: - description: ARN is the AWS Resource Name for the resource. It - is a globally unique identifier. + description: |- + ARN is the AWS Resource Name for the resource. It is a globally + unique identifier. type: string nameOrID: - description: NameOrId is a user-supplied string identifier for - the resource. It may or may not be globally unique, depending - on the type of resource. + description: |- + NameOrId is a user-supplied string identifier for the resource. It may + or may not be globally unique, depending on the type of resource. type: string type: object kubernetes: - description: ResourceWithMetadata provides the values necessary to - create a Kubernetes resource and override any of its metadata values. + description: |- + ResourceWithMetadata provides the values necessary to create a + Kubernetes resource and override any of its metadata values. properties: group: type: string kind: type: string metadata: - description: "ObjectMeta is metadata that all persisted resources - must have, which includes all objects users must create. It - is not possible to use `metav1.ObjectMeta` inside spec, as the - controller-gen automatically converts this to an arbitrary string-string - map. https://github.com/kubernetes-sigs/controller-tools/issues/385 - \n Active discussion about inclusion of this field in the spec - is happening in this PR: https://github.com/kubernetes-sigs/controller-tools/pull/395 - \n Until this is allowed, or if it never is, we will produce - a subset of the object meta that contains only the fields which - the user is allowed to modify in the metadata." + description: |- + ObjectMeta is metadata that all persisted resources must have, which includes all objects + users must create. + It is not possible to use `metav1.ObjectMeta` inside spec, as the controller-gen + automatically converts this to an arbitrary string-string map. + https://github.com/kubernetes-sigs/controller-tools/issues/385 + + + Active discussion about inclusion of this field in the spec is happening in this PR: + https://github.com/kubernetes-sigs/controller-tools/pull/395 + + + Until this is allowed, or if it never is, we will produce a subset of the object meta + that contains only the fields which the user is allowed to modify in the metadata. properties: annotations: additionalProperties: type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations type: object generateName: - description: "GenerateName is an optional prefix, used by - the server, to generate a unique name ONLY IF the Name field - has not been provided. If this field is used, the name returned - to the client will be different than the name passed. This - value will also be combined with a unique suffix. The provided - value has the same validation rules as the Name field, and - may be truncated by the length of the suffix required to - make the value unique on the server. \n If this field is - specified and the generated name exists, the server will - NOT return a 409 - instead, it will either return 201 Created - or 500 with Reason ServerTimeout indicating a unique name - could not be found in the time allotted, and the client - should retry (optionally after the time indicated in the - Retry-After header). \n Applied only if Name is not specified. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique + name ONLY IF the Name field has not been provided. + If this field is used, the name returned to the client will be different + than the name passed. This value will also be combined with a unique suffix. + The provided value has the same validation rules as the Name field, + and may be truncated by the length of the suffix required to make the value + unique on the server. + + + If this field is specified and the generated name exists, the server will + NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + ServerTimeout indicating a unique name could not be found in the time allotted, and the client + should retry (optionally after the time indicated in the Retry-After header). + + + Applied only if Name is not specified. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency type: string labels: additionalProperties: type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels type: object name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' + description: |- + Name must be unique within a namespace. Is required when creating resources, although + some resources may allow a client to request the generation of an appropriate name + automatically. Name is primarily intended for creation idempotence and configuration + definition. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/identifiers#names type: string namespace: - description: "Namespace defines the space within each name - must be unique. An empty namespace is equivalent to the - \"default\" namespace, but \"default\" is the canonical - representation. Not all objects are required to be scoped - to a namespace - the value of this field for those objects - will be empty. \n Must be a DNS_LABEL. Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/namespaces" + description: |- + Namespace defines the space within each name must be unique. An empty namespace is + equivalent to the "default" namespace, but "default" is the canonical representation. + Not all objects are required to be scoped to a namespace - the value of this field for + those objects will be empty. + + + Must be a DNS_LABEL. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces type: string ownerReferences: - description: List of objects depended by this object. If ALL - objects in the list have been deleted, this object will - be garbage collected. If this object is managed by a controller, - then an entry in this list will point to this controller, - with the controller field set to true. There cannot be more - than one managing controller. + description: |- + List of objects depended by this object. If ALL objects in the list have + been deleted, this object will be garbage collected. If this object is managed by a controller, + then an entry in this list will point to this controller, with the controller field set to true. + There cannot be more than one managing controller. items: - description: OwnerReference contains enough information - to let you identify an owning object. An owning object - must be in the same namespace as the dependent, or be - cluster-scoped, so there is no namespace field. + description: |- + OwnerReference contains enough information to let you identify an owning + object. An owning object must be in the same namespace as the dependent, or + be cluster-scoped, so there is no namespace field. properties: apiVersion: description: API version of the referent. type: string blockOwnerDeletion: - description: If true, AND if the owner has the "foregroundDeletion" - finalizer, then the owner cannot be deleted from the - key-value store until this reference is removed. See - https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion - for how the garbage collector interacts with this - field and enforces the foreground deletion. Defaults - to false. To set this field, a user needs "delete" - permission of the owner, otherwise 422 (Unprocessable - Entity) will be returned. + description: |- + If true, AND if the owner has the "foregroundDeletion" finalizer, then + the owner cannot be deleted from the key-value store until this + reference is removed. + See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion + for how the garbage collector interacts with this field and enforces the foreground deletion. + Defaults to false. + To set this field, a user needs "delete" permission of the owner, + otherwise 422 (Unprocessable Entity) will be returned. type: boolean controller: description: If true, this reference points to the managing controller. type: boolean kind: - description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string name: - description: 'Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names type: string uid: - description: 'UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids' + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids type: string required: - apiVersion @@ -188,13 +212,14 @@ spec: AdoptedResource. properties: conditions: - description: A collection of `ackv1alpha1.Condition` objects that - describe the various terminal states of the adopted resource CR - and its target custom resource + description: |- + A collection of `ackv1alpha1.Condition` objects that describe the various + terminal states of the adopted resource CR and its target custom resource 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 diff --git a/addons/cloudtrail-chart/crds/services.k8s.aws_fieldexports.yaml b/addons/cloudtrail-chart/crds/services.k8s.aws_fieldexports.yaml index 4a7ab61b3..4d3a8f1d5 100644 --- a/addons/cloudtrail-chart/crds/services.k8s.aws_fieldexports.yaml +++ b/addons/cloudtrail-chart/crds/services.k8s.aws_fieldexports.yaml @@ -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 @@ -21,14 +20,19 @@ 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 @@ -36,15 +40,17 @@ 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 @@ -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 (`.`) 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 @@ -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 diff --git a/addons/cloudtrail-chart/templates/NOTES.txt b/addons/cloudtrail-chart/templates/NOTES.txt index 1dfaf3f41..11f45f542 100644 --- a/addons/cloudtrail-chart/templates/NOTES.txt +++ b/addons/cloudtrail-chart/templates/NOTES.txt @@ -1,5 +1,5 @@ {{ .Chart.Name }} has been installed. -This chart deploys "public.ecr.aws/aws-controllers-k8s/cloudtrail-controller:1.0.6". +This chart deploys "public.ecr.aws/aws-controllers-k8s/cloudtrail-controller:1.0.8". Check its status by running: kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/addons/cloudtrail-chart/templates/_helpers.tpl b/addons/cloudtrail-chart/templates/_helpers.tpl index 391d5de33..9be0939fa 100644 --- a/addons/cloudtrail-chart/templates/_helpers.tpl +++ b/addons/cloudtrail-chart/templates/_helpers.tpl @@ -1,5 +1,5 @@ {{/* The name of the application this chart installs */}} -{{- define "app.name" -}} +{{- define "ack-cloudtrail-controller.app.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -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-cloudtrail-controller.app.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -22,27 +22,138 @@ 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-cloudtrail-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-cloudtrail-controller.service-account.name" -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} -{{- define "watch-namespace" -}} +{{- define "ack-cloudtrail-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-cloudtrail-controller.aws.credentials.secret_mount_path" -}} {{- "/var/run/secrets/aws" -}} {{- end -}} {{/* The path the shared credentials file is mounted */}} -{{- define "aws.credentials.path" -}} +{{- define "ack-cloudtrail-controller.aws.credentials.path" -}} {{- printf "%s/%s" (include "aws.credentials.secret_mount_path" .) .Values.aws.credentials.secretKey -}} {{- end -}} + +{{/* The rules a of ClusterRole or Role */}} +{{- define "ack-cloudtrail-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: + - cloudtrail.services.k8s.aws + resources: + - eventdatastores + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - cloudtrail.services.k8s.aws + resources: + - eventdatastores/status + verbs: + - get + - patch + - update +- apiGroups: + - cloudtrail.services.k8s.aws + resources: + - trails + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - cloudtrail.services.k8s.aws + resources: + - trails/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 }} \ No newline at end of file diff --git a/addons/cloudtrail-chart/templates/caches-role-binding.yaml b/addons/cloudtrail-chart/templates/caches-role-binding.yaml new file mode 100644 index 000000000..b86d4f2e6 --- /dev/null +++ b/addons/cloudtrail-chart/templates/caches-role-binding.yaml @@ -0,0 +1,26 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: ack-namespaces-cache-cloudtrail-controller +roleRef: + kind: ClusterRole + apiGroup: rbac.authorization.k8s.io + name: ack-namespaces-cache-cloudtrail-controller +subjects: +- kind: ServiceAccount + name: ack-cloudtrail-controller + namespace: {{ .Release.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: ack-configmaps-cache-cloudtrail-controller + namespace: {{ .Release.Namespace }} +roleRef: + kind: Role + apiGroup: rbac.authorization.k8s.io + name: ack-configmaps-cache-cloudtrail-controller +subjects: +- kind: ServiceAccount + name: ack-cloudtrail-controller + namespace: {{ .Release.Namespace }} \ No newline at end of file diff --git a/addons/cloudtrail-chart/templates/caches-role.yaml b/addons/cloudtrail-chart/templates/caches-role.yaml new file mode 100644 index 000000000..3fcb28260 --- /dev/null +++ b/addons/cloudtrail-chart/templates/caches-role.yaml @@ -0,0 +1,28 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: ack-namespaces-cache-cloudtrail-controller +rules: +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: ack-configmaps-cache-cloudtrail-controller + namespace: {{ .Release.Namespace }} +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch \ No newline at end of file diff --git a/addons/cloudtrail-chart/templates/cluster-role-binding.yaml b/addons/cloudtrail-chart/templates/cluster-role-binding.yaml index e5c74b109..17a5e9200 100644 --- a/addons/cloudtrail-chart/templates/cluster-role-binding.yaml +++ b/addons/cloudtrail-chart/templates/cluster-role-binding.yaml @@ -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-cloudtrail-controller.app.fullname" . }} roleRef: kind: ClusterRole -{{ else }} + apiGroup: rbac.authorization.k8s.io + name: ack-cloudtrail-controller +subjects: +- kind: ServiceAccount + name: {{ include "ack-cloudtrail-controller.service-account.name" . }} + namespace: {{ .Release.Namespace }} +{{ else if eq .Values.installScope "namespace" }} +{{ $wn := include "ack-cloudtrail-controller.watch-namespace" . }} +{{ $namespaces := split "," $wn }} +{{ $fullname := include "ack-cloudtrail-controller.app.fullname" . }} +{{ $releaseNamespace := .Release.Namespace }} +{{ $serviceAccountName := include "ack-cloudtrail-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-cloudtrail-controller subjects: - kind: ServiceAccount - name: {{ include "service-account.name" . }} - namespace: {{ .Release.Namespace }} + name: {{ $serviceAccountName }} + namespace: {{ $releaseNamespace }} +{{ end }} +{{ end }} \ No newline at end of file diff --git a/addons/cloudtrail-chart/templates/cluster-role-controller.yaml b/addons/cloudtrail-chart/templates/cluster-role-controller.yaml index 3a2925a94..aa6d84707 100644 --- a/addons/cloudtrail-chart/templates/cluster-role-controller.yaml +++ b/addons/cloudtrail-chart/templates/cluster-role-controller.yaml @@ -1,128 +1,29 @@ -apiVersion: rbac.authorization.k8s.io/v1 +{{ $labels := .Values.role.labels }} +{{ $rbacRules := include "ack-cloudtrail-controller.rbac-rules" . }} {{ if eq .Values.installScope "cluster" }} +apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: ack-cloudtrail-controller labels: - {{- range $key, $value := .Values.role.labels }} + {{- range $key, $value := $labels }} {{ $key }}: {{ $value | quote }} {{- end }} -{{ else }} +{{$rbacRules }} +{{ else if eq .Values.installScope "namespace" }} +{{ $wn := include "ack-cloudtrail-controller.watch-namespace" . }} +{{ $namespaces := split "," $wn }} +{{ range $namespaces }} +--- +apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - creationTimestamp: null name: ack-cloudtrail-controller + namespace: {{ . }} labels: - {{- range $key, $value := .Values.role.labels }} + {{- range $key, $value := $labels }} {{ $key }}: {{ $value | quote }} {{- end }} - namespace: {{ .Release.Namespace }} +{{ $rbacRules }} {{ end }} -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: - - cloudtrail.services.k8s.aws - resources: - - eventdatastores - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - cloudtrail.services.k8s.aws - resources: - - eventdatastores/status - verbs: - - get - - patch - - update -- apiGroups: - - cloudtrail.services.k8s.aws - resources: - - trails - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - cloudtrail.services.k8s.aws - resources: - - trails/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 }} \ No newline at end of file diff --git a/addons/cloudtrail-chart/templates/deployment.yaml b/addons/cloudtrail-chart/templates/deployment.yaml index cea38ec98..ed6c8b735 100644 --- a/addons/cloudtrail-chart/templates/deployment.yaml +++ b/addons/cloudtrail-chart/templates/deployment.yaml @@ -1,20 +1,20 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "app.fullname" . }} + name: {{ include "ack-cloudtrail-controller.app.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-cloudtrail-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} - k8s-app: {{ include "app.name" . }} - helm.sh/chart: {{ include "chart.name-version" . }} + k8s-app: {{ include "ack-cloudtrail-controller.app.name" . }} + helm.sh/chart: {{ include "ack-cloudtrail-controller.chart.name-version" . }} spec: replicas: {{ .Values.deployment.replicas }} selector: matchLabels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-cloudtrail-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: @@ -25,15 +25,15 @@ spec: {{- end }} {{- end }} labels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-cloudtrail-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm - k8s-app: {{ include "app.name" . }} + k8s-app: {{ include "ack-cloudtrail-controller.app.name" . }} {{- range $key, $value := .Values.deployment.labels }} {{ $key }}: {{ $value | quote }} {{- end }} spec: - serviceAccountName: {{ include "service-account.name" . }} + serviceAccountName: {{ include "ack-cloudtrail-controller.service-account.name" . }} {{- if .Values.image.pullSecrets }} imagePullSecrets: {{- range .Values.image.pullSecrets }} @@ -90,7 +90,7 @@ spec: - name: AWS_ENDPOINT_URL value: {{ .Values.aws.endpoint_url | quote }} - name: ACK_WATCH_NAMESPACE - value: {{ include "watch-namespace" . }} + value: {{ include "ack-cloudtrail-controller.watch-namespace" . }} - name: DELETION_POLICY value: {{ .Values.deletionPolicy }} - name: LEADER_ELECTION_NAMESPACE @@ -109,7 +109,7 @@ spec: {{- end }} {{- if .Values.aws.credentials.secretName }} - name: AWS_SHARED_CREDENTIALS_FILE - value: {{ include "aws.credentials.path" . }} + value: {{ include "ack-cloudtrail-controller.aws.credentials.path" . }} - name: AWS_PROFILE value: {{ .Values.aws.credentials.profile }} {{- end }} @@ -119,7 +119,7 @@ spec: volumeMounts: {{- if .Values.aws.credentials.secretName }} - name: {{ .Values.aws.credentials.secretName }} - mountPath: {{ include "aws.credentials.secret_mount_path" . }} + mountPath: {{ include "ack-cloudtrail-controller.aws.credentials.secret_mount_path" . }} readOnly: true {{- end }} {{- if .Values.deployment.extraVolumeMounts -}} diff --git a/addons/cloudtrail-chart/templates/leader-election-role-binding.yaml b/addons/cloudtrail-chart/templates/leader-election-role-binding.yaml index 4aa3e3f2e..e73a0e6df 100644 --- a/addons/cloudtrail-chart/templates/leader-election-role-binding.yaml +++ b/addons/cloudtrail-chart/templates/leader-election-role-binding.yaml @@ -14,5 +14,5 @@ roleRef: name: cloudtrail-leader-election-role subjects: - kind: ServiceAccount - name: {{ include "service-account.name" . }} + name: {{ include "ack-cloudtrail-controller.service-account.name" . }} namespace: {{ .Release.Namespace }}{{- end }} diff --git a/addons/cloudtrail-chart/templates/metrics-service.yaml b/addons/cloudtrail-chart/templates/metrics-service.yaml index 638858a38..2c7d88343 100644 --- a/addons/cloudtrail-chart/templates/metrics-service.yaml +++ b/addons/cloudtrail-chart/templates/metrics-service.yaml @@ -5,18 +5,18 @@ metadata: name: {{ .Chart.Name | trimSuffix "-chart" | trunc 44 }}-controller-metrics namespace: {{ .Release.Namespace }} labels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-cloudtrail-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} - k8s-app: {{ include "app.name" . }} - helm.sh/chart: {{ include "chart.name-version" . }} + k8s-app: {{ include "ack-cloudtrail-controller.app.name" . }} + helm.sh/chart: {{ include "ack-cloudtrail-controller.chart.name-version" . }} spec: selector: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-cloudtrail-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm - k8s-app: {{ include "app.name" . }} + k8s-app: {{ include "ack-cloudtrail-controller.app.name" . }} {{- range $key, $value := .Values.deployment.labels }} {{ $key }}: {{ $value | quote }} {{- end }} diff --git a/addons/cloudtrail-chart/templates/role-writer.yaml b/addons/cloudtrail-chart/templates/role-writer.yaml index f94d4b893..564114de3 100644 --- a/addons/cloudtrail-chart/templates/role-writer.yaml +++ b/addons/cloudtrail-chart/templates/role-writer.yaml @@ -10,9 +10,7 @@ rules: - cloudtrail.services.k8s.aws resources: - eventdatastores - - trails - verbs: - create - delete diff --git a/addons/cloudtrail-chart/templates/service-account.yaml b/addons/cloudtrail-chart/templates/service-account.yaml index 73306395f..8f249f835 100644 --- a/addons/cloudtrail-chart/templates/service-account.yaml +++ b/addons/cloudtrail-chart/templates/service-account.yaml @@ -3,13 +3,13 @@ apiVersion: v1 kind: ServiceAccount metadata: labels: - app.kubernetes.io/name: {{ include "app.name" . }} + app.kubernetes.io/name: {{ include "ack-cloudtrail-controller.app.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: Helm app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} - k8s-app: {{ include "app.name" . }} - helm.sh/chart: {{ include "chart.name-version" . }} - name: {{ include "service-account.name" . }} + k8s-app: {{ include "ack-cloudtrail-controller.app.name" . }} + helm.sh/chart: {{ include "ack-cloudtrail-controller.chart.name-version" . }} + name: {{ include "ack-cloudtrail-controller.service-account.name" . }} namespace: {{ .Release.Namespace }} annotations: {{- range $key, $value := .Values.serviceAccount.annotations }} diff --git a/addons/cloudtrail-chart/values.yaml b/addons/cloudtrail-chart/values.yaml index fe390063a..cef9a0be9 100644 --- a/addons/cloudtrail-chart/values.yaml +++ b/addons/cloudtrail-chart/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/cloudtrail-controller - tag: 1.0.6 + tag: 1.0.8 pullPolicy: IfNotPresent pullSecrets: [] @@ -107,6 +107,7 @@ installScope: cluster # Set the value of the "namespace" to be watched by the controller # This value is only used when the `installScope` is set to "namespace". If left empty, the default value is the release namespace for the chart. +# You can set multiple namespaces by providing a comma separated list of namespaces. e.g "namespace1,namespace2" watchNamespace: "" resourceTags: