Skip to content

Provide a good adoption procedure #1862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gecube opened this issue Jul 28, 2023 · 1 comment
Closed

Provide a good adoption procedure #1862

gecube opened this issue Jul 28, 2023 · 1 comment
Labels
area/adopted-resource Issues or PRs related to ACK Adopted Resources

Comments

@gecube
Copy link

gecube commented Jul 28, 2023

Yes. I have a preexisting amazon account with some resources like vpc. I want to make controllers reconciling this resource i.e. adopting it. Right now it is possible only with https://aws-controllers-k8s.github.io/community/docs/user-docs/adopted-resource/ procedure. And I don't like it.

For instance. I have a set of resources described in gitops repo like VPC, subnets etc. Then there may be two cases:

  1. the control cluster with all manifests and ack controllers instances was lost. I want to create a new one, connect it to gitops repo and I am expecting that all resources will be synced. Unfortunately, all controllers will give the error, that the resources already exists.
  2. I have already precreated environment and I want to move all resources to gitops repo.

If automatically adopting is not desired, it could be good idea to agree that it's behaviour can be changed by some kind of annotation like:

# if it is already created - it won't be adopted
apiVersion: ec2.services.k8s.aws/v1alpha1
kind: VPC
metadata:
  name: production
  namespace: infra-production
spec:
  cidrBlocks:
    - 10.3.0.0/16
  enableDNSSupport: true
  enableDNSHostnames: true
  tags:
    - key: Name
      value: production
# if it is already created - it will be adopted, the controller will populate status field from the Amazon account
# and all further changes will be controlled in gitops way
apiVersion: ec2.services.k8s.aws/v1alpha1
kind: VPC
metadata:
  annotations:
    services.k8s.aws/adoption: true
  name: production
  namespace: infra-production
...
@jljaco jljaco added the area/adopted-resource Issues or PRs related to ACK Adopted Resources label Aug 15, 2023
@RedbackThomson
Copy link
Contributor

We have a few existing issue regarding adoption mechanisms. It seems like you are in favour of using an annotation, here is the issue tracking that one - #1381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/adopted-resource Issues or PRs related to ACK Adopted Resources
Projects
None yet
Development

No branches or pull requests

3 participants