Rename from community.kubernetes to kubernetes.core (#6)

* Rename from community.kubernetes to kubernetes.core

This goes through and renames community.kubernetes to kubernetes.core.
Most of this was generated from the downstream build script that was
used on the community repository, plus whatever hand edits I could find
that were needed.

The downstream build and test process has also been removed as this
repository is now the downstream repository.

* Fix CONTRIBUTING.md
This commit is contained in:
Mike Graves
2021-04-08 08:48:27 -04:00
committed by GitHub
parent a55edac38f
commit ba586a8ed8
30 changed files with 200 additions and 529 deletions

View File

@@ -24,17 +24,17 @@ description:
- Pass the object definition from a source file or inline. See examples for reading
files and using Jinja templates or vault-encrypted files.
- Access to the full range of K8s APIs.
- Use the M(community.kubernetes.k8s_info) module to obtain a list of items about an object of type C(kind)
- Use the M(kubernetes.core.k8s_info) module to obtain a list of items about an object of type C(kind)
- Authenticate using either a config file, certificates, password or token.
- Supports check mode.
extends_documentation_fragment:
- community.kubernetes.k8s_state_options
- community.kubernetes.k8s_name_options
- community.kubernetes.k8s_resource_options
- community.kubernetes.k8s_auth_options
- community.kubernetes.k8s_wait_options
- community.kubernetes.k8s_delete_options
- kubernetes.core.k8s_state_options
- kubernetes.core.k8s_name_options
- kubernetes.core.k8s_resource_options
- kubernetes.core.k8s_auth_options
- kubernetes.core.k8s_wait_options
- kubernetes.core.k8s_delete_options
notes:
- If your OpenShift Python library is not 0.9.0 or newer and you are trying to
@@ -132,14 +132,14 @@ requirements:
EXAMPLES = r'''
- name: Create a k8s namespace
community.kubernetes.k8s:
kubernetes.core.k8s:
name: testing
api_version: v1
kind: Namespace
state: present
- name: Create a Service object from an inline definition
community.kubernetes.k8s:
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
@@ -161,7 +161,7 @@ EXAMPLES = r'''
port: 8000
- name: Remove an existing Service object
community.kubernetes.k8s:
kubernetes.core.k8s:
state: absent
api_version: v1
kind: Service
@@ -171,24 +171,24 @@ EXAMPLES = r'''
# Passing the object definition from a file
- name: Create a Deployment by reading the definition from a local file
community.kubernetes.k8s:
kubernetes.core.k8s:
state: present
src: /testing/deployment.yml
- name: >-
Read definition file from the Ansible controller file system.
If the definition file has been encrypted with Ansible Vault it will automatically be decrypted.
community.kubernetes.k8s:
kubernetes.core.k8s:
state: present
definition: "{{ lookup('file', '/testing/deployment.yml') | from_yaml }}"
- name: Read definition template file from the Ansible controller file system
community.kubernetes.k8s:
kubernetes.core.k8s:
state: present
template: '/testing/deployment.j2'
- name: Read definition template file from the Ansible controller file system that uses custom start/end strings
community.kubernetes.k8s:
kubernetes.core.k8s:
state: present
template:
path: '/testing/deployment.j2'
@@ -196,14 +196,14 @@ EXAMPLES = r'''
variable_end_string: ']]'
- name: fail on validation errors
community.kubernetes.k8s:
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', '/testing/deployment.yml') | from_yaml }}"
validate:
fail_on_error: yes
- name: warn on validation errors, check for unexpected properties
community.kubernetes.k8s:
kubernetes.core.k8s:
state: present
definition: "{{ lookup('template', '/testing/deployment.yml') | from_yaml }}"
validate:
@@ -218,13 +218,13 @@ EXAMPLES = r'''
mode: '0664'
- name: Apply metrics-server manifest to the cluster.
community.kubernetes.k8s:
kubernetes.core.k8s:
state: present
src: ~/metrics-server.yaml
# Wait for a Deployment to pause before continuing
- name: Pause a Deployment.
community.kubernetes.k8s:
kubernetes.core.k8s:
definition:
apiVersion: apps/v1
kind: Deployment
@@ -280,8 +280,8 @@ result:
import copy
from ansible_collections.community.kubernetes.plugins.module_utils.ansiblemodule import AnsibleModule
from ansible_collections.community.kubernetes.plugins.module_utils.args_common import (
from ansible_collections.kubernetes.core.plugins.module_utils.ansiblemodule import AnsibleModule
from ansible_collections.kubernetes.core.plugins.module_utils.args_common import (
AUTH_ARG_SPEC, WAIT_ARG_SPEC, NAME_ARG_SPEC, COMMON_ARG_SPEC, RESOURCE_ARG_SPEC, DELETE_OPTS_ARG_SPEC)
@@ -336,7 +336,7 @@ def main():
('template', 'src'),
]
module = AnsibleModule(argument_spec=argspec(), mutually_exclusive=mutually_exclusive, supports_check_mode=True)
from ansible_collections.community.kubernetes.plugins.module_utils.common import (
from ansible_collections.kubernetes.core.plugins.module_utils.common import (
K8sAnsibleMixin, get_api_client)
k8s_ansible_mixin = K8sAnsibleMixin(module)