-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
test.yaml
233 lines (216 loc) · 9.11 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
- hosts: localhost
gather_facts: no
vars:
name: microcks
api_groups:
- toto.titi.tata
- route.openshift.io
keycloak_url: keycloak
microcks_url: microcks
meta:
namespace: microcks-dev
microcks:
url: microcks.192.168.64.7.nip.io
ingress_annotations:
"cert-manager.io/issuer": self-signed-issuer
my-annotations: my-value
#custom_secret_ref:
#secret: my-custom-secret
keycloak:
install: true
private_url: http://microcks-keycloak.microcks.svc.cluster.local:8080
#storage_class_name: my-awesome-class
mongodb:
install: false
#uri: mongodb:27017
#database: sampledb
#storage_class_name: my-awesome-class
resources:
requests:
cpu: 250m
memory: 400Mi
limits:
cpu: 500m
memory: 512Mi
#secret_ref:
#password_key: database-password
#secret: microcks-mongodb
#username_key: database-user
features:
repository_tenancy:
enabled: true
artifact_import_allowed_roles: toto,tata
async:
enabled: true
#env:
# - name: OAUTH_CLIENT_ID
# value: kafka-oauth-client
# - name: OAUTH_CLIENT_SECRET
# value: kafka-oauth-client-secret
kafka:
install: false
url: 127.0.0.1.nip.io
use_strimzi_beta1: false
#schema_registry:
#url: http://localhost:8888/api
#confluent: true
authentication:
type: SASL_SSL #SSL #SASL_SSL
truststore_type: PKCS12
truststore_secret_ref:
secret: kafka-cluster-ca-cert
store_key: ca.p12
password_key: ca.password
keystore_type: PKCS12
keystore_secret_ref:
secret: mtls-user
store_key: user.p12
password_key: user.password
#sasl_mechanism: SCRAM-SHA-512
#sasl_jaas_config: org.apache.kafka.common.security.scram.ScramLoginModule required username="scram-user" password="tDtDCT3pYKE5";
sasl_mechanism: OAUTHBEARER
sasl_jaas_config: org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required kid="ABCDefgh11Pi7jKLMNOpq-R0s3TuVWxyzAbcDEFgHI0" login.id="kafka_producer_prem";
sasl_login_callback_handler_class: org.acme.lib.CustomAuthenticateCallbackHandler
mqtt:
url: 128.0.0.1.nip.io
sqs:
region: eu-west-3
credentials_type: env-variable
credentials_secret_ref:
secret: aws-credentials
access_key_id_key: toto
#secret_access_key_key: tata
#session_token_key: session_token
#credentials_type: profile
#credentials_secret_ref:
#secret: aws-credentials
#file_key: aws.profile
endpoint_override: http://localhost:4566
sns:
region: eu-west-3
credentials_type: env-variable
#credentials_secret_ref:
#secret: aws-credentials
#access_key_id_key: toto
#session_token_key: session_token
#credentials_type: profile
#credentials_secret_ref:
#secret: aws-credentials
#file_key: aws.profile
ai_copilot:
enabled: true
implementation: openai
openai:
api_key: sk-my-openai-api-token
timeout: 20
model: gpt-3.5-turbo
max_tokens: 2000
med_cn: mas-core-microcks.masdeps1-000000.eu-gb.containers.appdomain.cloud
long_cn: mas-core-microcksinstall-microcks.masdeps1-6f1620198115433da1cac8216c06779b-0000.eu-gb.containers.appdomain.cloud
current_cr:
spec:
microcks:
grpcIngressAnnotations:
kubernetes.io/ingress.class: nginx
toto: titi
foo: bar
hello: world
pre_tasks:
#- name: Get Cluster information
# community.kubernetes.k8s_cluster_info:
# register: test
#- name: Get Strimzi CRD
# k8s_info:
# api_version: apiextensions.k8s.io/v1
# kind: CustomResourceDefinition
# name: kafkas.kafka.strimzi.io
# register: test
- debug:
var: test
vars:
#test: "Good"
#test: "{{ med_cn | truncate(64, True, '...', 0) }}"
#test: "{{ lookup('template', './k8s/microcks-ingress.yml') | from_yaml }}"
#test: "{{ lookup('template', './k8s/microcks-grpc-ingress.yml') }}"
test: "{{ lookup('template', './k8s/microcks-deployment.yml') }}"
#test: "{{ lookup('template', './k8s/microcks-config.yml') | from_yaml }}"
#test: "{{ features.async.enabled == true and features.async.kafka.use_strimzi_beta1 == false and ('route.openshift.io' in api_groups or 'url' in features.async.kafka) }}"
#test: "{{ lookup('template', './k8s/kafka.yml') | from_yaml }}"
#test: "{{ lookup('template', './k8s/kafka-beta2.yml') | from_yaml }}"
#test: "{{ lookup('template', './k8s/keycloak-config.yml') | from_yaml }}"
#test: "{{ lookup('template', './k8s/keycloak-deployment.yml') }}"
#test: "{{ lookup('template', './k8s/keycloak-postgres-deployment.yml') }}"
#test: "{{ lookup('template', './k8s/keycloak-pvc.yml') }}"
#test: "{{ lookup('template', './k8s/mongodb-deployment.yml') }}"
#test: "{{ lookup('template', './k8s/mongodb-pvc.yml') }}"
#test: "{{ lookup('template', './k8s/async-minion-config.yml') }}"
#test: "{{ lookup('template', './k8s/async-minion-deployment.yml') }}"
#test: "{{ lookup('k8s', verify_ssl='no', cluster_info='api_groups') }}"
#test: "{{ lookup('community.kubernetes.k8s_cluster_info', validate_certs='no') }}"
#test: "{{ lookup('k8s', validate_certs='no', cluster_info='api_groups', api_key='eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJtaWNyb2NrcyIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJtaWNyb2Nrcy1hbnNpYmxlLW9wZXJhdG9yLXRva2VuLXR6cXZxIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQubmFtZSI6Im1pY3JvY2tzLWFuc2libGUtb3BlcmF0b3IiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC51aWQiOiJjMWY4Njc3ZC0xNWJiLTExZWEtYjA0MC0xMjQ1NmRlMzMxNmYiLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6bWljcm9ja3M6bWljcm9ja3MtYW5zaWJsZS1vcGVyYXRvciJ9.afi-lm5HRSzQebauUJNxTnZ2DraFV4cwFGuWrzy_umRwtGrkc_cwIKXC37xZ0WD2fPQ2KDH7yFgmtEYwQknvNCgA1dCemLfuXU13BYhh3tmX4b4NMHQdYGhGeARI6ExyVa1KMiJXo9wKqR39I9EhAKIP6daKWLT9l5kSg5OuGNCpLIy2Kjo_WpayVUuACNpbXiTbsvrbxQkI3o-fVHQd3Jkx7ts5BcMRnWVSlpDlTUCUXLcrR7JvdIz377IQyvruUw4dhxxG-EgOiaUEoasq8Ruc5d7zb2Y3uvxLcho9VDcvOyCNYjPgwNe2vdletgLaHSFFYayM4cmzYJ2-R3fWSw') }}"
#test: "{{ lookup('template', './k8s/kafka.yml') }}"
#- fail:
# - name: Set watch namespace
# set_fact:
# watch_namespace: "{{ lookup('env','WATCH_NAMESPACE') }}"
# - name: Get microcks namespace
# set_fact:
# microcks_namespace: "{{ lookup('k8s', kind='Namespace', resource_name=watch_namespace) }}"
# openshift_namespace: "{{ lookup('k8s', kind='Namespace', resource_name='openshift') }}"
# - name: Determine is openshift namespace
# set_fact:
# is_openshift : "{{ microcks_namespace.metadata.annotations['openshif.io/display-name'] is defined }}"
# is_kubernetes : "{{ microcks_namespace.metadata.annotations['openshif.io/display-name'] is not defined }}"
# - debug:
# var: is_openshift
# var: is_kubernetes
# vars:
# res: ISOpenshift
# res: ISKubernetes
# - name: Verify openshift namespace exists
# assert:
# that:
# - 'lookup("k8s", kind="Namespace", resource_name="openshift") is defined'
# msg: The openshift namespace must exist
# - name: Verify api_groups exists
# assert:
# that:
# - 'lookup("k8s", cluster_info="api_groups") is defined'
# msg: The api_groups must exist
# - name: Get api_groups
# set_fact:
# api_groups: "{{ lookup('k8s', cluster_info='api_groups') }}"
# - debug:
# var: api_groups
# vars:
# res: APIGroups
# - name: Get information about the cluster
# set_fact:
# api_groups: "{{ lookup('k8s', cluster_info='api_groups') }}"
# - name: Check openshift Namespace object
# k8s_info:
# api_version: v1
# kind: Namespace
# name: openshift
# register: openshift_namespace
# - name: Get an existing Service object
# k8s_info:
# api_version: v1
# kind: Service
# name: node-js-sample
# namespace: hello
# register: nodejs_sample_service
# - name: Get information about the cluster
# set_fact:
# api_groups: "{{ lookup('k8s', cluster_info='api_groups') }}"
# - name: The Microcks Deployment is present
# k8s:
# state: present
# definition: "{{ lookup('template', './k8s/microcks-deployment.yml') | from_yaml }}"
# - debug:
# var: res
# vars:
# res: Result
- fail:
roles:
- microcks