mirror of
https://github.com/openshift/community.okd.git
synced 2026-03-27 03:13:08 +00:00
Add openshift_process module (#44)
* Initial pass at openshift_process module. Render-only * fix sanity test * Add ability to create/delete resources rendered by template * fix sanity tests * add more tests and fix .env parser * Add more tests * Make multiline parsing work properly * Add test for creating templates * Template APIs require namespace to be provided whether or not the template exists * add docs * Update plugins/modules/openshift_process.py Co-authored-by: Timothy Appnel <tima@ansible.com> Co-authored-by: Timothy Appnel <tima@ansible.com>
This commit is contained in:
committed by
GitHub
parent
308235e032
commit
74ac82e76d
9
molecule/default/files/example.env
Normal file
9
molecule/default/files/example.env
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
NAME=example
|
||||
# Multiline values shouldn't break things
|
||||
export CONTENT=This is a long message\
|
||||
that may take one or more lines to parse\
|
||||
but should still work without issue
|
||||
|
||||
# This shouldn't throw an error
|
||||
UNUSED=
|
||||
12
molecule/default/files/nginx.env
Normal file
12
molecule/default/files/nginx.env
Normal file
@@ -0,0 +1,12 @@
|
||||
# Want to make sure comments don't break it
|
||||
export NAME=test123
|
||||
NAMESPACE=openshift
|
||||
|
||||
|
||||
|
||||
|
||||
# Blank lines should be fine too
|
||||
|
||||
# Equals in comments shouldn't break things=True
|
||||
MEMORY_LIMIT=1Gi
|
||||
|
||||
34
molecule/default/files/simple-template.yaml
Normal file
34
molecule/default/files/simple-template.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
apiVersion: template.openshift.io/v1
|
||||
kind: Template
|
||||
labels:
|
||||
template: simple-example-test
|
||||
message: |-
|
||||
The following configmaps have been created in your project: ${NAME}.
|
||||
metadata:
|
||||
annotations:
|
||||
description: A super basic template for testing
|
||||
openshift.io/display-name: Super basic template
|
||||
openshift.io/provider-display-name: Red Hat, Inc.
|
||||
tags: quickstart,examples
|
||||
name: simple-example
|
||||
objects:
|
||||
- apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
description: Big example
|
||||
name: ${NAME}
|
||||
data:
|
||||
content: "${CONTENT}"
|
||||
parameters:
|
||||
- description: The name assigned to the ConfigMap
|
||||
displayName: Name
|
||||
name: NAME
|
||||
required: true
|
||||
value: example
|
||||
- description: The value for the content key of the configmap
|
||||
displayName: Content
|
||||
name: CONTENT
|
||||
required: true
|
||||
value: ''
|
||||
Reference in New Issue
Block a user