aws-controllers-k8s / community

AWS Controllers for Kubernetes (ACK) is a project enabling you to manage AWS services from Kubernetes
https://aws-controllers-k8s.github.io/community/
Apache License 2.0
2.43k stars 256 forks source link

EC2 controller - FlowLog substitute VPC Ref Id #1897

Open gecube opened 1 year ago

gecube commented 1 year ago

Good day!

I am playing around with FlowLog object and found that I need to precisely know the RoleID and VpcID before the creation of FlowLog:

apiVersion: ec2.services.k8s.aws/v1alpha1
kind: FlowLog
metadata:
  name: vpc-production-flow-log
  namespace: infra-production
spec:
  resourceID: vpc-04fe286b0d4fe8ccc # <----
  resourceType: VPC
  logDestinationType: cloud-watch-logs
  logGroupName: vpc-flow-logs
  trafficType: ALL
  deliverLogsPermissionARN: arn:aws:iam::966321756598:role/vpcflow-cloudwatch-role # <----
  tags:
    - key: Name
      value: vpc-production-flow-log
    - key: env
      value: production

The standard way of referencing different objects in ACK framework is using of something like:

vpcRef: 
  from: 
    name: string

or

roleRef: 
  from: 
    name: string

I am kindly asking to leverage the same approach to FlowLog, or otherwise propose some better alternative. The mechanism like FieldExport in case of support a generic k8s object like a target could be good option. Right now it works only with Secrets and/or Configmaps according to the documentation.

Other option could be usage of some FluxCD features (no idea what will be the suitable one).

ack-bot commented 8 months ago

Issues go stale after 180d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 60d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

gecube commented 8 months ago

/remove-lifecycle stale

ack-bot commented 2 months ago

Issues go stale after 180d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 60d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://github.com/aws-controllers-k8s/community. /lifecycle stale

gecube commented 2 months ago

/remove-lifecycle stale