Skip to content
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

[New module] - Add openshiftmanagedcluster_kubeconfig_info module #1238

Conversation

MaxBab
Copy link
Contributor

@MaxBab MaxBab commented Aug 8, 2023

SUMMARY

Fixes #1235

Add azure_rm_openshiftmanagedcluster_kubeconfig_info module to fetch kubeconfig from the ARO cluster.
The kubeconfig file could be fetched and registered or saved into a specified file.

Example usage:

- name: Obtain kubeconfig file of ARO cluster
  azure_rm_openshiftmanagedcluster_kubeconfig_info:
    name: myCluster
    resource_group: myResourceGroup
  register: kubeconf

- name: Print registered kubeconfig file
  debug:
    msg: "{{ kubeconf['kubeconfig'] }}"

- name: Fetch kubeconfig and save it as mycluster_kubeconfig filename
  azure_rm_openshiftmanagedcluster_kubeconfig_info:
    name: myCluster
    resource_group: myResourceGroup
    path: ./files/mycluster_kubeconfig

- name: Fetch kubeconfig and save it to specified directory (file will be named as kubeconfig by default)
  azure_rm_openshiftmanagedcluster_kubeconfig_info:
    name: myCluster
    resource_group: myResourceGroup
    path: ./files/
ISSUE TYPE
  • New Module Pull Request

@MaxBab MaxBab force-pushed the add_azure_rm_openshiftmanagedcluster_kubeconfig_info_module branch from 2e77737 to 128f6af Compare August 8, 2023 16:12
Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaxBab Please keep same with the other module file naming format, rename to "azure_rm_openshiftmanagedclusterkubeconfig_info.py"

@Fred-sun
Copy link
Collaborator

@MaxBab Please update! Thank you very much!

@MaxBab MaxBab force-pushed the add_azure_rm_openshiftmanagedcluster_kubeconfig_info_module branch from 128f6af to 32c6936 Compare October 30, 2023 14:41
@MaxBab
Copy link
Contributor Author

MaxBab commented Oct 30, 2023

@Fred-sun

Thank you for the comments.
Everything updated and tested according to it.

@Fred-sun
Copy link
Collaborator

Fred-sun commented Oct 31, 2023

@MaxBab Thanks for your update! everything is OK, small changes request!

@Fred-sun Fred-sun added new_module_pr Add new modules medium_priority Medium priority work in In trying to solve, or in working with contributors labels Oct 31, 2023
@MaxBab MaxBab force-pushed the add_azure_rm_openshiftmanagedcluster_kubeconfig_info_module branch from 32c6936 to d38bb2c Compare October 31, 2023 07:19
@MaxBab
Copy link
Contributor Author

MaxBab commented Oct 31, 2023

@Fred-sun Updated.

Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix ansible-lint check return errors! Thank you very much!

@MaxBab MaxBab force-pushed the add_azure_rm_openshiftmanagedcluster_kubeconfig_info_module branch from d38bb2c to 16b6464 Compare November 5, 2023 17:26
Add azure_rm_openshiftmanagedclusterkubeconfig_info module to fetch
kubeconfig from the ARO cluster.
The kubeconfig file could be fetched and registered or saved into a
specified file.

Example usage:
```
- name: Obtain kubeconfig file of ARO cluster
  azure_rm_openshiftmanagedclusterkubeconfig_info:
    name: myCluster
    resource_group: myResourceGroup
  register: kubeconf

- name: Print registered kubeconfig file
  debug:
    msg: "{{ kubeconf['kubeconfig'] }}"

- name: Fetch kubeconfig and save it as mycluster_kubeconfig filename
  azure_rm_openshiftmanagedclusterkubeconfig_info:
    name: myCluster
    resource_group: myResourceGroup
    path: ./files/mycluster_kubeconfig

- name: Fetch kubeconfig and save it to specified directory (file will be named as kubeconfig by default)
  azure_rm_openshiftmanagedclusterkubeconfig_info:
    name: myCluster
    resource_group: myResourceGroup
    path: ./files/
```
@MaxBab MaxBab force-pushed the add_azure_rm_openshiftmanagedcluster_kubeconfig_info_module branch from 16b6464 to d65c620 Compare November 5, 2023 17:30
@MaxBab
Copy link
Contributor Author

MaxBab commented Nov 5, 2023

@Fred-sun Fixed.

@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Nov 6, 2023
@xuzhang3 xuzhang3 merged commit f004291 into ansible-collections:dev Nov 22, 2023
@MaxBab MaxBab deleted the add_azure_rm_openshiftmanagedcluster_kubeconfig_info_module branch November 22, 2023 08:39
MaxBab added a commit to stolostron/ansible-collection.rhacm that referenced this pull request Dec 7, 2023
Switch from the local to collection module once upgrading
to a version where the module is available.
ansible-collections/azure#1238
openshift-merge-bot bot pushed a commit to stolostron/ansible-collection.rhacm that referenced this pull request Dec 7, 2023
Switch from the local to collection module once upgrading
to a version where the module is available.
ansible-collections/azure#1238
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority new_module_pr Add new modules ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creation of azure_rm_openshiftmanagedcluster_kubeconfig_info module
3 participants