mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-27 13:53:12 +00:00
Compare commits
590 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5375fec77d | ||
|
|
9980192d9e | ||
|
|
e2fc5f46c0 | ||
|
|
5b3be06e8d | ||
|
|
3c2405f304 | ||
|
|
192611eea8 | ||
|
|
9ca14cef93 | ||
|
|
fbc2d3475c | ||
|
|
58f30fb96c | ||
|
|
c81b78aad6 | ||
|
|
c02e05925e | ||
|
|
479c009716 | ||
|
|
7807bc516e | ||
|
|
3afcd7fd89 | ||
|
|
7002131dda | ||
|
|
877943cc27 | ||
|
|
b59a0c5b80 | ||
|
|
26b1eb6c87 | ||
|
|
39437da72b | ||
|
|
e1645a2f8d | ||
|
|
224dde769a | ||
|
|
536d7dc842 | ||
|
|
eac2328bd3 | ||
|
|
3be986c96c | ||
|
|
768bc2f857 | ||
|
|
f05faaaaa0 | ||
|
|
957566993b | ||
|
|
c95f3299b0 | ||
|
|
1a0e3cf410 | ||
|
|
9368b43614 | ||
|
|
108addc06e | ||
|
|
3a3260ffb7 | ||
|
|
960d1f8a32 | ||
|
|
4d8f84eb74 | ||
|
|
1320c9d175 | ||
|
|
fab71e054e | ||
|
|
3eede3c922 | ||
|
|
d27ce3c34d | ||
|
|
18d17f2485 | ||
|
|
47d3ef57f2 | ||
|
|
8f8336b25a | ||
|
|
4aeeb8db82 | ||
|
|
5b636bb8ea | ||
|
|
83939ec007 | ||
|
|
608478e249 | ||
|
|
cb9e44fd4f | ||
|
|
cbd7da9dcf | ||
|
|
0f07a475b5 | ||
|
|
a2222a9176 | ||
|
|
79152d2417 | ||
|
|
fdbe607189 | ||
|
|
4a43de5101 | ||
|
|
345738cba3 | ||
|
|
f4995afb39 | ||
|
|
35062157e0 | ||
|
|
3150d55af6 | ||
|
|
4c51ee28f5 | ||
|
|
fbd5803f10 | ||
|
|
8972cae1cc | ||
|
|
1d8b3d9b4c | ||
|
|
57aa585a2e | ||
|
|
752813c23e | ||
|
|
48ee59e80f | ||
|
|
78fc099c75 | ||
|
|
5b577603c8 | ||
|
|
e5cfac2ba0 | ||
|
|
5ca536313a | ||
|
|
eaaf55e7f0 | ||
|
|
5d934ff2b5 | ||
|
|
84ab70f779 | ||
|
|
d74b5baf45 | ||
|
|
246bd829ec | ||
|
|
c28e4729e6 | ||
|
|
da63fe4653 | ||
|
|
7e2d726b26 | ||
|
|
fd38c33f14 | ||
|
|
a16e05d2f6 | ||
|
|
1ad5c9e981 | ||
|
|
79ee798df7 | ||
|
|
c843194cbd | ||
|
|
d1d6785b7d | ||
|
|
138964f7ab | ||
|
|
b2479c8014 | ||
|
|
277b772c46 | ||
|
|
7d20335cff | ||
|
|
fc713e7b73 | ||
|
|
26856d528d | ||
|
|
7eb6d0e0f5 | ||
|
|
fd03731a72 | ||
|
|
b0824acc48 | ||
|
|
782f97c42c | ||
|
|
09088b5b18 | ||
|
|
29879f7064 | ||
|
|
b866d682ef | ||
|
|
8aee279634 | ||
|
|
071b67a814 | ||
|
|
894b0ffa5f | ||
|
|
670b1f7d40 | ||
|
|
7b59c36263 | ||
|
|
c8d4ae16bb | ||
|
|
2e74c63c9e | ||
|
|
706dc80f17 | ||
|
|
3d6094a5b0 | ||
|
|
37470a0943 | ||
|
|
b65ba92b08 | ||
|
|
7fd4d46f6e | ||
|
|
eaff6898a4 | ||
|
|
38c64a504d | ||
|
|
563bdd6360 | ||
|
|
9eb0e35861 | ||
|
|
21fe2646b4 | ||
|
|
ebbb87f9a6 | ||
|
|
ee2980b8bb | ||
|
|
2426956a0a | ||
|
|
391e0bb1b8 | ||
|
|
5e7fe9b05f | ||
|
|
685c5efc94 | ||
|
|
e3d5827951 | ||
|
|
ebb4e76e1c | ||
|
|
f62b66d4ae | ||
|
|
1f73e2ca32 | ||
|
|
48f990f4a1 | ||
|
|
b1dcf16fc8 | ||
|
|
9e9457cf99 | ||
|
|
b59205ce69 | ||
|
|
f0c5d1b4e3 | ||
|
|
d6eafcd85b | ||
|
|
eb0d3cdebf | ||
|
|
ad2b49ab29 | ||
|
|
1095bc0518 | ||
|
|
133dfc5138 | ||
|
|
7e4923864f | ||
|
|
ebe5d1e2f4 | ||
|
|
8b64670146 | ||
|
|
86e0cf884f | ||
|
|
eaa4d33aea | ||
|
|
ccff76dec5 | ||
|
|
91d17eabef | ||
|
|
ca72423ca4 | ||
|
|
12361d6ff1 | ||
|
|
e9ade56842 | ||
|
|
cf22f9ba52 | ||
|
|
d4c8fd67f3 | ||
|
|
d9fbda5e15 | ||
|
|
aa969e2a93 | ||
|
|
d27bb69b96 | ||
|
|
85f3c23788 | ||
|
|
965647f933 | ||
|
|
88dd0e648e | ||
|
|
59efcb7be8 | ||
|
|
48ab801c8c | ||
|
|
65b89ea7bd | ||
|
|
69203723ef | ||
|
|
e97def4429 | ||
|
|
316d08ccb4 | ||
|
|
26fb620a40 | ||
|
|
302957e509 | ||
|
|
8bd6cffd7b | ||
|
|
58c3ebf4b0 | ||
|
|
fcbf8b5715 | ||
|
|
1165492185 | ||
|
|
47c32d3e18 | ||
|
|
38ec4a3b00 | ||
|
|
c235c6d7e8 | ||
|
|
054d5eb93f | ||
|
|
b684a5de35 | ||
|
|
e6d7f88a33 | ||
|
|
c24f191ec6 | ||
|
|
fc9cd6bdb1 | ||
|
|
e3b746f1c5 | ||
|
|
eb4b5b9b90 | ||
|
|
f3cdf57f0d | ||
|
|
cd9bbc3a0e | ||
|
|
4519dbdff7 | ||
|
|
549b8ca4c2 | ||
|
|
1df3df11ce | ||
|
|
12e38b7f69 | ||
|
|
fa410ae882 | ||
|
|
9b072aa549 | ||
|
|
0da8f41a86 | ||
|
|
8ac0de159a | ||
|
|
dcc32aa052 | ||
|
|
8952d8fd64 | ||
|
|
ebaa407444 | ||
|
|
47cec1f28d | ||
|
|
e636363e9e | ||
|
|
91d299926a | ||
|
|
01fe816fe8 | ||
|
|
649f0cc3fb | ||
|
|
99d77dff99 | ||
|
|
f0b439c125 | ||
|
|
4651216cc0 | ||
|
|
24916c6fa1 | ||
|
|
e36b1a3b2c | ||
|
|
cc6cb4b990 | ||
|
|
0cd6d722af | ||
|
|
3a330e4943 | ||
|
|
6e59e24c40 | ||
|
|
5c8897554a | ||
|
|
a8881c4de3 | ||
|
|
68b00efe5e | ||
|
|
3fd13f58f1 | ||
|
|
c43da3c1d1 | ||
|
|
f8d5595032 | ||
|
|
c9ec522956 | ||
|
|
adbdf82aa3 | ||
|
|
3f75d9a782 | ||
|
|
663c009cf4 | ||
|
|
c1b29505d9 | ||
|
|
328c92ffe6 | ||
|
|
cf2cd14154 | ||
|
|
e86799e05f | ||
|
|
1c74472b49 | ||
|
|
b79ab92714 | ||
|
|
c0ff27a8e6 | ||
|
|
a214264083 | ||
|
|
869e7e3ef0 | ||
|
|
1ddbef6105 | ||
|
|
80001a192a | ||
|
|
8b2bfa7380 | ||
|
|
8f43d8fe51 | ||
|
|
920db19f52 | ||
|
|
60e9d254d5 | ||
|
|
f218feb580 | ||
|
|
555dc8516a | ||
|
|
34958282d2 | ||
|
|
6b01ada12b | ||
|
|
e28d114d78 | ||
|
|
cd312c6d70 | ||
|
|
82422b8510 | ||
|
|
c7c97da68e | ||
|
|
657b5b67db | ||
|
|
b664b920dc | ||
|
|
7ea60efe3e | ||
|
|
f5c8b33b40 | ||
|
|
a28a744f00 | ||
|
|
68aaf1db79 | ||
|
|
b8d6dcfbf2 | ||
|
|
0ea9a04028 | ||
|
|
e448d0ec8e | ||
|
|
cb14c9a1fc | ||
|
|
ca52b6c1c7 | ||
|
|
d3cfc55944 | ||
|
|
00fd08e731 | ||
|
|
e0c865a9f7 | ||
|
|
53ffc8fdae | ||
|
|
6c1f251558 | ||
|
|
7310b43a5c | ||
|
|
9a54ae2937 | ||
|
|
64c55c8824 | ||
|
|
9cc8aeeb4b | ||
|
|
d6d39889c4 | ||
|
|
68a6a55cfc | ||
|
|
ad036c2e65 | ||
|
|
f2e43db37c | ||
|
|
1fb429b1ed | ||
|
|
4d027c7d22 | ||
|
|
785b9ef70f | ||
|
|
d834701612 | ||
|
|
0f4cc52e71 | ||
|
|
135ee98146 | ||
|
|
3899365da7 | ||
|
|
12f9fff6d5 | ||
|
|
f565befdb0 | ||
|
|
7c02eabbdf | ||
|
|
3398cc2f01 | ||
|
|
5bbe7b6e3e | ||
|
|
da1e7674f6 | ||
|
|
d46fdbc3c9 | ||
|
|
bfec61ad8d | ||
|
|
42141cd159 | ||
|
|
1bb6ada3a2 | ||
|
|
baeb822c39 | ||
|
|
e22720dc82 | ||
|
|
dd70d0e4ec | ||
|
|
804e6c3de7 | ||
|
|
5d597d1e19 | ||
|
|
ebb3d7b6a5 | ||
|
|
754ad98d3c | ||
|
|
d47d25b584 | ||
|
|
ef1c57c932 | ||
|
|
da912f1189 | ||
|
|
bb0039c70b | ||
|
|
5833b06c5b | ||
|
|
955a15786e | ||
|
|
e37afab2cd | ||
|
|
c4162752bc | ||
|
|
a30f3f658e | ||
|
|
f1b1293f5f | ||
|
|
7891e88131 | ||
|
|
5d7cd9ab1c | ||
|
|
2777c5e00a | ||
|
|
6b57caeb92 | ||
|
|
156788c56e | ||
|
|
c4d197f5ce | ||
|
|
f53354d20d | ||
|
|
075969f25d | ||
|
|
1fc22749a5 | ||
|
|
46f5b3dcb0 | ||
|
|
2622e0e111 | ||
|
|
e96298b5a8 | ||
|
|
626b8acaa9 | ||
|
|
69b3f43414 | ||
|
|
e857902dcc | ||
|
|
af5983cb68 | ||
|
|
ead7532c3c | ||
|
|
b37bf06800 | ||
|
|
d0523b9eb3 | ||
|
|
543bf3e156 | ||
|
|
d8f864c88f | ||
|
|
53e0f1455e | ||
|
|
6347ceb976 | ||
|
|
a923ee112c | ||
|
|
83e46ee84b | ||
|
|
bc66f8e4bb | ||
|
|
f1fe7d8fc5 | ||
|
|
21df85cbf4 | ||
|
|
25bdc23d45 | ||
|
|
bc2f1bfde9 | ||
|
|
da75e4b400 | ||
|
|
b74d6a582e | ||
|
|
679af90d71 | ||
|
|
5e58da7c7e | ||
|
|
9555a04870 | ||
|
|
e37c091d17 | ||
|
|
d6c9ebf35c | ||
|
|
899a8e7bf5 | ||
|
|
a8399c5ec0 | ||
|
|
cb3451e8dc | ||
|
|
61b3cb4c7f | ||
|
|
446ac0b190 | ||
|
|
8c6ccfbca2 | ||
|
|
223fe988aa | ||
|
|
75458d0678 | ||
|
|
d0a74edd34 | ||
|
|
f6b0fb62b8 | ||
|
|
fd9205070e | ||
|
|
e18ce59ea9 | ||
|
|
5fd86e07ce | ||
|
|
406bbf90fa | ||
|
|
b887315c8d | ||
|
|
08776ca2b6 | ||
|
|
8a34188854 | ||
|
|
68e0de4d9e | ||
|
|
f16d9ac55f | ||
|
|
0239062fa4 | ||
|
|
82ed9d6d56 | ||
|
|
1ce36572c4 | ||
|
|
708f5d49e8 | ||
|
|
818b837fb2 | ||
|
|
7b7965d506 | ||
|
|
5266cc23a9 | ||
|
|
fd9532ee3f | ||
|
|
b2b1e07e45 | ||
|
|
8519ff93b2 | ||
|
|
123d6e4c29 | ||
|
|
c16e53da46 | ||
|
|
c12a1f02ab | ||
|
|
13e114afc1 | ||
|
|
9145b32d11 | ||
|
|
aed4d07cf1 | ||
|
|
ca8127448e | ||
|
|
e082180cf9 | ||
|
|
df2522fa8d | ||
|
|
fc4687ff77 | ||
|
|
9cca0d0520 | ||
|
|
521648925c | ||
|
|
bc1814ce95 | ||
|
|
c551d05182 | ||
|
|
ce0a251c1c | ||
|
|
51dd524579 | ||
|
|
9532cc754e | ||
|
|
15bc12b7f6 | ||
|
|
a46938e1be | ||
|
|
8af0681373 | ||
|
|
bd6a5c3156 | ||
|
|
51435e3c2b | ||
|
|
b204c91baa | ||
|
|
e7fd1e265f | ||
|
|
42b39eda40 | ||
|
|
b50cf82639 | ||
|
|
fd42802512 | ||
|
|
8772d0eec5 | ||
|
|
ca20dcf053 | ||
|
|
67a650ce38 | ||
|
|
acb443432e | ||
|
|
3f2bb3e5db | ||
|
|
c318611561 | ||
|
|
77e7039a2e | ||
|
|
b7e043eca8 | ||
|
|
78d03e03bb | ||
|
|
5e2d11835e | ||
|
|
8656ee1a1d | ||
|
|
f21ec4de61 | ||
|
|
cdbaf9460e | ||
|
|
5439681a39 | ||
|
|
9cfb7921bc | ||
|
|
36852cd5f5 | ||
|
|
b5c5a1722d | ||
|
|
5ae36367a4 | ||
|
|
d743936ee4 | ||
|
|
c817a2234d | ||
|
|
57f9530198 | ||
|
|
3e444da7bc | ||
|
|
867bc258b9 | ||
|
|
ff9248e971 | ||
|
|
38a6a02f85 | ||
|
|
90f4d71606 | ||
|
|
8f760e2842 | ||
|
|
5b32c41277 | ||
|
|
fb612c24df | ||
|
|
8ed0b1fe61 | ||
|
|
82efe05343 | ||
|
|
2cbf60fa17 | ||
|
|
ce8c58f542 | ||
|
|
b9d0852c83 | ||
|
|
5669747bbf | ||
|
|
0580398c90 | ||
|
|
8422f6fbd9 | ||
|
|
8467209d35 | ||
|
|
80c8d87f71 | ||
|
|
6bc149bae2 | ||
|
|
250ff960bd | ||
|
|
e1dca00f46 | ||
|
|
f17dcdc3e9 | ||
|
|
4839bdcaad | ||
|
|
91dda5cb16 | ||
|
|
0a82fec359 | ||
|
|
13397f41ad | ||
|
|
9e44e21a66 | ||
|
|
54efda1a25 | ||
|
|
bcd1410438 | ||
|
|
fdcc745f11 | ||
|
|
4a5ca184c0 | ||
|
|
e037feafbf | ||
|
|
0220c75884 | ||
|
|
5f668d76f0 | ||
|
|
1d14ebccad | ||
|
|
06ab6d2dad | ||
|
|
6b0ecacc63 | ||
|
|
2965a9091e | ||
|
|
160209698c | ||
|
|
7361defa17 | ||
|
|
68774a3ccc | ||
|
|
70b7991cdf | ||
|
|
4706aa9a1e | ||
|
|
fb183f4eab | ||
|
|
3d5a9eae31 | ||
|
|
e55d83ffa0 | ||
|
|
fd9ce8f0cb | ||
|
|
126228774c | ||
|
|
3c26af0cd7 | ||
|
|
b781300977 | ||
|
|
c0e164d763 | ||
|
|
2fd737fbc2 | ||
|
|
ee9800c258 | ||
|
|
5b38c85f8a | ||
|
|
72c122dff9 | ||
|
|
3e8834e057 | ||
|
|
5779afd858 | ||
|
|
da43c5ba7d | ||
|
|
cd181bc1fd | ||
|
|
01f1321bd4 | ||
|
|
52768c9a65 | ||
|
|
96b878f049 | ||
|
|
a00052a8ca | ||
|
|
4596c30e9d | ||
|
|
051500fff1 | ||
|
|
bc34758c91 | ||
|
|
e3f027d625 | ||
|
|
46fca2af5a | ||
|
|
dc073c85ed | ||
|
|
597356f317 | ||
|
|
0655122a57 | ||
|
|
51ea411a79 | ||
|
|
776dba5e23 | ||
|
|
6858dcfa7a | ||
|
|
ea018be298 | ||
|
|
841d1f94f2 | ||
|
|
262b1cca34 | ||
|
|
378a33aaee | ||
|
|
09652056b7 | ||
|
|
39ef816f5e | ||
|
|
f68dc77ea3 | ||
|
|
51b2a211cb | ||
|
|
9de67ad898 | ||
|
|
8922e9fe7d | ||
|
|
90f25ab20c | ||
|
|
6c476a994e | ||
|
|
1b87616a11 | ||
|
|
8d65b84b89 | ||
|
|
13f7b2ae30 | ||
|
|
bdcd95ab55 | ||
|
|
032d6b790a | ||
|
|
125b6fbe58 | ||
|
|
d4d9d2a982 | ||
|
|
1cc47f7570 | ||
|
|
83a85d15c0 | ||
|
|
0ab33a17df | ||
|
|
30e4ad0d3d | ||
|
|
151ff11745 | ||
|
|
b942794179 | ||
|
|
57071129bf | ||
|
|
0f90847c07 | ||
|
|
e091b32c4b | ||
|
|
298d39c57b | ||
|
|
9503d3cf48 | ||
|
|
95f04abdfd | ||
|
|
7e3f5047a1 | ||
|
|
5c77cf004b | ||
|
|
295ed47c43 | ||
|
|
d8b7ed81b5 | ||
|
|
f4980917d2 | ||
|
|
1c9173f48a | ||
|
|
f6b7a32a33 | ||
|
|
aa03a7f268 | ||
|
|
136b2c47f8 | ||
|
|
0043c375d8 | ||
|
|
c44c3fb095 | ||
|
|
cb70e97366 | ||
|
|
1d21dc7f20 | ||
|
|
4d4ed3e827 | ||
|
|
0eb4286b71 | ||
|
|
f73cff3cb3 | ||
|
|
54c8a7beef | ||
|
|
584d45d315 | ||
|
|
43aa01ce5f | ||
|
|
a0c6565e59 | ||
|
|
bac795a36a | ||
|
|
c9acc30009 | ||
|
|
0cf0fd52c7 | ||
|
|
2b8530b3e2 | ||
|
|
550756c33c | ||
|
|
4230120884 | ||
|
|
90b88676c5 | ||
|
|
862123e2d6 | ||
|
|
c1a2f6e649 | ||
|
|
c0d3047dab | ||
|
|
1a50cd339e | ||
|
|
30db53d250 | ||
|
|
1309cc63c9 | ||
|
|
32b862c79b | ||
|
|
e09a468d2c | ||
|
|
adb896f294 | ||
|
|
2fd3158c7b | ||
|
|
ba2672a0b0 | ||
|
|
7c02a9728a | ||
|
|
9b327f6ad5 | ||
|
|
2a3f700fde | ||
|
|
d221c64f62 | ||
|
|
0f1cc494fe | ||
|
|
be68adbf01 | ||
|
|
185238c199 | ||
|
|
210ac2c419 | ||
|
|
658cf92a3b | ||
|
|
d3f7594aea | ||
|
|
939dd0b295 | ||
|
|
51e384292c | ||
|
|
f27f1d188c | ||
|
|
8974e3446a | ||
|
|
57a408e384 | ||
|
|
1fa391a9f1 | ||
|
|
7885f8e454 | ||
|
|
32ac0941dc | ||
|
|
371d826dd4 | ||
|
|
aeebe6cc4b | ||
|
|
257a3ba807 | ||
|
|
ecdfaf6c0d | ||
|
|
bc28071205 | ||
|
|
8962d501b3 | ||
|
|
e91031fa73 | ||
|
|
cb2a059e16 | ||
|
|
5e5c7bbdaf | ||
|
|
8b241e7871 | ||
|
|
0740fc2bc1 | ||
|
|
a3cf6c4ea8 | ||
|
|
697ff11fa7 | ||
|
|
0d6980b9b4 | ||
|
|
387932e960 | ||
|
|
79e62755b8 | ||
|
|
746dc2738f | ||
|
|
7e67838adb | ||
|
|
7010ab1fc6 | ||
|
|
4eb4abf4f5 | ||
|
|
451e2b6497 | ||
|
|
60479971b8 | ||
|
|
76092c366e | ||
|
|
e09c48d67c | ||
|
|
60199f79aa | ||
|
|
d713dce7e0 |
39
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
39
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
##### ISSUE TYPE
|
||||
- Bug Report
|
||||
|
||||
##### SUMMARY
|
||||
<!-- Briefly describe the problem. -->
|
||||
|
||||
##### ENVIRONMENT
|
||||
* AWX version: X.Y.Z
|
||||
* Operator version: X.Y.Z
|
||||
* Kubernetes version:
|
||||
* AWX install method: openshift, minishift, docker on linux, docker for mac, boot2docker
|
||||
|
||||
##### STEPS TO REPRODUCE
|
||||
|
||||
<!-- Please describe exactly how to reproduce the problem. -->
|
||||
|
||||
##### EXPECTED RESULTS
|
||||
|
||||
<!-- What did you expect to happen when running the steps above? -->
|
||||
|
||||
##### ACTUAL RESULTS
|
||||
|
||||
<!-- What actually happened? -->
|
||||
|
||||
##### ADDITIONAL INFORMATION
|
||||
|
||||
<!-- Include any links to sosreport, database dumps, screenshots or other
|
||||
information. -->
|
||||
|
||||
##### AWX-OPERATOR LOGS
|
||||
3
.github/issue_labeler.yml
vendored
Normal file
3
.github/issue_labeler.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
needs_triage:
|
||||
- '.*'
|
||||
41
.github/workflows/ci.yaml
vendored
Normal file
41
.github/workflows/ci.yaml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [devel]
|
||||
|
||||
push:
|
||||
branches: [devel]
|
||||
|
||||
jobs:
|
||||
pull_request:
|
||||
runs-on: ubuntu-18.04
|
||||
name: pull_request
|
||||
env:
|
||||
DOCKER_API_VERSION: "1.38"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.8"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
pip install -r molecule/requirements.txt
|
||||
|
||||
- name: Install Collections
|
||||
run: |
|
||||
ansible-galaxy collection install -r molecule/requirements.yml
|
||||
|
||||
- name: Run Molecule
|
||||
env:
|
||||
MOLECULE_VERBOSITY: 3
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
run: |
|
||||
sudo rm -f $(which kustomize)
|
||||
make kustomize
|
||||
KUSTOMIZE_PATH=$(readlink -f bin/kustomize) molecule test -s kind
|
||||
27
.github/workflows/devel.yaml
vendored
Normal file
27
.github/workflows/devel.yaml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
|
||||
name: Devel
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [devel]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-18.04
|
||||
name: Push devel image
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build Image
|
||||
run: |
|
||||
IMG=awx-operator:devel make docker-build
|
||||
|
||||
- name: Push To Quay
|
||||
uses: redhat-actions/push-to-registry@v2.1.1
|
||||
with:
|
||||
image: awx-operator
|
||||
tags: devel
|
||||
registry: quay.io/ansible/
|
||||
username: ${{ secrets.QUAY_USER }}
|
||||
password: ${{ secrets.QUAY_TOKEN }}
|
||||
25
.github/workflows/promote.yaml
vendored
Normal file
25
.github/workflows/promote.yaml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
name: Promote AWX Operator image
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
promote:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Log in to GHCR
|
||||
run: |
|
||||
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Log in to Quay
|
||||
run: |
|
||||
echo ${{ secrets.QUAY_TOKEN }} | docker login quay.io -u ${{ secrets.QUAY_USER }} --password-stdin
|
||||
|
||||
- name: Re-tag and promote awx-operator image
|
||||
run: |
|
||||
docker pull ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
|
||||
docker tag ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} quay.io/${{ github.repository }}:${{ github.event.release.tag_name }}
|
||||
docker tag ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} quay.io/${{ github.repository }}:latest
|
||||
docker push quay.io/${{ github.repository }}:${{ github.event.release.tag_name }}
|
||||
docker push quay.io/${{ github.repository }}:latest
|
||||
84
.github/workflows/stage.yml
vendored
Normal file
84
.github/workflows/stage.yml
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
---
|
||||
name: Stage Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version to stage'
|
||||
required: true
|
||||
default_awx_version:
|
||||
description: 'Will be injected as the DEFAULT_AWX_VERSION build arg.'
|
||||
required: true
|
||||
confirm:
|
||||
description: 'Are you sure? Set this to yes.'
|
||||
required: true
|
||||
default: 'no'
|
||||
|
||||
jobs:
|
||||
stage:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: write
|
||||
steps:
|
||||
- name: Verify inputs
|
||||
run: |
|
||||
set -e
|
||||
|
||||
if [[ ${{ github.event.inputs.confirm }} != "yes" ]]; then
|
||||
>&2 echo "Confirm must be 'yes'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ${{ github.event.inputs.version }} == "" ]]; then
|
||||
>&2 echo "Set version to continue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
- name: Checkout awx
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/awx
|
||||
path: awx
|
||||
|
||||
- name: Checkout awx-operator
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/awx-operator
|
||||
path: awx-operator
|
||||
|
||||
- name: Install playbook dependencies
|
||||
run: |
|
||||
python3 -m pip install docker
|
||||
|
||||
- name: Log in to GHCR
|
||||
run: |
|
||||
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Build and stage awx-operator
|
||||
working-directory: awx-operator
|
||||
run: |
|
||||
BUILD_ARGS="--build-arg DEFAULT_AWX_VERSION=${{ github.event.inputs.default_awx_version }}" \
|
||||
IMAGE_TAG_BASE=ghcr.io/${{ github.repository_owner }}/awx-operator \
|
||||
VERSION=${{ github.event.inputs.version }} make docker-build docker-push
|
||||
|
||||
- name: Run test deployment
|
||||
working-directory: awx-operator
|
||||
run: |
|
||||
python3 -m pip install -r molecule/requirements.txt
|
||||
ansible-galaxy collection install -r molecule/requirements.yml
|
||||
sudo rm -f $(which kustomize)
|
||||
make kustomize
|
||||
KUSTOMIZE_PATH=$(readlink -f bin/kustomize) molecule test -s kind
|
||||
env:
|
||||
AWX_TEST_VERSION: ${{ github.event.inputs.default_awx_version }}
|
||||
|
||||
- name: Create draft release
|
||||
working-directory: awx
|
||||
run: |
|
||||
ansible-playbook tools/ansible/stage.yml \
|
||||
-e version=${{ github.event.inputs.version }} \
|
||||
-e repo=${{ github.repository_owner }}/awx-operator \
|
||||
-e github_token=${{ secrets.GITHUB_TOKEN }}
|
||||
22
.github/workflows/triage_new.yml
vendored
Normal file
22
.github/workflows/triage_new.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
name: Triage
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
name: Label
|
||||
|
||||
steps:
|
||||
- name: Label issues
|
||||
uses: github/issue-labeler@v2.4.1
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
not-before: 2021-12-07T07:00:00Z
|
||||
configuration-path: .github/issue_labeler.yml
|
||||
enable-versioned-regex: 0
|
||||
if: github.event_name == 'issues'
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,2 +1,6 @@
|
||||
*~
|
||||
.cache/
|
||||
/bin
|
||||
/bundle
|
||||
/bundle_tmp*
|
||||
/bundle.Dockerfile
|
||||
|
||||
19
.travis.yml
19
.travis.yml
@@ -1,19 +0,0 @@
|
||||
---
|
||||
services: docker
|
||||
language: python
|
||||
|
||||
before_install:
|
||||
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||
- sudo apt-get update
|
||||
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
|
||||
|
||||
env:
|
||||
- DOCKER_API_VERSION=1.38
|
||||
|
||||
install:
|
||||
- pip3 install docker molecule molecule-docker yamllint ansible-lint openshift jmespath ansible
|
||||
- ansible-galaxy collection install community.kubernetes operator_sdk.util
|
||||
|
||||
script:
|
||||
- MOLECULE_VERBOSITY=3 molecule test -s test-local
|
||||
@@ -3,10 +3,11 @@ extends: default
|
||||
|
||||
ignore: |
|
||||
.cache/
|
||||
deploy/olm-catalog
|
||||
kustomization.yaml
|
||||
awx-operator.clusterserviceversion.yaml
|
||||
bundle
|
||||
|
||||
rules:
|
||||
truthy: disable
|
||||
line-length:
|
||||
max: 160
|
||||
level: warning
|
||||
max: 170
|
||||
|
||||
43
CHANGELOG.md
Normal file
43
CHANGELOG.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Changelog
|
||||
|
||||
This is a list of high-level changes for each release of `awx-operator`. A full list of commits can be found at `https://github.com/ansible/awx-operator/releases/tag/<version>`.
|
||||
|
||||
# 0.14.0 (TBA)
|
||||
|
||||
- Starting with awx-operator 0.14.0, the project is now based on operator-sdk 1.x.
|
||||
- To avoid a headache, you probably want to delete your existing operator Deployment and follow the README.
|
||||
- Starting with awx-operator 0.14.0, AWX can only be deployed in the namespace that the operator exists in. See [upgrade docs](./README.md#upgrading) for necessary cleanup actions. (Christian Adams) - 58c3ebf (breaking change)
|
||||
|
||||
# 0.10.0 (Jun 1, 2021)
|
||||
|
||||
- Make tower_ingress_type to respect ClusterIP definition (Marcelo Moreira de Mello) - e37c091 (breaking_change)
|
||||
- Add ability to get/create/delete secrets for the awx service account (Christian M. Adams) - 61b3cb4
|
||||
- Added ability to specify annotations to ServiceAccount (Marcelo Moreira de Mello) - 446ac0b
|
||||
- Do not shadow other variables (Yanis Guenane) - 223fe98
|
||||
- Do not prepend variables name with tower_ (Yanis Guenane) - 75458d0 (breaking_change)
|
||||
- Fully remove finalizer (Christian M. Adams) - fd92050
|
||||
- Use custom pg_dump format for faster restores (Christian M. Adams) - f16d9ac
|
||||
- Allow user to specify empty string for storage class on PVC (Christian M. Adams) - 818b837
|
||||
- Unset ownerRefs in the installer instead of the finalizer (Christian M. Adams) - c12a1f0
|
||||
- Make awx-operator compatible with Ansible 2.12 (Alan Rominger) - 5216489
|
||||
- Restore: set proper kind var after deploying AWX CR (Julen Landa Alustiza) - fc4687f
|
||||
- Add support for custom service labels (Jeremy Kimber) - fd42802
|
||||
- Rename product specific variable names (Christian M. Adams) - 5ae3636 (breaking_change)
|
||||
- Add watcher for backup CR (Christian M. Adams) - fdcc745
|
||||
|
||||
# 0.9.0 (May 1, 2021)
|
||||
|
||||
- Update playbook to allow for deploying custom image version/tag (Shane McDonald) - 77e7039
|
||||
- Mounts /var/lib/awx/projects on awx-web container (Marcelo Moreira de Mello) - f21ec4d
|
||||
- Extra Settings: Allow one to pass extra API configuration settings. (Yanis Guenane) - 1d14ebc
|
||||
- PostgreSQL: Properly handle variable name difference when using Red Hat containers (Yanis Guenane) - 2965a90
|
||||
- Deployment type: Make more fields dynamic based on that field (Yanis Guenane) - 4706aa9
|
||||
- Add templated EE volume mount var to operator config (Christian M. Adams) - e55d83f
|
||||
- Add NodePort to tower_ingress_type enum (TheStally) - 96b878f
|
||||
- Split container image and version in 2 variables (Marcelo Moreira de Mello) - bc34758 (breaking_change)
|
||||
- Handles deleting and recreating statefulset and deployment when needed (Marcelo Moreira de Mello) - 597356f
|
||||
- Add tower_ingress_type NodePort (stal) - 1b87616
|
||||
- expose settings to use custom volumes and volume mounts (Gabe Muniz) - 8d65b84
|
||||
- Inherit imagePullPolicy to redis container (Marcelo Moreira de Mello) - 83a85d1
|
||||
- Add nodeSelector and tolerations for Postgres pod (Ernesto Pérez) - 151ff11
|
||||
- Added support to override pg_sslmode (Marcelo Moreira de Mello) - 298d39c
|
||||
140
CONTRIBUTING.md
Normal file
140
CONTRIBUTING.md
Normal file
@@ -0,0 +1,140 @@
|
||||
# AWX-Operator Contributing Guidelines
|
||||
|
||||
Hi there! We're excited to have you as a contributor.
|
||||
|
||||
Have questions about this document or anything not covered here? Please file a new at [https://github.com/ansible/awx-operator/issues](https://github.com/ansible/awx-operator/issues).
|
||||
|
||||
## Table of contents
|
||||
|
||||
* [Things to know prior to submitting code](#things-to-know-prior-to-submitting-code)
|
||||
* [Submmiting your Work](#submitting-your-work)
|
||||
* [Testing](#testing)
|
||||
* [Testing in Docker](#testing-in-docker)
|
||||
* [Testing in Minikube](#testing-in-minikube)
|
||||
* [Generating a bundle](#generating-a-bundle)
|
||||
* [Reporting Issues](#reporting-issues)
|
||||
|
||||
|
||||
## Things to know prior to submitting code
|
||||
|
||||
- All code submissions are done through pull requests against the `devel` branch.
|
||||
- All PRs must have a single commit. Make sure to `squash` any changes into a single commit.
|
||||
- Take care to make sure no merge commits are in the submission, and use `git rebase` vs `git merge` for this reason.
|
||||
- If collaborating with someone else on the same branch, consider using `--force-with-lease` instead of `--force`. This will prevent you from accidentally overwriting commits pushed by someone else. For more information, see https://git-scm.com/docs/git-push#git-push---force-with-leaseltrefnamegt
|
||||
- We ask all of our community members and contributors to adhere to the [Ansible code of conduct](http://docs.ansible.com/ansible/latest/community/code_of_conduct.html). If you have questions, or need assistance, please reach out to our community team at [codeofconduct@ansible.com](mailto:codeofconduct@ansible.com)
|
||||
|
||||
|
||||
## Submmiting your work
|
||||
1. From your fork `devel` branch, create a new brach to stage your changes.
|
||||
```sh
|
||||
#> git checkout -b <branch-name>
|
||||
```
|
||||
2. Make your changes.
|
||||
3. Test your changes according described on the Testing section.
|
||||
4. If everylooks looks correct, commit your changes.
|
||||
```sh
|
||||
#> git add <FILES>
|
||||
#> git commit -m "My message here"
|
||||
```
|
||||
5. Create your [pull request](https://github.com/ansible/awx-operator/pulls)
|
||||
|
||||
**Note**: If you have multiple commits, make sure to `squash` your commits into a single commit which will facilitate our release process.
|
||||
|
||||
|
||||
|
||||
## Testing
|
||||
|
||||
This Operator includes a [Molecule](https://molecule.readthedocs.io/en/stable/)-based test environment, which can be executed standalone in Docker (e.g. in CI or in a single Docker container anywhere), or inside any kind of Kubernetes cluster (e.g. Minikube).
|
||||
|
||||
You need to make sure you have Molecule installed before running the following commands. You can install Molecule with:
|
||||
|
||||
```sh
|
||||
#> pip install 'molecule[docker]'
|
||||
```
|
||||
|
||||
Running `molecule test` sets up a clean environment, builds the operator, runs all configured tests on an example operator instance, then tears down the environment (at least in the case of Docker).
|
||||
|
||||
If you want to actively develop the operator, use `molecule converge`, which does everything but tear down the environment at the end.
|
||||
|
||||
#### Testing in Docker
|
||||
|
||||
```sh
|
||||
#> molecule test -s test-local
|
||||
```
|
||||
|
||||
This environment is meant for headless testing (e.g. in a CI environment, or when making smaller changes which don't need to be verified through a web interface). It is difficult to test things like AWX's web UI or to connect other applications on your local machine to the services running inside the cluster, since it is inside a Docker container with no static IP address.
|
||||
|
||||
#### Testing in Minikube
|
||||
|
||||
```sh
|
||||
#> minikube start --memory 8g --cpus 4
|
||||
#> minikube addons enable ingress
|
||||
#> molecule test -s test-minikube
|
||||
```
|
||||
|
||||
[Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) is a more full-featured test environment running inside a full VM on your computer, with an assigned IP address. This makes it easier to test things like NodePort services and Ingress from outside the Kubernetes cluster (e.g. in a browser on your computer).
|
||||
|
||||
Once the operator is deployed, you can visit the AWX UI in your browser by following these steps:
|
||||
|
||||
1. Make sure you have an entry like `IP_ADDRESS example-awx.test` in your `/etc/hosts` file. (Get the IP address with `minikube ip`.)
|
||||
2. Visit `http://example-awx.test/` in your browser. (Default admin login is `test`/`changeme`.)
|
||||
|
||||
Alternatively, you can also update the service `awx-service` in your namespace to use the type `NodePort` and use following command to get the URL to access your AWX instance:
|
||||
|
||||
```sh
|
||||
#> minikube service <serviceName> -n <namespaceName> --url
|
||||
```
|
||||
|
||||
## Generating a bundle
|
||||
|
||||
> :warning: operator-sdk version 0.19.4 is needed to run the following commands
|
||||
|
||||
If one has the Operator Lifecycle Manager (OLM) installed, the following steps is the process to generate the bundle that would nicely display in the OLM interface.
|
||||
|
||||
At the root of this directory:
|
||||
|
||||
1. Build and publish the operator
|
||||
|
||||
```
|
||||
#> operator-sdk build registry.example.com/ansible/awx-operator:mytag
|
||||
#> podman push registry.example.com/ansible/awx-operator:mytag
|
||||
```
|
||||
|
||||
2. Build and publish the bundle
|
||||
|
||||
```
|
||||
#> podman build . -f bundle.Dockerfile -t registry.example.com/ansible/awx-operator-bundle:mytag
|
||||
#> podman push registry.example.com/ansible/awx-operator-bundle:mytag
|
||||
```
|
||||
|
||||
3. Build and publish an index with your bundle in it
|
||||
|
||||
```
|
||||
#> opm index add --bundles registry.example.com/ansible/awx-operator-bundle:mytag --tag registry.example.com/ansible/awx-operator-catalog:mytag
|
||||
#> podman push registry.example.com/ansible/awx-operator-catalog:mytag
|
||||
```
|
||||
|
||||
4. In your Kubernetes create a new CatalogSource pointing to `registry.example.com/ansible/awx-operator-catalog:mytag`
|
||||
|
||||
```
|
||||
---
|
||||
apiVersion: operators.coreos.com/v1alpha1
|
||||
kind: CatalogSource
|
||||
metadata:
|
||||
name: <catalogsource-name>
|
||||
namespace: <namespace>
|
||||
spec:
|
||||
displayName: 'myoperatorhub'
|
||||
image: registry.example.com/ansible/awx-operator-catalog:mytag
|
||||
publisher: 'myoperatorhub'
|
||||
sourceType: grpc
|
||||
```
|
||||
|
||||
Applying this template will do it. Once the CatalogSource is in a READY state, the bundle should be available on the OperatorHub tab (as part of the custom CatalogSource that just got added)
|
||||
|
||||
5. Enjoy
|
||||
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
We welcome your feedback, and encourage you to file an issue when you run into a problem.
|
||||
@@ -1,11 +1,12 @@
|
||||
FROM quay.io/operator-framework/ansible-operator:v0.19.4
|
||||
FROM quay.io/operator-framework/ansible-operator:v1.12.0
|
||||
|
||||
ARG DEFAULT_AWX_VERSION
|
||||
ENV DEFAULT_AWX_VERSION=${DEFAULT_AWX_VERSION}
|
||||
|
||||
# Install Ansible requirements.
|
||||
COPY requirements.yml ${HOME}/requirements.yml
|
||||
RUN ansible-galaxy collection install -r ${HOME}/requirements.yml \
|
||||
&& chmod -R ug+rwx ${HOME}/.ansible
|
||||
|
||||
COPY watches.yaml ${HOME}/watches.yaml
|
||||
|
||||
COPY main.yml ${HOME}/main.yml
|
||||
COPY roles/ ${HOME}/roles/
|
||||
COPY playbooks/ ${HOME}/playbooks/
|
||||
184
Makefile
Normal file
184
Makefile
Normal file
@@ -0,0 +1,184 @@
|
||||
# VERSION defines the project version for the bundle.
|
||||
# Update this value when you upgrade the version of your project.
|
||||
# To re-generate a bundle for another specific version without changing the standard setup, you can:
|
||||
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
|
||||
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
|
||||
VERSION ?= $(shell git describe --tags)
|
||||
|
||||
CONTAINER_CMD ?= docker
|
||||
|
||||
# CHANNELS define the bundle channels used in the bundle.
|
||||
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
|
||||
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
|
||||
# - use the CHANNELS as arg of the bundle target (e.g make bundle CHANNELS=candidate,fast,stable)
|
||||
# - use environment variables to overwrite this value (e.g export CHANNELS="candidate,fast,stable")
|
||||
ifneq ($(origin CHANNELS), undefined)
|
||||
BUNDLE_CHANNELS := --channels=$(CHANNELS)
|
||||
endif
|
||||
|
||||
# DEFAULT_CHANNEL defines the default channel used in the bundle.
|
||||
# Add a new line here if you would like to change its default config. (E.g DEFAULT_CHANNEL = "stable")
|
||||
# To re-generate a bundle for any other default channel without changing the default setup, you can:
|
||||
# - use the DEFAULT_CHANNEL as arg of the bundle target (e.g make bundle DEFAULT_CHANNEL=stable)
|
||||
# - use environment variables to overwrite this value (e.g export DEFAULT_CHANNEL="stable")
|
||||
ifneq ($(origin DEFAULT_CHANNEL), undefined)
|
||||
BUNDLE_DEFAULT_CHANNEL := --default-channel=$(DEFAULT_CHANNEL)
|
||||
endif
|
||||
BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
|
||||
|
||||
# IMAGE_TAG_BASE defines the docker.io namespace and part of the image name for remote images.
|
||||
# This variable is used to construct full image tags for bundle and catalog images.
|
||||
#
|
||||
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
|
||||
# ansible.com/awx-operator-bundle:$VERSION and ansible.com/awx-operator-catalog:$VERSION.
|
||||
IMAGE_TAG_BASE ?= quay.io/ansible/awx-operator
|
||||
|
||||
# BUNDLE_IMG defines the image:tag used for the bundle.
|
||||
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
|
||||
BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION)
|
||||
|
||||
# Image URL to use all building/pushing image targets
|
||||
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
|
||||
NAMESPACE ?= awx
|
||||
|
||||
all: docker-build
|
||||
|
||||
##@ General
|
||||
|
||||
# The help target prints out all targets with their descriptions organized
|
||||
# beneath their categories. The categories are represented by '##@' and the
|
||||
# target descriptions by '##'. The awk commands is responsible for reading the
|
||||
# entire set of makefiles included in this invocation, looking for lines of the
|
||||
# file as xyz: ## something, and then pretty-format the target and help. Then,
|
||||
# if there's a line with ##@ something, that gets pretty-printed as a category.
|
||||
# More info on the usage of ANSI control characters for terminal formatting:
|
||||
# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters
|
||||
# More info on the awk command:
|
||||
# http://linuxcommand.org/lc3_adv_awk.php
|
||||
|
||||
help: ## Display this help.
|
||||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||
|
||||
##@ Build
|
||||
|
||||
run: ansible-operator ## Run against the configured Kubernetes cluster in ~/.kube/config
|
||||
ANSIBLE_ROLES_PATH="$(ANSIBLE_ROLES_PATH):$(shell pwd)/roles" $(ANSIBLE_OPERATOR) run
|
||||
|
||||
docker-build: ## Build docker image with the manager.
|
||||
${CONTAINER_CMD} build $(BUILD_ARGS) -t ${IMG} .
|
||||
|
||||
docker-push: ## Push docker image with the manager.
|
||||
${CONTAINER_CMD} push ${IMG}
|
||||
|
||||
##@ Deployment
|
||||
|
||||
install: kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
|
||||
$(KUSTOMIZE) build config/crd | kubectl apply -f -
|
||||
|
||||
uninstall: kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
|
||||
$(KUSTOMIZE) build config/crd | kubectl delete -f -
|
||||
|
||||
gen-resources: kustomize ## Generate resources for controller and print to stdout
|
||||
@cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
|
||||
@cd config/default && $(KUSTOMIZE) edit set namespace ${NAMESPACE}
|
||||
@$(KUSTOMIZE) build config/default
|
||||
|
||||
deploy: kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
|
||||
@cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
|
||||
@cd config/default && $(KUSTOMIZE) edit set namespace ${NAMESPACE}
|
||||
@$(KUSTOMIZE) build config/default | kubectl apply -f -
|
||||
|
||||
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config.
|
||||
@cd config/default && $(KUSTOMIZE) edit set namespace ${NAMESPACE}
|
||||
$(KUSTOMIZE) build config/default | kubectl delete -f -
|
||||
|
||||
OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
||||
ARCH := $(shell uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/')
|
||||
|
||||
.PHONY: kustomize
|
||||
KUSTOMIZE = $(shell pwd)/bin/kustomize
|
||||
kustomize: ## Download kustomize locally if necessary.
|
||||
ifeq (,$(wildcard $(KUSTOMIZE)))
|
||||
ifeq (,$(shell which kustomize 2>/dev/null))
|
||||
@{ \
|
||||
set -e ;\
|
||||
mkdir -p $(dir $(KUSTOMIZE)) ;\
|
||||
curl -sSLo - https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.8.7/kustomize_v3.8.7_$(OS)_$(ARCH).tar.gz | \
|
||||
tar xzf - -C bin/ ;\
|
||||
}
|
||||
else
|
||||
KUSTOMIZE = $(shell which kustomize)
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: ansible-operator
|
||||
ANSIBLE_OPERATOR = $(shell pwd)/bin/ansible-operator
|
||||
ansible-operator: ## Download ansible-operator locally if necessary, preferring the $(pwd)/bin path over global if both exist.
|
||||
ifeq (,$(wildcard $(ANSIBLE_OPERATOR)))
|
||||
ifeq (,$(shell which ansible-operator 2>/dev/null))
|
||||
@{ \
|
||||
set -e ;\
|
||||
mkdir -p $(dir $(ANSIBLE_OPERATOR)) ;\
|
||||
curl -sSLo $(ANSIBLE_OPERATOR) https://github.com/operator-framework/operator-sdk/releases/download/v1.12.0/ansible-operator_$(OS)_$(ARCH) ;\
|
||||
chmod +x $(ANSIBLE_OPERATOR) ;\
|
||||
}
|
||||
else
|
||||
ANSIBLE_OPERATOR = $(shell which ansible-operator)
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: bundle
|
||||
bundle: kustomize ## Generate bundle manifests and metadata, then validate generated files.
|
||||
operator-sdk generate kustomize manifests -q
|
||||
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
|
||||
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
|
||||
cd config/manifests/bases && python inject-csv-config.py
|
||||
operator-sdk bundle validate ./bundle
|
||||
|
||||
.PHONY: bundle-build
|
||||
bundle-build: ## Build the bundle image.
|
||||
${CONTAINER_CMD} build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
|
||||
|
||||
.PHONY: bundle-push
|
||||
bundle-push: ## Push the bundle image.
|
||||
$(MAKE) docker-push IMG=$(BUNDLE_IMG)
|
||||
|
||||
.PHONY: opm
|
||||
OPM = ./bin/opm
|
||||
opm: ## Download opm locally if necessary.
|
||||
ifeq (,$(wildcard $(OPM)))
|
||||
ifeq (,$(shell which opm 2>/dev/null))
|
||||
@{ \
|
||||
set -e ;\
|
||||
mkdir -p $(dir $(OPM)) ;\
|
||||
curl -sSLo $(OPM) https://github.com/operator-framework/operator-registry/releases/download/v1.15.1/$(OS)-$(ARCH)-opm ;\
|
||||
chmod +x $(OPM) ;\
|
||||
}
|
||||
else
|
||||
OPM = $(shell which opm)
|
||||
endif
|
||||
endif
|
||||
|
||||
# A comma-separated list of bundle images (e.g. make catalog-build BUNDLE_IMGS=example.com/operator-bundle:v0.1.0,example.com/operator-bundle:v0.2.0).
|
||||
# These images MUST exist in a registry and be pull-able.
|
||||
BUNDLE_IMGS ?= $(BUNDLE_IMG)
|
||||
|
||||
# The image tag given to the resulting catalog image (e.g. make catalog-build CATALOG_IMG=example.com/operator-catalog:v0.2.0).
|
||||
CATALOG_IMG ?= $(IMAGE_TAG_BASE)-catalog:v$(VERSION)
|
||||
|
||||
# Set CATALOG_BASE_IMG to an existing catalog image tag to add $BUNDLE_IMGS to that image.
|
||||
ifneq ($(origin CATALOG_BASE_IMG), undefined)
|
||||
FROM_INDEX_OPT := --from-index $(CATALOG_BASE_IMG)
|
||||
endif
|
||||
|
||||
# Build a catalog image by adding bundle images to an empty catalog using the operator package manager tool, 'opm'.
|
||||
# This recipe invokes 'opm' in 'semver' bundle add mode. For more information on add modes, see:
|
||||
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
|
||||
.PHONY: catalog-build
|
||||
catalog-build: opm ## Build a catalog image.
|
||||
$(OPM) index add --container-tool ${CONTAINER_CMD} --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
|
||||
|
||||
# Push the catalog image.
|
||||
.PHONY: catalog-push
|
||||
catalog-push: ## Push a catalog image.
|
||||
$(MAKE) docker-push IMG=$(CATALOG_IMG)
|
||||
16
PROJECT
Normal file
16
PROJECT
Normal file
@@ -0,0 +1,16 @@
|
||||
domain: ansible.com
|
||||
layout:
|
||||
- ansible.sdk.operatorframework.io/v1
|
||||
plugins:
|
||||
manifests.sdk.operatorframework.io/v2: {}
|
||||
scorecard.sdk.operatorframework.io/v2: {}
|
||||
projectName: awx-operator
|
||||
resources:
|
||||
- api:
|
||||
crdVersion: v1
|
||||
namespaced: true
|
||||
domain: ansible.com
|
||||
group: awx
|
||||
kind: AWX
|
||||
version: v1beta1
|
||||
version: "3"
|
||||
@@ -1,17 +0,0 @@
|
||||
---
|
||||
- name: Build and Deploy the AWX Operator
|
||||
hosts: localhost
|
||||
|
||||
collections:
|
||||
- community.general
|
||||
|
||||
tasks:
|
||||
- name: Build and (optionally) push operator image
|
||||
docker_image:
|
||||
name: "{{ operator_image }}:{{ operator_version }}"
|
||||
pull: no
|
||||
push: "{{ push_image | bool }}"
|
||||
build:
|
||||
dockerfile: "build/Dockerfile"
|
||||
path: "../"
|
||||
force: yes
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
# To run: `ansible-playbook chain-operator-files.yml`
|
||||
- name: Chain operator files together for easy deployment.
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Template CRD
|
||||
template:
|
||||
src: crd.yml.j2
|
||||
dest: "{{ playbook_dir }}/../deploy/crds/awx_v1beta1_crd.yaml"
|
||||
mode: '0644'
|
||||
|
||||
- name: Template awx-operator.yaml
|
||||
template:
|
||||
src: awx-operator.yaml.j2
|
||||
dest: ../deploy/awx-operator.yaml
|
||||
mode: '0644'
|
||||
@@ -1,29 +0,0 @@
|
||||
---
|
||||
- name: Reconstruct awx-operator.yaml
|
||||
include: chain-operator-files.yml
|
||||
|
||||
- name: Deploy Operator
|
||||
hosts: localhost
|
||||
vars:
|
||||
k8s_namespace: "default"
|
||||
obliterate: no
|
||||
|
||||
collections:
|
||||
- community.kubernetes
|
||||
|
||||
tasks:
|
||||
- name: Obliterate Operator
|
||||
k8s:
|
||||
state: absent
|
||||
namespace: "{{ k8s_namespace }}"
|
||||
src: "../deploy/awx-operator.yaml"
|
||||
wait: yes
|
||||
when: obliterate | bool
|
||||
|
||||
- name: Deploy Operator
|
||||
k8s:
|
||||
state: present
|
||||
namespace: "{{ k8s_namespace }}"
|
||||
apply: yes
|
||||
wait: yes
|
||||
src: "../deploy/awx-operator.yaml"
|
||||
@@ -1,3 +0,0 @@
|
||||
operator_image: quay.io/ansible/awx-operator
|
||||
operator_version: 0.7.0
|
||||
pull_policy: Always
|
||||
@@ -3,7 +3,7 @@
|
||||
hosts: localhost
|
||||
|
||||
collections:
|
||||
- community.kubernetes
|
||||
- kubernetes.core
|
||||
|
||||
tasks:
|
||||
- name: Deploy AWX
|
||||
@@ -18,9 +18,14 @@
|
||||
metadata:
|
||||
name: awx
|
||||
spec:
|
||||
tower_admin_user: test
|
||||
tower_admin_email: test@example.com
|
||||
tower_ingress_type: "{{ tower_ingress_type | default(omit) }}" # Either Route, Ingress or LoadBalancer
|
||||
tower_image: "{{ tower_image | default(omit) }}"
|
||||
development_mode: "{{ development_mode | default(omit) }}"
|
||||
tower_image_pull_policy: "{{ tower_image_pull_policy | default(omit) }}"
|
||||
admin_user: admin
|
||||
admin_email: admin@localhost
|
||||
service_type: "{{ service_type | default(omit) }}" # Either clusterIP, Loadbalancer or NodePort
|
||||
ingress_type: "{{ ingress_type | default(omit) }}" # Either none, Ingress, Route
|
||||
image: "{{ image | default(omit) }}"
|
||||
image_version: "{{ image_version | default(omit) }}"
|
||||
development_mode: "{{ development_mode | default(omit) | bool }}"
|
||||
image_pull_policy: "{{ image_pull_policy | default(omit) }}"
|
||||
# ee_images:
|
||||
# - name: test-ee
|
||||
# image: quay.io/<user>/awx-ee
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#jinja2: trim_blocks:False
|
||||
# This file is generated by Ansible. Changes will be lost.
|
||||
# Update templates under ansible/templates/
|
||||
{% include 'role.yml.j2' %}
|
||||
|
||||
{% include 'role_binding.yml.j2' %}
|
||||
|
||||
{% include 'service_account.yml.j2' %}
|
||||
|
||||
{% include 'operator.yml.j2' %}
|
||||
|
||||
{% include 'crd.yml.j2' %}
|
||||
@@ -1,276 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: awxs.awx.ansible.com
|
||||
spec:
|
||||
group: awx.ansible.com
|
||||
names:
|
||||
kind: AWX
|
||||
listKind: AWXList
|
||||
plural: awxs
|
||||
singular: awx
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Schema validation for the AWX CRD
|
||||
properties:
|
||||
spec:
|
||||
properties:
|
||||
deployment_type:
|
||||
description: Name of the deployment type
|
||||
type: string
|
||||
tower_task_privileged:
|
||||
description: If a privileged security context should be enabled
|
||||
type: boolean
|
||||
tower_admin_user:
|
||||
description: Username to use for the admin account
|
||||
type: string
|
||||
tower_hostname:
|
||||
description: The hostname of the instance
|
||||
type: string
|
||||
tower_admin_email:
|
||||
description: The admin user email
|
||||
type: string
|
||||
tower_admin_password_secret:
|
||||
description: Secret where the admin password can be found
|
||||
type: string
|
||||
tower_postgres_configuration_secret:
|
||||
description: Secret where the database configuration can be found
|
||||
type: string
|
||||
tower_old_postgres_configuration_secret:
|
||||
description: Secret where the old database configuration can be found for data migration
|
||||
type: string
|
||||
tower_secret_key_secret:
|
||||
description: Secret where the secret key can be found
|
||||
type: string
|
||||
tower_broadcast_websocket_secret:
|
||||
description: Secret where the broadcast websocket secret can be found
|
||||
type: string
|
||||
tower_extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
tower_ingress_type:
|
||||
description: The ingress type to use to reach the deployed instance
|
||||
type: string
|
||||
enum:
|
||||
- none
|
||||
- Ingress
|
||||
- ingress
|
||||
- Route
|
||||
- route
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
tower_ingress_annotations:
|
||||
description: Annotations to add to the ingress
|
||||
type: string
|
||||
tower_ingress_tls_secret:
|
||||
description: Secret where the ingress TLS secret can be found
|
||||
type: string
|
||||
tower_loadbalancer_annotations:
|
||||
description: Annotations to add to the loadbalancer
|
||||
type: string
|
||||
tower_loadbalancer_protocol:
|
||||
description: Protocol to use for the loadbalancer
|
||||
type: string
|
||||
default: http
|
||||
enum:
|
||||
- http
|
||||
- https
|
||||
tower_loadbalancer_port:
|
||||
description: Port to use for the loadbalancer
|
||||
type: integer
|
||||
default: 80
|
||||
tower_route_host:
|
||||
description: The DNS to use to points to the instance
|
||||
type: string
|
||||
tower_route_tls_termination_mechanism:
|
||||
description: The secure TLS termination mechanism to use
|
||||
type: string
|
||||
default: Edge
|
||||
enum:
|
||||
- Edge
|
||||
- edge
|
||||
- Passthrough
|
||||
- passthrough
|
||||
tower_route_tls_secret:
|
||||
description: Secret where the TLS related credentials are stored
|
||||
type: string
|
||||
tower_image:
|
||||
description: Registry path to the application container to use
|
||||
type: string
|
||||
tower_image_pull_policy:
|
||||
description: The image pull policy
|
||||
type: string
|
||||
default: IfNotPresent
|
||||
enum:
|
||||
- Always
|
||||
- always
|
||||
- Never
|
||||
- never
|
||||
- IfNotPresent
|
||||
- ifnotpresent
|
||||
tower_task_resource_requirements:
|
||||
description: Resource requirements for the task container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_web_resource_requirements:
|
||||
description: Resource requirements for the web container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_replicas:
|
||||
description: Number of instance replicas
|
||||
type: integer
|
||||
default: 1
|
||||
format: int32
|
||||
tower_garbage_collect_secrets:
|
||||
description: Whether or not to remove secrets upon instance removal
|
||||
default: false
|
||||
type: boolean
|
||||
tower_create_preload_data:
|
||||
description: Whether or not to preload data upon Tower instance creation
|
||||
default: true
|
||||
type: boolean
|
||||
tower_task_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_task_command:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_web_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_web_command:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_task_extra_env:
|
||||
type: string
|
||||
tower_web_extra_env:
|
||||
type: string
|
||||
tower_task_extra_volume_mounts:
|
||||
type: string
|
||||
tower_web_extra_volume_mounts:
|
||||
type: string
|
||||
tower_redis_image:
|
||||
description: Registry path to the redis container to use
|
||||
type: string
|
||||
tower_postgres_image:
|
||||
description: Registry path to the PostgreSQL container to use
|
||||
type: string
|
||||
tower_postgres_resource_requirements:
|
||||
description: Resource requirements for the PostgreSQL container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_postgres_storage_class:
|
||||
description: Storage class to use for the PostgreSQL PVC
|
||||
type: string
|
||||
tower_postgres_data_path:
|
||||
description: Path where the PostgreSQL data are located
|
||||
type: string
|
||||
ca_trust_bundle:
|
||||
description: Path where the trusted CA bundle is available
|
||||
type: string
|
||||
development_mode:
|
||||
description: If the deployment should be done in development mode
|
||||
type: boolean
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
towerURL:
|
||||
description: URL to access the deployed instance
|
||||
type: string
|
||||
towerAdminUser:
|
||||
description: Admin user of the deployed instance
|
||||
type: string
|
||||
towerAdminPasswordSecret:
|
||||
description: Admin password of the deployed instance
|
||||
type: string
|
||||
towerMigratedFromSecret:
|
||||
description: The secret used for migrating an old Tower.
|
||||
type: string
|
||||
towerVersion:
|
||||
description: Version of the deployed instance
|
||||
type: string
|
||||
towerImage:
|
||||
description: URL of the image used for the deployed instance
|
||||
type: string
|
||||
conditions:
|
||||
description: The resulting conditions when a Service Telemetry is instantiated
|
||||
items:
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: awx-operator
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
name: awx-operator
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: awx-operator
|
||||
spec:
|
||||
serviceAccountName: awx-operator
|
||||
containers:
|
||||
- name: awx-operator
|
||||
image: "{{ operator_image }}:{{ operator_version }}"
|
||||
imagePullPolicy: "{{ pull_policy|default('Always') }}"
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/ansible-operator/runner
|
||||
name: runner
|
||||
env:
|
||||
# Watch all namespaces (cluster-scoped).
|
||||
- name: WATCH_NAMESPACE
|
||||
value: ""
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: OPERATOR_NAME
|
||||
value: awx-operator
|
||||
- name: ANSIBLE_GATHERING
|
||||
value: explicit
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 6789
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 3
|
||||
volumes:
|
||||
- name: runner
|
||||
emptyDir: {}
|
||||
7
awx-demo.yml
Normal file
7
awx-demo.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: awx-demo
|
||||
spec:
|
||||
service_type: nodeport
|
||||
@@ -1,13 +0,0 @@
|
||||
ARG BASEIMAGE
|
||||
FROM ${BASEIMAGE}
|
||||
USER 0
|
||||
|
||||
RUN yum install -y python-devel gcc libffi-devel
|
||||
RUN pip install molecule==3.0.6 jmespath
|
||||
|
||||
ARG NAMESPACEDMAN
|
||||
ADD $NAMESPACEDMAN /namespaced.yaml
|
||||
ADD build/test-framework/ansible-test.sh /ansible-test.sh
|
||||
RUN chmod +x /ansible-test.sh
|
||||
USER 1001
|
||||
ADD . /opt/ansible/project
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
export WATCH_NAMESPACE=${TEST_NAMESPACE}
|
||||
(/usr/local/bin/entrypoint)&
|
||||
trap "kill $!" SIGINT SIGTERM EXIT
|
||||
|
||||
cd ${HOME}/project
|
||||
exec molecule test -s test-minikube
|
||||
492
config/crd/bases/awx.ansible.com_awxs.yaml
Normal file
492
config/crd/bases/awx.ansible.com_awxs.yaml
Normal file
@@ -0,0 +1,492 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: awxs.awx.ansible.com
|
||||
spec:
|
||||
group: awx.ansible.com
|
||||
names:
|
||||
kind: AWX
|
||||
listKind: AWXList
|
||||
plural: awxs
|
||||
singular: awx
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Schema validation for the AWX CRD
|
||||
properties:
|
||||
spec:
|
||||
properties:
|
||||
deployment_type:
|
||||
description: Name of the deployment type
|
||||
type: string
|
||||
kind:
|
||||
description: Kind of the deployment type
|
||||
type: string
|
||||
api_version:
|
||||
description: apiVersion of the deployment type
|
||||
type: string
|
||||
task_privileged:
|
||||
description: If a privileged security context should be enabled
|
||||
type: boolean
|
||||
default: false
|
||||
admin_user:
|
||||
description: Username to use for the admin account
|
||||
type: string
|
||||
default: admin
|
||||
hostname:
|
||||
description: The hostname of the instance
|
||||
type: string
|
||||
admin_email:
|
||||
description: The admin user email
|
||||
type: string
|
||||
admin_password_secret:
|
||||
description: Secret where the admin password can be found
|
||||
type: string
|
||||
postgres_configuration_secret:
|
||||
description: Secret where the database configuration can be found
|
||||
type: string
|
||||
old_postgres_configuration_secret:
|
||||
description: Secret where the old database configuration can be found for data migration
|
||||
type: string
|
||||
postgres_label_selector:
|
||||
description: Label selector used to identify postgres pod for data migration
|
||||
type: string
|
||||
secret_key_secret:
|
||||
description: Secret where the secret key can be found
|
||||
type: string
|
||||
broadcast_websocket_secret:
|
||||
description: Secret where the broadcast websocket secret can be found
|
||||
type: string
|
||||
extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
service_annotations:
|
||||
description: Annotations to add to the service
|
||||
type: string
|
||||
service_type:
|
||||
description: The service type to be used on the deployed instance
|
||||
type: string
|
||||
enum:
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
- ClusterIP
|
||||
- clusterip
|
||||
- NodePort
|
||||
- nodeport
|
||||
ingress_type:
|
||||
description: The ingress type to use to reach the deployed instance
|
||||
type: string
|
||||
enum:
|
||||
- none
|
||||
- Ingress
|
||||
- ingress
|
||||
- Route
|
||||
- route
|
||||
ingress_path:
|
||||
description: The ingress path used to reach the deployed service
|
||||
type: string
|
||||
ingress_path_type:
|
||||
description: The ingress path type for the deployed service
|
||||
type: string
|
||||
ingress_annotations:
|
||||
description: Annotations to add to the Ingress Controller
|
||||
type: string
|
||||
ingress_tls_secret:
|
||||
description: Secret where the Ingress TLS secret can be found
|
||||
type: string
|
||||
loadbalancer_protocol:
|
||||
description: Protocol to use for the loadbalancer
|
||||
type: string
|
||||
default: http
|
||||
enum:
|
||||
- http
|
||||
- https
|
||||
loadbalancer_port:
|
||||
description: Port to use for the loadbalancer
|
||||
type: integer
|
||||
default: 80
|
||||
route_host:
|
||||
description: The DNS to use to points to the instance
|
||||
type: string
|
||||
route_tls_termination_mechanism:
|
||||
description: The secure TLS termination mechanism to use
|
||||
type: string
|
||||
default: Edge
|
||||
enum:
|
||||
- Edge
|
||||
- edge
|
||||
- Passthrough
|
||||
- passthrough
|
||||
route_tls_secret:
|
||||
description: Secret where the TLS related credentials are stored
|
||||
type: string
|
||||
nodeport_port:
|
||||
description: Port to use for the nodeport
|
||||
type: integer
|
||||
default: 30080
|
||||
node_selector:
|
||||
description: nodeSelector for the pods
|
||||
type: string
|
||||
topology_spread_constraints:
|
||||
description: topology rule(s) for the pods
|
||||
type: string
|
||||
service_labels:
|
||||
description: Additional labels to apply to the service
|
||||
type: string
|
||||
annotations:
|
||||
description: annotations for the pods
|
||||
type: string
|
||||
tolerations:
|
||||
description: node tolerations for the pods
|
||||
type: string
|
||||
image:
|
||||
description: Registry path to the application container to use
|
||||
type: string
|
||||
image_version:
|
||||
description: Application container image version to use
|
||||
type: string
|
||||
ee_images:
|
||||
description: Registry path to the Execution Environment container to use
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
image:
|
||||
type: string
|
||||
control_plane_ee_image:
|
||||
description: Registry path to the Execution Environment container image to use on control plane pods
|
||||
type: string
|
||||
ee_pull_credentials_secret:
|
||||
description: Secret where pull credentials for registered ees can be found
|
||||
type: string
|
||||
image_pull_policy:
|
||||
description: The image pull policy
|
||||
type: string
|
||||
default: IfNotPresent
|
||||
enum:
|
||||
- Always
|
||||
- always
|
||||
- Never
|
||||
- never
|
||||
- IfNotPresent
|
||||
- ifnotpresent
|
||||
image_pull_secret:
|
||||
description: The image pull secret
|
||||
type: string
|
||||
task_resource_requirements:
|
||||
description: Resource requirements for the task container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
web_resource_requirements:
|
||||
description: Resource requirements for the web container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
ee_resource_requirements:
|
||||
description: Resource requirements for the ee container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
postgres_init_container_resource_requirements:
|
||||
description: Resource requirements for the postgres init container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
service_account_annotations:
|
||||
description: ServiceAccount annotations
|
||||
type: string
|
||||
replicas:
|
||||
description: Number of instance replicas
|
||||
type: integer
|
||||
default: 1
|
||||
format: int32
|
||||
garbage_collect_secrets:
|
||||
description: Whether or not to remove secrets upon instance removal
|
||||
default: false
|
||||
type: boolean
|
||||
create_preload_data:
|
||||
description: Whether or not to preload data upon instance creation
|
||||
default: true
|
||||
type: boolean
|
||||
task_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
task_command:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
web_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
web_command:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
task_extra_env:
|
||||
type: string
|
||||
web_extra_env:
|
||||
type: string
|
||||
ee_extra_env:
|
||||
type: string
|
||||
ee_extra_volume_mounts:
|
||||
description: Specify volume mounts to be added to Execution container
|
||||
type: string
|
||||
task_extra_volume_mounts:
|
||||
description: Specify volume mounts to be added to Task container
|
||||
type: string
|
||||
web_extra_volume_mounts:
|
||||
description: Specify volume mounts to be added to the Web container
|
||||
type: string
|
||||
redis_image:
|
||||
description: Registry path to the redis container to use
|
||||
type: string
|
||||
redis_image_version:
|
||||
description: Redis container image version to use
|
||||
type: string
|
||||
redis_capabilities:
|
||||
description: Redis container capabilities
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
init_container_image:
|
||||
description: Registry path to the init container to use
|
||||
type: string
|
||||
init_container_image_version:
|
||||
description: Init container image version to use
|
||||
type: string
|
||||
init_container_extra_commands:
|
||||
description: Extra commands for the init container
|
||||
type: string
|
||||
init_container_extra_volume_mounts:
|
||||
description: Specify volume mounts to be added to the init container
|
||||
type: string
|
||||
postgres_image:
|
||||
description: Registry path to the PostgreSQL container to use
|
||||
type: string
|
||||
postgres_image_version:
|
||||
description: PostgreSQL container image version to use
|
||||
type: string
|
||||
postgres_selector:
|
||||
description: nodeSelector for the Postgres pods
|
||||
type: string
|
||||
postgres_tolerations:
|
||||
description: node tolerations for the Postgres pods
|
||||
type: string
|
||||
postgres_storage_requirements:
|
||||
description: Storage requirements for the PostgreSQL container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
postgres_resource_requirements:
|
||||
description: Resource requirements for the PostgreSQL container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
postgres_storage_class:
|
||||
description: Storage class to use for the PostgreSQL PVC
|
||||
type: string
|
||||
postgres_data_path:
|
||||
description: Path where the PostgreSQL data are located
|
||||
type: string
|
||||
postgres_extra_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
ca_trust_bundle:
|
||||
description: Path where the trusted CA bundle is available
|
||||
type: string
|
||||
development_mode:
|
||||
description: If the deployment should be done in development mode
|
||||
type: boolean
|
||||
ldap_cacert_secret:
|
||||
description: Secret where can be found the LDAP trusted Certificate Authority Bundle
|
||||
type: string
|
||||
bundle_cacert_secret:
|
||||
description: Secret where can be found the trusted Certificate Authority Bundle
|
||||
type: string
|
||||
projects_persistence:
|
||||
description: Whether or not the /var/lib/projects directory will be persistent
|
||||
default: false
|
||||
type: boolean
|
||||
projects_use_existing_claim:
|
||||
description: Using existing PersistentVolumeClaim
|
||||
type: string
|
||||
enum:
|
||||
- _Yes_
|
||||
- _No_
|
||||
projects_existing_claim:
|
||||
description: PersistentVolumeClaim to mount /var/lib/projects directory
|
||||
type: string
|
||||
projects_storage_class:
|
||||
description: Storage class for the /var/lib/projects PersistentVolumeClaim
|
||||
type: string
|
||||
projects_storage_size:
|
||||
description: Size for the /var/lib/projects PersistentVolumeClaim
|
||||
default: 8Gi
|
||||
type: string
|
||||
projects_storage_access_mode:
|
||||
description: AccessMode for the /var/lib/projects PersistentVolumeClaim
|
||||
default: ReadWriteMany
|
||||
type: string
|
||||
extra_settings:
|
||||
description: Extra settings to specify for the API
|
||||
items:
|
||||
properties:
|
||||
setting:
|
||||
type: string
|
||||
value:
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
type: array
|
||||
security_context_settings:
|
||||
description: Key/values that will be set under the pod-level securityContext field
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
URL:
|
||||
description: URL to access the deployed instance
|
||||
type: string
|
||||
adminUser:
|
||||
description: Admin user of the deployed instance
|
||||
type: string
|
||||
adminPasswordSecret:
|
||||
description: Admin password secret name of the deployed instance
|
||||
type: string
|
||||
postgresConfigurationSecret:
|
||||
description: Postgres Configuration secret name of the deployed instance
|
||||
type: string
|
||||
broadcastWebsocketSecret:
|
||||
description: Broadcast websocket secret name of the deployed instance
|
||||
type: string
|
||||
secretKeySecret:
|
||||
description: Secret key secret name of the deployed instance
|
||||
type: string
|
||||
migratedFromSecret:
|
||||
description: The secret used for migrating an old instance.
|
||||
type: string
|
||||
version:
|
||||
description: Version of the deployed instance
|
||||
type: string
|
||||
image:
|
||||
description: URL of the image used for the deployed instance
|
||||
type: string
|
||||
conditions:
|
||||
description: The resulting conditions when a Service Telemetry is instantiated
|
||||
items:
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
77
config/crd/bases/awxbackup.ansible.com_awxbackups.yaml
Normal file
77
config/crd/bases/awxbackup.ansible.com_awxbackups.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: awxbackups.awx.ansible.com
|
||||
spec:
|
||||
group: awx.ansible.com
|
||||
names:
|
||||
kind: AWXBackup
|
||||
listKind: AWXBackupList
|
||||
plural: awxbackups
|
||||
singular: awxbackup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
description: Schema validation for the AWXBackup CRD
|
||||
properties:
|
||||
spec:
|
||||
type: object
|
||||
required:
|
||||
- deployment_name
|
||||
properties:
|
||||
deployment_name:
|
||||
description: Name of the deployment to be backed up
|
||||
type: string
|
||||
backup_pvc:
|
||||
description: Name of the PVC to be used for storing the backup
|
||||
type: string
|
||||
backup_pvc_namespace:
|
||||
description: Namespace the PVC is in
|
||||
type: string
|
||||
backup_storage_requirements:
|
||||
description: Storage requirements for the PostgreSQL container
|
||||
type: string
|
||||
backup_storage_class:
|
||||
description: Storage class to use when creating PVC for backup
|
||||
type: string
|
||||
postgres_label_selector:
|
||||
description: Label selector used to identify postgres pod for backing up data
|
||||
type: string
|
||||
postgres_image:
|
||||
description: Registry path to the PostgreSQL container to use
|
||||
type: string
|
||||
postgres_image_version:
|
||||
description: PostgreSQL container image version to use
|
||||
type: string
|
||||
status:
|
||||
type: object
|
||||
properties:
|
||||
conditions:
|
||||
description: The resulting conditions when a Service Telemetry is instantiated
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
backupDirectory:
|
||||
description: Backup directory name on the specified pvc
|
||||
type: string
|
||||
backupClaim:
|
||||
description: Backup persistent volume claim
|
||||
type: string
|
||||
78
config/crd/bases/awxrestore.ansible.com_awxrestores.yaml
Normal file
78
config/crd/bases/awxrestore.ansible.com_awxrestores.yaml
Normal file
@@ -0,0 +1,78 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: awxrestores.awx.ansible.com
|
||||
spec:
|
||||
group: awx.ansible.com
|
||||
names:
|
||||
kind: AWXRestore
|
||||
listKind: AWXRestoreList
|
||||
plural: awxrestores
|
||||
singular: awxrestore
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
description: Schema validation for the AWXRestore CRD
|
||||
properties:
|
||||
spec:
|
||||
type: object
|
||||
properties:
|
||||
backup_source:
|
||||
description: Backup source
|
||||
type: string
|
||||
enum:
|
||||
- CR
|
||||
- PVC
|
||||
deployment_name:
|
||||
description: Name of the deployment to be restored to
|
||||
type: string
|
||||
backup_name:
|
||||
description: AWXBackup object name
|
||||
type: string
|
||||
backup_pvc:
|
||||
description: Name of the PVC to be restored from, set as a status found on the awxbackup object (backupClaim)
|
||||
type: string
|
||||
backup_pvc_namespace:
|
||||
description: Namespace the PVC is in
|
||||
type: string
|
||||
backup_dir:
|
||||
description: Backup directory name, set as a status found on the awxbackup object (backupDirectory)
|
||||
type: string
|
||||
postgres_label_selector:
|
||||
description: Label selector used to identify postgres pod for backing up data
|
||||
type: string
|
||||
postgres_image:
|
||||
description: Registry path to the PostgreSQL container to use
|
||||
type: string
|
||||
postgres_image_version:
|
||||
description: PostgreSQL container image version to use
|
||||
type: string
|
||||
status:
|
||||
type: object
|
||||
properties:
|
||||
conditions:
|
||||
description: The resulting conditions when a Service Telemetry is instantiated
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
restoreComplete:
|
||||
description: Restore process complete
|
||||
type: boolean
|
||||
9
config/crd/kustomization.yaml
Normal file
9
config/crd/kustomization.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
# This kustomization.yaml is not intended to be run by itself,
|
||||
# since it depends on service name and namespace that are out of this kustomize package.
|
||||
# It should be run by config/default
|
||||
resources:
|
||||
- bases/awx.ansible.com_awxs.yaml
|
||||
- bases/awxbackup.ansible.com_awxbackups.yaml
|
||||
- bases/awxrestore.ansible.com_awxrestores.yaml
|
||||
# +kubebuilder:scaffold:crdkustomizeresource
|
||||
24
config/default/kustomization.yaml
Normal file
24
config/default/kustomization.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
# Adds namespace to all resources.
|
||||
namespace: awx
|
||||
# Value of this field is prepended to the
|
||||
# names of all resources, e.g. a deployment named
|
||||
# "wordpress" becomes "alices-wordpress".
|
||||
# Note that it should also match with the prefix (text before '-') of the namespace
|
||||
# field above.
|
||||
namePrefix: awx-operator-
|
||||
# Labels to add to all resources and selectors.
|
||||
# commonLabels:
|
||||
# someName: someValue
|
||||
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
|
||||
# - ../prometheus
|
||||
# Protect the /metrics endpoint by putting it behind auth.
|
||||
# If you want your controller-manager to expose the /metrics
|
||||
# endpoint w/o any authn/z, please comment the following line.
|
||||
patchesStrategicMerge:
|
||||
- manager_auth_proxy_patch.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../crd
|
||||
- ../rbac
|
||||
- ../manager
|
||||
29
config/default/manager_auth_proxy_patch.yaml
Normal file
29
config/default/manager_auth_proxy_patch.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
# This patch inject a sidecar container which is a HTTP proxy for the
|
||||
# controller manager, it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: kube-rbac-proxy
|
||||
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
|
||||
args:
|
||||
- "--secure-listen-address=0.0.0.0:8443"
|
||||
- "--upstream=http://127.0.0.1:8080/"
|
||||
- "--logtostderr=true"
|
||||
- "--v=10"
|
||||
ports:
|
||||
- containerPort: 8443
|
||||
protocol: TCP
|
||||
name: https
|
||||
- name: awx-manager
|
||||
args:
|
||||
- "--health-probe-bind-address=:6789"
|
||||
- "--metrics-bind-address=127.0.0.1:8080"
|
||||
- "--leader-elect"
|
||||
- "--leader-election-id=awx-operator"
|
||||
21
config/default/manager_config_patch.yaml
Normal file
21
config/default/manager_config_patch.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: awx-manager
|
||||
args:
|
||||
- "--config=controller_manager_config.yaml"
|
||||
volumeMounts:
|
||||
- name: awx-manager-config
|
||||
mountPath: /controller_manager_config.yaml
|
||||
subPath: controller_manager_config.yaml
|
||||
volumes:
|
||||
- name: awx-manager-config
|
||||
configMap:
|
||||
name: awx-manager-config
|
||||
10
config/manager/controller_manager_config.yaml
Normal file
10
config/manager/controller_manager_config.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: controller-runtime.sigs.k8s.io/v1beta1
|
||||
kind: ControllerManagerConfig
|
||||
health:
|
||||
healthProbeBindAddress: :6789
|
||||
metrics:
|
||||
bindAddress: 127.0.0.1:8080
|
||||
leaderElection:
|
||||
leaderElect: true
|
||||
resourceName: 811c9dc5.ansible.com
|
||||
14
config/manager/kustomization.yaml
Normal file
14
config/manager/kustomization.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
resources:
|
||||
- manager.yaml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
configMapGenerator:
|
||||
- files:
|
||||
- controller_manager_config.yaml
|
||||
name: awx-manager-config
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
images:
|
||||
- name: controller
|
||||
newName: quay.io/ansible/awx-operator
|
||||
newTag: latest
|
||||
58
config/manager/manager.yaml
Normal file
58
config/manager/manager.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: controller-manager
|
||||
name: system
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
labels:
|
||||
control-plane: controller-manager
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: controller-manager
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: controller-manager
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
containers:
|
||||
- args:
|
||||
- --leader-elect
|
||||
- --leader-election-id=awx-operator
|
||||
image: controller:latest
|
||||
name: awx-manager
|
||||
env:
|
||||
- name: ANSIBLE_GATHERING
|
||||
value: explicit
|
||||
- name: ANSIBLE_DEBUG_LOGS
|
||||
value: 'false'
|
||||
- name: WATCH_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 6789
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 20
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: 6789
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
serviceAccountName: controller-manager
|
||||
terminationGracePeriodSeconds: 10
|
||||
@@ -0,0 +1,40 @@
|
||||
apiVersion: operators.coreos.com/v1beta1
|
||||
kind: ClusterServiceVersion
|
||||
metadata:
|
||||
annotations:
|
||||
alm-examples: '[]'
|
||||
capabilities: Basic Install
|
||||
name: awx-operator.v0.0.0
|
||||
namespace: placeholder
|
||||
spec:
|
||||
apiservicedefinitions: {}
|
||||
customresourcedefinitions: {}
|
||||
description: An operator for the AWX Project
|
||||
displayName: AWX
|
||||
icon:
|
||||
- base64data: ""
|
||||
mediatype: ""
|
||||
install:
|
||||
spec:
|
||||
deployments: null
|
||||
strategy: ""
|
||||
installModes:
|
||||
- supported: true
|
||||
type: OwnNamespace
|
||||
- supported: true
|
||||
type: SingleNamespace
|
||||
- supported: true
|
||||
type: MultiNamespace
|
||||
- supported: false
|
||||
type: AllNamespaces
|
||||
keywords:
|
||||
- automation
|
||||
- ansible
|
||||
links:
|
||||
- name: Awx Operator
|
||||
url: https://awx-operator.domain
|
||||
maturity: alpha
|
||||
provider:
|
||||
name: Ansible
|
||||
url: github.com/ansible/awx-operator
|
||||
version: 0.0.0
|
||||
24
config/manifests/bases/inject-csv-config.py
Normal file
24
config/manifests/bases/inject-csv-config.py
Normal file
@@ -0,0 +1,24 @@
|
||||
'''
|
||||
After generating the CSV file, inject custom configuration such as
|
||||
OLM parameters, relatedImages, etc.
|
||||
'''
|
||||
|
||||
import yaml
|
||||
|
||||
csv_path = "../../../bundle/manifests/awx-operator.clusterserviceversion.yaml"
|
||||
existing_csv = open(csv_path, 'r')
|
||||
csv = yaml.safe_load(existing_csv)
|
||||
|
||||
|
||||
raw_olm_params = open("olm-parameters.yaml")
|
||||
olm_params = yaml.safe_load(raw_olm_params)
|
||||
|
||||
# Inject OLM parameters for Customer Resource Objects
|
||||
csv['spec']['customresourcedefinitions']['owned'] = olm_params
|
||||
|
||||
csv['metadata']['annotations']['alm-examples'] = ''
|
||||
|
||||
file_content = yaml.safe_dump(csv, default_flow_style=False, explicit_start=True)
|
||||
|
||||
with open(csv_path, 'w') as f:
|
||||
f.write(file_content)
|
||||
612
config/manifests/bases/olm-parameters.yaml
Normal file
612
config/manifests/bases/olm-parameters.yaml
Normal file
@@ -0,0 +1,612 @@
|
||||
---
|
||||
- displayName: AWX Backup
|
||||
description: Back up a deployment of the awx, including jobs, inventories, and credentials
|
||||
kind: AWXBackup
|
||||
name: awxbackups.awx.ansible.com
|
||||
version: v1beta1
|
||||
specDescriptors:
|
||||
- displayName: Deployment name
|
||||
path: deployment_name
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Backup persistent volume claim
|
||||
path: backup_pvc
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Backup persistent volume claim namespace
|
||||
path: backup_pvc_namespace
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Backup PVC storage requirements
|
||||
path: backup_storage_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Backup PVC storage class
|
||||
path: backup_storage_class
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Database backup label selector
|
||||
path: postgres_label_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image
|
||||
path: postgres_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image Version
|
||||
path: postgres_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
statusDescriptors:
|
||||
- description: The persistent volume claim name used during backup
|
||||
displayName: Backup claim
|
||||
path: backupClaim
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: The directory data is backed up to on the PVC
|
||||
displayName: Backup directory
|
||||
path: backupDirectory
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: AWX Restore
|
||||
description: Restore a previous awx deployment into the namespace
|
||||
kind: AWXRestore
|
||||
name: awxrestores.awx.ansible.com
|
||||
version: v1beta1
|
||||
specDescriptors:
|
||||
- displayName: Backup source to restore ?
|
||||
path: backup_source
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:CR
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:PVC
|
||||
- displayName: Backup name
|
||||
path: backup_name
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:backup_source:CR
|
||||
- displayName: Name of newly restored deployment
|
||||
path: deployment_name
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Backup persistent volume claim
|
||||
path: backup_pvc
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:backup_source:PVC
|
||||
- displayName: Backup namespace
|
||||
path: backup_pvc_namespace
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Backup directory in the persistent volume claim
|
||||
path: backup_dir
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:backup_source:PVC
|
||||
- displayName: Database restore label selector
|
||||
path: postgres_label_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image
|
||||
path: postgres_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image Version
|
||||
path: postgres_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
statusDescriptors:
|
||||
- description: The state of the restore
|
||||
displayName: Restore status
|
||||
path: restoreComplete
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Deploy a new instance of AWX
|
||||
displayName: AWX
|
||||
kind: AWX
|
||||
name: awxs.awx.ansible.com
|
||||
version: v1beta1
|
||||
specDescriptors:
|
||||
- displayName: Hostname
|
||||
path: hostname
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Admin account username
|
||||
path: admin_user
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Admin email address
|
||||
path: admin_email
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Admin password secret
|
||||
path: admin_password_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Database configuration secret
|
||||
path: postgres_configuration_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Old Database configuration secret
|
||||
path: old_postgres_configuration_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Secret key secret
|
||||
path: secret_key_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Broadcast Websocket Secret
|
||||
path: broadcast_websocket_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Service Account Annotations
|
||||
path: service_account_annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Tower Service Type
|
||||
path: service_type
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:ClusterIP
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:LoadBalancer
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:NodePort
|
||||
- displayName: Tower Ingress Type
|
||||
path: ingress_type
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:none
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Ingress
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Route
|
||||
- displayName: Ingress Path
|
||||
path: ingress_path
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Ingress
|
||||
- displayName: Ingress Path Type
|
||||
path: ingress_path_type
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Ingress
|
||||
- displayName: Tower Ingress Annotations
|
||||
path: ingress_annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Ingress
|
||||
- displayName: Tower Ingress TLS Secret
|
||||
path: ingress_tls_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Ingress
|
||||
- displayName: Tower LoadBalancer Annotations
|
||||
path: service_annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer
|
||||
- displayName: Tower LoadBalancer Protocol
|
||||
path: loadbalancer_protocol
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:http
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:https
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer
|
||||
- displayName: Tower LoadBalancer Port
|
||||
path: loadbalancer_port
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:number
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:service_type:LoadBalancer
|
||||
- displayName: Route DNS host
|
||||
path: route_host
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Route
|
||||
- displayName: Route TLS termination mechanism
|
||||
path: route_tls_termination_mechanism
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Edge
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Passthrough
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Route
|
||||
- displayName: Route TLS credential secret
|
||||
path: route_tls_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:ingress_type:Route
|
||||
- displayName: Image Pull Policy
|
||||
path: image_pull_policy
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:imagePullPolicy
|
||||
- displayName: Image Pull Secret
|
||||
path: image_pull_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Web container resource requirements
|
||||
path: web_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: Task container resource requirements
|
||||
path: task_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: EE Control Plane container resource requirements
|
||||
path: ee_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: PostgreSQL init container resource requirements (when using a managed instance)
|
||||
path: postgres_init_container_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: PostgreSQL container resource requirements (when using a managed instance)
|
||||
path: postgres_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: PostgreSQL container storage requirements (when using a managed instance)
|
||||
path: postgres_storage_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: Replicas
|
||||
path: replicas
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:number
|
||||
- displayName: Remove used secrets on instance removal ?
|
||||
path: garbage_collect_secrets
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Preload instance with data upon creation ?
|
||||
path: create_preload_data
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Deploy the instance in development mode ?
|
||||
path: development_mode
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Should the task container deployed with privileged level ?
|
||||
path: task_privileged
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Deployment Type
|
||||
path: deployment_type
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Deployment Kind
|
||||
path: kind
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Deployment apiVersion
|
||||
path: api_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Image
|
||||
path: image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Image Version
|
||||
path: image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Redis Image
|
||||
path: redis_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Redis Image Version
|
||||
path: redis_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Redis Capabilities
|
||||
path: redis_capabilities
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image
|
||||
path: postgres_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: PostgreSQL Image Version
|
||||
path: postgres_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Selector
|
||||
path: postgres_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Label Selector
|
||||
path: postgres_label_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Tolerations
|
||||
path: postgres_tolerations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Storage Class
|
||||
path: postgres_storage_class
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Datapath
|
||||
path: postgres_data_path
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Postgres Extra Arguments
|
||||
path: postgres_extra_args
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Certificate Authorirty Trust Bundle
|
||||
path: ca_trust_bundle
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: LDAP Certificate Authority Trust Bundle
|
||||
path: ldap_cacert_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Task Args
|
||||
path: task_args
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Enable persistence for /var/lib/projects directory?
|
||||
path: projects_persistence
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Use existing Persistent Claim?
|
||||
path: projects_use_existing_claim
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:_Yes_
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:_No_
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_persistence:true
|
||||
- displayName: Projects Existing Persistent Claim
|
||||
path: projects_existing_claim
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_use_existing_claim:_Yes_
|
||||
- urn:alm:descriptor:io.kubernetes:PersistentVolumeClaim
|
||||
- description: Projects Storage Class Name. If not present, the default storage
|
||||
class will be used.
|
||||
displayName: Projects Storage Class Name
|
||||
path: projects_storage_class
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_use_existing_claim:_No_
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Projects Storage Size
|
||||
displayName: Projects Storage Size
|
||||
path: projects_storage_size
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_use_existing_claim:_No_
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Projects Storage Access Mode
|
||||
displayName: Projects Storage Access Mode
|
||||
path: projects_storage_access_mode
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:projects_use_existing_claim:_No_
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Task Command
|
||||
path: task_command
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Environment variables to be added to Task container
|
||||
displayName: Task Extra Env
|
||||
path: task_extra_env
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify volume mounts to be added to Execution container
|
||||
displayName: EE Extra Volume Mounts
|
||||
path: ee_extra_volume_mounts
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Registry path to the Execution Environment container to use
|
||||
displayName: EE Images
|
||||
path: ee_images
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Environment variables to be added to EE container
|
||||
displayName: EE Extra Env
|
||||
path: ee_extra_env
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Registry path to the Execution Environment container to use on
|
||||
control plane pods
|
||||
displayName: Control Plane EE Image
|
||||
path: control_plane_ee_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: EE Images Pull Credentials Secret
|
||||
displayName: EE Images Pull Credentials Secret
|
||||
path: ee_pull_credentials_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- description: Specify volume mounts to be added to Task container
|
||||
displayName: Task Extra Volume Mounts
|
||||
path: task_extra_volume_mounts
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Web Args
|
||||
path: web_args
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Web Command
|
||||
path: web_command
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Environment variables to be added to Web container
|
||||
displayName: Web Extra Env
|
||||
path: web_extra_env
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify volume mounts to be added to Web container
|
||||
displayName: Web Extra Volume Mounts
|
||||
path: web_extra_volume_mounts
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify extra volumes to add to the application pod
|
||||
displayName: Extra Volumes
|
||||
path: extra_volumes
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Node Selector
|
||||
path: node_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Topology Spread Constraints
|
||||
path: topology_spread_constraints
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Service Labels
|
||||
path: service_labels
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Annotations
|
||||
path: annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Tolerations
|
||||
path: tolerations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: API Extra Settings
|
||||
path: extra_settings
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Security Context Settings
|
||||
path: security_context_settings
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Registry path to the init container to use
|
||||
displayName: Init Container Image
|
||||
path: init_container_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Init container image version to use
|
||||
displayName: Init Container Image Version
|
||||
path: init_container_image_version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify Extra commands for the Init container
|
||||
displayName: Init Container Extra Commands
|
||||
path: init_container_extra_commands
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Specify volume mounts to be added to Init container
|
||||
displayName: Init Container Extra Volume Mounts
|
||||
path: init_container_extra_volume_mounts
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- description: Secret where can be found the trusted Certificate Authority Bundle
|
||||
path: bundle_cacert_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Nodeport Port
|
||||
path: nodeport_port
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
statusDescriptors:
|
||||
- description: Route to access the instance deployed
|
||||
displayName: URL
|
||||
path: URL
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:org.w3:link
|
||||
- description: Admin user for the instance deployed
|
||||
displayName: Admin User
|
||||
path: adminUser
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Admin password for the instance deployed
|
||||
displayName: Admin Password
|
||||
path: adminPasswordSecret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- description: Version of the instance deployed
|
||||
displayName: Version
|
||||
path: version
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Image of the instance deployed
|
||||
displayName: Image
|
||||
path: image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
8
config/manifests/kustomization.yaml
Normal file
8
config/manifests/kustomization.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# These resources constitute the fully configured set of manifests
|
||||
# used to generate the 'manifests/' directory in a bundle.
|
||||
resources:
|
||||
- bases/awx-operator.clusterserviceversion.yaml
|
||||
- ../default
|
||||
- ../samples
|
||||
- ../scorecard
|
||||
3
config/prometheus/kustomization.yaml
Normal file
3
config/prometheus/kustomization.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
resources:
|
||||
- monitor.yaml
|
||||
20
config/prometheus/monitor.yaml
Normal file
20
config/prometheus/monitor.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
# Prometheus Monitor Service (Metrics)
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: controller-manager
|
||||
name: controller-manager-metrics-monitor
|
||||
namespace: system
|
||||
spec:
|
||||
endpoints:
|
||||
- path: /metrics
|
||||
port: https
|
||||
scheme: https
|
||||
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
tlsConfig:
|
||||
insecureSkipVerify: true
|
||||
selector:
|
||||
matchLabels:
|
||||
control-plane: controller-manager
|
||||
10
config/rbac/auth_proxy_client_clusterrole.yaml
Normal file
10
config/rbac/auth_proxy_client_clusterrole.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: metrics-reader
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- "/metrics"
|
||||
verbs:
|
||||
- get
|
||||
18
config/rbac/auth_proxy_role.yaml
Normal file
18
config/rbac/auth_proxy_role.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: proxy-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- authorization.k8s.io
|
||||
resources:
|
||||
- subjectaccessreviews
|
||||
verbs:
|
||||
- create
|
||||
@@ -1,13 +1,13 @@
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: awx-operator
|
||||
name: proxy-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: proxy-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: awx-operator
|
||||
namespace: default
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: awx-operator
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
16
config/rbac/auth_proxy_service.yaml
Normal file
16
config/rbac/auth_proxy_service.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
control-plane: controller-manager
|
||||
name: controller-manager-metrics-service
|
||||
namespace: system
|
||||
spec:
|
||||
ports:
|
||||
- name: https
|
||||
port: 8443
|
||||
protocol: TCP
|
||||
targetPort: https
|
||||
selector:
|
||||
control-plane: controller-manager
|
||||
25
config/rbac/awx_editor_role.yaml
Normal file
25
config/rbac/awx_editor_role.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
# permissions for end users to edit awxs.
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: awx-editor-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- awx.ansible.com
|
||||
resources:
|
||||
- awxs
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- awx.ansible.com
|
||||
resources:
|
||||
- awxs/status
|
||||
verbs:
|
||||
- get
|
||||
21
config/rbac/awx_viewer_role.yaml
Normal file
21
config/rbac/awx_viewer_role.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
# permissions for end users to view awxs.
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: awx-viewer-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- awx.ansible.com
|
||||
resources:
|
||||
- awxs
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- awx.ansible.com
|
||||
resources:
|
||||
- awxs/status
|
||||
verbs:
|
||||
- get
|
||||
19
config/rbac/kustomization.yaml
Normal file
19
config/rbac/kustomization.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
resources:
|
||||
# All RBAC will be applied under this service account in
|
||||
# the deployment namespace. You may comment out this resource
|
||||
# if your manager will use a service account that exists at
|
||||
# runtime. Be sure to update RoleBinding and ClusterRoleBinding
|
||||
# subjects if changing service account names.
|
||||
- service_account.yaml
|
||||
- role.yaml
|
||||
- role_binding.yaml
|
||||
- leader_election_role.yaml
|
||||
- leader_election_role_binding.yaml
|
||||
# Comment the following 4 lines if you want to disable
|
||||
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
|
||||
# which protects your /metrics endpoint.
|
||||
- auth_proxy_service.yaml
|
||||
- auth_proxy_role.yaml
|
||||
- auth_proxy_role_binding.yaml
|
||||
- auth_proxy_client_clusterrole.yaml
|
||||
38
config/rbac/leader_election_role.yaml
Normal file
38
config/rbac/leader_election_role.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
# permissions to do leader election.
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: leader-election-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
13
config/rbac/leader_election_role_binding.yaml
Normal file
13
config/rbac/leader_election_role_binding.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: leader-election-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: leader-election-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
kind: Role
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: awx-operator
|
||||
name: awx-manager-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- route.openshift.io
|
||||
@@ -11,7 +11,13 @@ rules:
|
||||
- routes
|
||||
- routes/custom-host
|
||||
verbs:
|
||||
- '*'
|
||||
- get
|
||||
- list
|
||||
- create
|
||||
- delete
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "rbac.authorization.k8s.io"
|
||||
@@ -28,10 +34,16 @@ rules:
|
||||
- roles
|
||||
- rolebindings
|
||||
verbs:
|
||||
- '*'
|
||||
- get
|
||||
- list
|
||||
- create
|
||||
- delete
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
- extensions
|
||||
- networking.k8s.io
|
||||
resources:
|
||||
- deployments
|
||||
- daemonsets
|
||||
@@ -39,7 +51,13 @@ rules:
|
||||
- statefulsets
|
||||
- ingresses
|
||||
verbs:
|
||||
- '*'
|
||||
- get
|
||||
- list
|
||||
- create
|
||||
- delete
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- monitoring.coreos.com
|
||||
resources:
|
||||
@@ -59,12 +77,15 @@ rules:
|
||||
- apps
|
||||
resources:
|
||||
- deployments/scale
|
||||
- statefulsets/scale
|
||||
verbs:
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/exec
|
||||
- pods/attach
|
||||
- pods/log # log & attach rules needed to be able to grant them to AWX service account
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
@@ -74,9 +95,12 @@ rules:
|
||||
- replicasets
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
- apiGroups:
|
||||
- awx.ansible.com
|
||||
resources:
|
||||
- '*'
|
||||
- awxbackups
|
||||
- awxrestores
|
||||
verbs:
|
||||
- '*'
|
||||
12
config/rbac/role_binding.yaml
Normal file
12
config/rbac/role_binding.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: awx-manager-rolebinding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: awx-manager-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: controller-manager
|
||||
@@ -2,5 +2,5 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: awx-operator
|
||||
namespace: default
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
18
config/samples/awx_v1beta1_awx.yaml
Normal file
18
config/samples/awx_v1beta1_awx.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: example-awx
|
||||
spec:
|
||||
web_resource_requirements:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 128M
|
||||
task_resource_requirements:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 128M
|
||||
ee_resource_requirements:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 64M
|
||||
5
config/samples/kustomization.yaml
Normal file
5
config/samples/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
## Append samples you want in your CSV to this file as resources ##
|
||||
resources:
|
||||
- awx_v1beta1_awx.yaml
|
||||
# +kubebuilder:scaffold:manifestskustomizesamples
|
||||
8
config/scorecard/bases/config.yaml
Normal file
8
config/scorecard/bases/config.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
apiVersion: scorecard.operatorframework.io/v1alpha3
|
||||
kind: Configuration
|
||||
metadata:
|
||||
name: config
|
||||
stages:
|
||||
- parallel: true
|
||||
tests: []
|
||||
17
config/scorecard/kustomization.yaml
Normal file
17
config/scorecard/kustomization.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
resources:
|
||||
- bases/config.yaml
|
||||
patchesJson6902:
|
||||
- path: patches/basic.config.yaml
|
||||
target:
|
||||
group: scorecard.operatorframework.io
|
||||
version: v1alpha3
|
||||
kind: Configuration
|
||||
name: config
|
||||
- path: patches/olm.config.yaml
|
||||
target:
|
||||
group: scorecard.operatorframework.io
|
||||
version: v1alpha3
|
||||
kind: Configuration
|
||||
name: config
|
||||
# +kubebuilder:scaffold:patchesJson6902
|
||||
11
config/scorecard/patches/basic.config.yaml
Normal file
11
config/scorecard/patches/basic.config.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- op: add
|
||||
path: /stages/0/tests/-
|
||||
value:
|
||||
entrypoint:
|
||||
- scorecard-test
|
||||
- basic-check-spec
|
||||
image: quay.io/operator-framework/scorecard-test:v1.12.0
|
||||
labels:
|
||||
suite: basic
|
||||
test: basic-check-spec-test
|
||||
51
config/scorecard/patches/olm.config.yaml
Normal file
51
config/scorecard/patches/olm.config.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
- op: add
|
||||
path: /stages/0/tests/-
|
||||
value:
|
||||
entrypoint:
|
||||
- scorecard-test
|
||||
- olm-bundle-validation
|
||||
image: quay.io/operator-framework/scorecard-test:v1.12.0
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-bundle-validation-test
|
||||
- op: add
|
||||
path: /stages/0/tests/-
|
||||
value:
|
||||
entrypoint:
|
||||
- scorecard-test
|
||||
- olm-crds-have-validation
|
||||
image: quay.io/operator-framework/scorecard-test:v1.12.0
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-crds-have-validation-test
|
||||
- op: add
|
||||
path: /stages/0/tests/-
|
||||
value:
|
||||
entrypoint:
|
||||
- scorecard-test
|
||||
- olm-crds-have-resources
|
||||
image: quay.io/operator-framework/scorecard-test:v1.12.0
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-crds-have-resources-test
|
||||
- op: add
|
||||
path: /stages/0/tests/-
|
||||
value:
|
||||
entrypoint:
|
||||
- scorecard-test
|
||||
- olm-spec-descriptors
|
||||
image: quay.io/operator-framework/scorecard-test:v1.12.0
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-spec-descriptors-test
|
||||
- op: add
|
||||
path: /stages/0/tests/-
|
||||
value:
|
||||
entrypoint:
|
||||
- scorecard-test
|
||||
- olm-status-descriptors
|
||||
image: quay.io/operator-framework/scorecard-test:v1.12.0
|
||||
labels:
|
||||
suite: olm
|
||||
test: olm-status-descriptors-test
|
||||
14
config/testing/debug_logs_patch.yaml
Normal file
14
config/testing/debug_logs_patch.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: awx-manager
|
||||
env:
|
||||
- name: ANSIBLE_DEBUG_LOGS
|
||||
value: "TRUE"
|
||||
21
config/testing/kustomization.yaml
Normal file
21
config/testing/kustomization.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
# Adds namespace to all resources.
|
||||
namespace: osdk-test
|
||||
namePrefix: osdk-
|
||||
# Labels to add to all resources and selectors.
|
||||
# commonLabels:
|
||||
# someName: someValue
|
||||
patchesStrategicMerge:
|
||||
- manager_image.yaml
|
||||
- debug_logs_patch.yaml
|
||||
- ../default/manager_auth_proxy_patch.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../crd
|
||||
- ../rbac
|
||||
- ../manager
|
||||
images:
|
||||
- name: testing
|
||||
newName: testing-operator
|
||||
patches:
|
||||
- path: pull_policy/Never.yaml
|
||||
12
config/testing/manager_image.yaml
Normal file
12
config/testing/manager_image.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: awx-manager
|
||||
image: testing
|
||||
12
config/testing/pull_policy/Always.yaml
Normal file
12
config/testing/pull_policy/Always.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: awx-manager
|
||||
imagePullPolicy: Always
|
||||
12
config/testing/pull_policy/IfNotPresent.yaml
Normal file
12
config/testing/pull_policy/IfNotPresent.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: awx-manager
|
||||
imagePullPolicy: IfNotPresent
|
||||
12
config/testing/pull_policy/Never.yaml
Normal file
12
config/testing/pull_policy/Never.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: controller-manager
|
||||
namespace: system
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: awx-manager
|
||||
imagePullPolicy: Never
|
||||
@@ -1,427 +0,0 @@
|
||||
# This file is generated by Ansible. Changes will be lost.
|
||||
# Update templates under ansible/templates/
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: awx-operator
|
||||
rules:
|
||||
- apiGroups:
|
||||
- route.openshift.io
|
||||
resources:
|
||||
- routes
|
||||
- routes/custom-host
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
- "rbac.authorization.k8s.io"
|
||||
resources:
|
||||
- pods
|
||||
- services
|
||||
- services/finalizers
|
||||
- serviceaccounts
|
||||
- endpoints
|
||||
- persistentvolumeclaims
|
||||
- events
|
||||
- configmaps
|
||||
- secrets
|
||||
- roles
|
||||
- rolebindings
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- apps
|
||||
- extensions
|
||||
resources:
|
||||
- deployments
|
||||
- daemonsets
|
||||
- replicasets
|
||||
- statefulsets
|
||||
- ingresses
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- monitoring.coreos.com
|
||||
resources:
|
||||
- servicemonitors
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
- apiGroups:
|
||||
- apps
|
||||
resourceNames:
|
||||
- awx-operator
|
||||
resources:
|
||||
- deployments/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments/scale
|
||||
verbs:
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/exec
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- replicasets
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- awx.ansible.com
|
||||
resources:
|
||||
- '*'
|
||||
verbs:
|
||||
- '*'
|
||||
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: awx-operator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: awx-operator
|
||||
namespace: default
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: awx-operator
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: awx-operator
|
||||
namespace: default
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: awx-operator
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
name: awx-operator
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: awx-operator
|
||||
spec:
|
||||
serviceAccountName: awx-operator
|
||||
containers:
|
||||
- name: awx-operator
|
||||
image: "quay.io/ansible/awx-operator:0.7.0"
|
||||
imagePullPolicy: "Always"
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/ansible-operator/runner
|
||||
name: runner
|
||||
env:
|
||||
# Watch all namespaces (cluster-scoped).
|
||||
- name: WATCH_NAMESPACE
|
||||
value: ""
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: OPERATOR_NAME
|
||||
value: awx-operator
|
||||
- name: ANSIBLE_GATHERING
|
||||
value: explicit
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 6789
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 3
|
||||
volumes:
|
||||
- name: runner
|
||||
emptyDir: {}
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: awxs.awx.ansible.com
|
||||
spec:
|
||||
group: awx.ansible.com
|
||||
names:
|
||||
kind: AWX
|
||||
listKind: AWXList
|
||||
plural: awxs
|
||||
singular: awx
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Schema validation for the AWX CRD
|
||||
properties:
|
||||
spec:
|
||||
properties:
|
||||
deployment_type:
|
||||
description: Name of the deployment type
|
||||
type: string
|
||||
tower_task_privileged:
|
||||
description: If a privileged security context should be enabled
|
||||
type: boolean
|
||||
tower_admin_user:
|
||||
description: Username to use for the admin account
|
||||
type: string
|
||||
tower_hostname:
|
||||
description: The hostname of the instance
|
||||
type: string
|
||||
tower_admin_email:
|
||||
description: The admin user email
|
||||
type: string
|
||||
tower_admin_password_secret:
|
||||
description: Secret where the admin password can be found
|
||||
type: string
|
||||
tower_postgres_configuration_secret:
|
||||
description: Secret where the database configuration can be found
|
||||
type: string
|
||||
tower_old_postgres_configuration_secret:
|
||||
description: Secret where the old database configuration can be found for data migration
|
||||
type: string
|
||||
tower_secret_key_secret:
|
||||
description: Secret where the secret key can be found
|
||||
type: string
|
||||
tower_broadcast_websocket_secret:
|
||||
description: Secret where the broadcast websocket secret can be found
|
||||
type: string
|
||||
tower_extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
tower_ingress_type:
|
||||
description: The ingress type to use to reach the deployed instance
|
||||
type: string
|
||||
enum:
|
||||
- none
|
||||
- Ingress
|
||||
- ingress
|
||||
- Route
|
||||
- route
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
tower_ingress_annotations:
|
||||
description: Annotations to add to the ingress
|
||||
type: string
|
||||
tower_ingress_tls_secret:
|
||||
description: Secret where the ingress TLS secret can be found
|
||||
type: string
|
||||
tower_loadbalancer_annotations:
|
||||
description: Annotations to add to the loadbalancer
|
||||
type: string
|
||||
tower_loadbalancer_protocol:
|
||||
description: Protocol to use for the loadbalancer
|
||||
type: string
|
||||
default: http
|
||||
enum:
|
||||
- http
|
||||
- https
|
||||
tower_loadbalancer_port:
|
||||
description: Port to use for the loadbalancer
|
||||
type: integer
|
||||
default: 80
|
||||
tower_route_host:
|
||||
description: The DNS to use to points to the instance
|
||||
type: string
|
||||
tower_route_tls_termination_mechanism:
|
||||
description: The secure TLS termination mechanism to use
|
||||
type: string
|
||||
default: Edge
|
||||
enum:
|
||||
- Edge
|
||||
- edge
|
||||
- Passthrough
|
||||
- passthrough
|
||||
tower_route_tls_secret:
|
||||
description: Secret where the TLS related credentials are stored
|
||||
type: string
|
||||
tower_image:
|
||||
description: Registry path to the application container to use
|
||||
type: string
|
||||
tower_image_pull_policy:
|
||||
description: The image pull policy
|
||||
type: string
|
||||
default: IfNotPresent
|
||||
enum:
|
||||
- Always
|
||||
- always
|
||||
- Never
|
||||
- never
|
||||
- IfNotPresent
|
||||
- ifnotpresent
|
||||
tower_task_resource_requirements:
|
||||
description: Resource requirements for the task container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_web_resource_requirements:
|
||||
description: Resource requirements for the web container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_replicas:
|
||||
description: Number of instance replicas
|
||||
type: integer
|
||||
default: 1
|
||||
format: int32
|
||||
tower_garbage_collect_secrets:
|
||||
description: Whether or not to remove secrets upon instance removal
|
||||
default: false
|
||||
type: boolean
|
||||
tower_create_preload_data:
|
||||
description: Whether or not to preload data upon Tower instance creation
|
||||
default: true
|
||||
type: boolean
|
||||
tower_task_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_task_command:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_web_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_web_command:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_task_extra_env:
|
||||
type: string
|
||||
tower_web_extra_env:
|
||||
type: string
|
||||
tower_task_extra_volume_mounts:
|
||||
type: string
|
||||
tower_web_extra_volume_mounts:
|
||||
type: string
|
||||
tower_redis_image:
|
||||
description: Registry path to the redis container to use
|
||||
type: string
|
||||
tower_postgres_image:
|
||||
description: Registry path to the PostgreSQL container to use
|
||||
type: string
|
||||
tower_postgres_resource_requirements:
|
||||
description: Resource requirements for the PostgreSQL container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_postgres_storage_class:
|
||||
description: Storage class to use for the PostgreSQL PVC
|
||||
type: string
|
||||
tower_postgres_data_path:
|
||||
description: Path where the PostgreSQL data are located
|
||||
type: string
|
||||
ca_trust_bundle:
|
||||
description: Path where the trusted CA bundle is available
|
||||
type: string
|
||||
development_mode:
|
||||
description: If the deployment should be done in development mode
|
||||
type: boolean
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
towerURL:
|
||||
description: URL to access the deployed instance
|
||||
type: string
|
||||
towerAdminUser:
|
||||
description: Admin user of the deployed instance
|
||||
type: string
|
||||
towerAdminPasswordSecret:
|
||||
description: Admin password of the deployed instance
|
||||
type: string
|
||||
towerMigratedFromSecret:
|
||||
description: The secret used for migrating an old Tower.
|
||||
type: string
|
||||
towerVersion:
|
||||
description: Version of the deployed instance
|
||||
type: string
|
||||
towerImage:
|
||||
description: URL of the image used for the deployed instance
|
||||
type: string
|
||||
conditions:
|
||||
description: The resulting conditions when a Service Telemetry is instantiated
|
||||
items:
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: example-awx
|
||||
namespace: example-awx
|
||||
spec:
|
||||
tower_ingress_type: none
|
||||
tower_task_privileged: false
|
||||
|
||||
tower_hostname: example-awx.test
|
||||
|
||||
tower_admin_user: test
|
||||
tower_admin_email: test@example.com
|
||||
|
||||
tower_image: quay.io/ansible/awx:18.0.0
|
||||
|
||||
tower_create_preload_data: true
|
||||
|
||||
tower_memcached_image: memcached:alpine
|
||||
|
||||
tower_redis_image: redis:latest
|
||||
|
||||
tower_postgres_storage_class: ''
|
||||
@@ -1,276 +0,0 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: awxs.awx.ansible.com
|
||||
spec:
|
||||
group: awx.ansible.com
|
||||
names:
|
||||
kind: AWX
|
||||
listKind: AWXList
|
||||
plural: awxs
|
||||
singular: awx
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Schema validation for the AWX CRD
|
||||
properties:
|
||||
spec:
|
||||
properties:
|
||||
deployment_type:
|
||||
description: Name of the deployment type
|
||||
type: string
|
||||
tower_task_privileged:
|
||||
description: If a privileged security context should be enabled
|
||||
type: boolean
|
||||
tower_admin_user:
|
||||
description: Username to use for the admin account
|
||||
type: string
|
||||
tower_hostname:
|
||||
description: The hostname of the instance
|
||||
type: string
|
||||
tower_admin_email:
|
||||
description: The admin user email
|
||||
type: string
|
||||
tower_admin_password_secret:
|
||||
description: Secret where the admin password can be found
|
||||
type: string
|
||||
tower_postgres_configuration_secret:
|
||||
description: Secret where the database configuration can be found
|
||||
type: string
|
||||
tower_old_postgres_configuration_secret:
|
||||
description: Secret where the old database configuration can be found for data migration
|
||||
type: string
|
||||
tower_secret_key_secret:
|
||||
description: Secret where the secret key can be found
|
||||
type: string
|
||||
tower_broadcast_websocket_secret:
|
||||
description: Secret where the broadcast websocket secret can be found
|
||||
type: string
|
||||
tower_extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
tower_ingress_type:
|
||||
description: The ingress type to use to reach the deployed instance
|
||||
type: string
|
||||
enum:
|
||||
- none
|
||||
- Ingress
|
||||
- ingress
|
||||
- Route
|
||||
- route
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
tower_ingress_annotations:
|
||||
description: Annotations to add to the ingress
|
||||
type: string
|
||||
tower_ingress_tls_secret:
|
||||
description: Secret where the ingress TLS secret can be found
|
||||
type: string
|
||||
tower_loadbalancer_annotations:
|
||||
description: Annotations to add to the loadbalancer
|
||||
type: string
|
||||
tower_loadbalancer_protocol:
|
||||
description: Protocol to use for the loadbalancer
|
||||
type: string
|
||||
default: http
|
||||
enum:
|
||||
- http
|
||||
- https
|
||||
tower_loadbalancer_port:
|
||||
description: Port to use for the loadbalancer
|
||||
type: integer
|
||||
default: 80
|
||||
tower_route_host:
|
||||
description: The DNS to use to points to the instance
|
||||
type: string
|
||||
tower_route_tls_termination_mechanism:
|
||||
description: The secure TLS termination mechanism to use
|
||||
type: string
|
||||
default: Edge
|
||||
enum:
|
||||
- Edge
|
||||
- edge
|
||||
- Passthrough
|
||||
- passthrough
|
||||
tower_route_tls_secret:
|
||||
description: Secret where the TLS related credentials are stored
|
||||
type: string
|
||||
tower_image:
|
||||
description: Registry path to the application container to use
|
||||
type: string
|
||||
tower_image_pull_policy:
|
||||
description: The image pull policy
|
||||
type: string
|
||||
default: IfNotPresent
|
||||
enum:
|
||||
- Always
|
||||
- always
|
||||
- Never
|
||||
- never
|
||||
- IfNotPresent
|
||||
- ifnotpresent
|
||||
tower_task_resource_requirements:
|
||||
description: Resource requirements for the task container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_web_resource_requirements:
|
||||
description: Resource requirements for the web container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_replicas:
|
||||
description: Number of instance replicas
|
||||
type: integer
|
||||
default: 1
|
||||
format: int32
|
||||
tower_garbage_collect_secrets:
|
||||
description: Whether or not to remove secrets upon instance removal
|
||||
default: false
|
||||
type: boolean
|
||||
tower_create_preload_data:
|
||||
description: Whether or not to preload data upon Tower instance creation
|
||||
default: true
|
||||
type: boolean
|
||||
tower_task_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_task_command:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_web_args:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_web_command:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tower_task_extra_env:
|
||||
type: string
|
||||
tower_web_extra_env:
|
||||
type: string
|
||||
tower_task_extra_volume_mounts:
|
||||
type: string
|
||||
tower_web_extra_volume_mounts:
|
||||
type: string
|
||||
tower_redis_image:
|
||||
description: Registry path to the redis container to use
|
||||
type: string
|
||||
tower_postgres_image:
|
||||
description: Registry path to the PostgreSQL container to use
|
||||
type: string
|
||||
tower_postgres_resource_requirements:
|
||||
description: Resource requirements for the PostgreSQL container
|
||||
properties:
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_postgres_storage_class:
|
||||
description: Storage class to use for the PostgreSQL PVC
|
||||
type: string
|
||||
tower_postgres_data_path:
|
||||
description: Path where the PostgreSQL data are located
|
||||
type: string
|
||||
ca_trust_bundle:
|
||||
description: Path where the trusted CA bundle is available
|
||||
type: string
|
||||
development_mode:
|
||||
description: If the deployment should be done in development mode
|
||||
type: boolean
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
towerURL:
|
||||
description: URL to access the deployed instance
|
||||
type: string
|
||||
towerAdminUser:
|
||||
description: Admin user of the deployed instance
|
||||
type: string
|
||||
towerAdminPasswordSecret:
|
||||
description: Admin password of the deployed instance
|
||||
type: string
|
||||
towerMigratedFromSecret:
|
||||
description: The secret used for migrating an old Tower.
|
||||
type: string
|
||||
towerVersion:
|
||||
description: Version of the deployed instance
|
||||
type: string
|
||||
towerImage:
|
||||
description: URL of the image used for the deployed instance
|
||||
type: string
|
||||
conditions:
|
||||
description: The resulting conditions when a Service Telemetry is instantiated
|
||||
items:
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
lastTransitionTime:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: example-awx
|
||||
namespace: example-awx
|
||||
spec:
|
||||
deployment_type: awx
|
||||
tower_ingress_type: ingress
|
||||
tower_task_privileged: false
|
||||
|
||||
tower_admin_email: test@example.com
|
||||
|
||||
tower_image: quay.io/ansible/awx:18.0.0
|
||||
|
||||
tower_web_resource_requirements:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 128M
|
||||
|
||||
tower_task_resource_requirements:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 128M
|
||||
|
||||
tower_create_preload_data: true
|
||||
|
||||
tower_memcached_image: memcached:alpine
|
||||
|
||||
tower_redis_image: redis:latest
|
||||
|
||||
tower_postgres_pass: awxpass
|
||||
tower_postgres_image: postgres:12
|
||||
tower_postgres_storage_class: ''
|
||||
@@ -1,402 +0,0 @@
|
||||
apiVersion: operators.coreos.com/v1alpha1
|
||||
kind: ClusterServiceVersion
|
||||
metadata:
|
||||
annotations:
|
||||
alm-examples: |-
|
||||
[
|
||||
{
|
||||
"apiVersion": "awx.ansible.com/v1beta1",
|
||||
"kind": "AWX",
|
||||
"metadata": {
|
||||
"name": "example-awx",
|
||||
"namespace": "example-awx"
|
||||
},
|
||||
"spec": {
|
||||
"tower_admin_email": "test@example.com",
|
||||
"tower_admin_user": "test",
|
||||
"tower_broadcast_websocket_secret": "changeme",
|
||||
"tower_create_preload_data": true,
|
||||
"tower_hostname": "example-awx.test",
|
||||
"tower_image": "quay.io/ansible/awx:18.0.0",
|
||||
"tower_ingress_type": "none",
|
||||
"tower_memcached_image": "memcached:alpine",
|
||||
"tower_postgres_storage_class": "",
|
||||
"tower_redis_image": "redis:latest",
|
||||
"tower_task_privileged": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"apiVersion": "awx.ansible.com/v1beta1",
|
||||
"kind": "AWX",
|
||||
"metadata": {
|
||||
"name": "example-awx",
|
||||
"namespace": "example-awx"
|
||||
},
|
||||
"spec": {
|
||||
"deployment_type": "awx",
|
||||
"tower_admin_email": "test@example.com",
|
||||
"tower_broadcast_websocket_secret": "changeme",
|
||||
"tower_create_preload_data": true,
|
||||
"tower_image": "quay.io/ansible/awx:18.0.0",
|
||||
"tower_ingress_type": "ingress",
|
||||
"tower_memcached_image": "memcached:alpine",
|
||||
"tower_postgres_image": "postgres:12",
|
||||
"tower_postgres_pass": "awxpass",
|
||||
"tower_postgres_storage_class": "",
|
||||
"tower_redis_image": "redis:latest",
|
||||
"tower_task_privileged": false,
|
||||
"tower_task_resource_requirements": {
|
||||
"requests": {
|
||||
"cpu": "500m",
|
||||
"memory": "128M"
|
||||
}
|
||||
},
|
||||
"tower_web_resource_requirements": {
|
||||
"requests": {
|
||||
"cpu": "500m",
|
||||
"memory": "128M"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
capabilities: Basic Install
|
||||
operators.operatorframework.io/builder: operator-sdk-v0.19.4
|
||||
operators.operatorframework.io/project_layout: ansible
|
||||
name: awx-operator.v0.0.1
|
||||
namespace: placeholder
|
||||
spec:
|
||||
apiservicedefinitions: {}
|
||||
customresourcedefinitions:
|
||||
owned:
|
||||
- description: A AWX Instance
|
||||
kind: AWX
|
||||
displayName: AWX
|
||||
name: awxs.awx.ansible.com
|
||||
specDescriptors:
|
||||
- displayName: Hostname
|
||||
path: tower_hostname
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Admin account username
|
||||
path: tower_admin_user
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Admin email address
|
||||
path: tower_admin_email
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- displayName: Admin password secret
|
||||
path: tower_admin_password_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Database configuration secret
|
||||
path: tower_postgres_configuration_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
path: tower_old_postgres_configuration_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Secret key secret
|
||||
path: tower_secret_key_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Broadcast Websocket Secret
|
||||
path: tower_broadcast_websocket_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- displayName: Ingress Type
|
||||
path: tower_ingress_type
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:none
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Ingress
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Route
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:LoadBalancer
|
||||
- displayName: Tower Ingress Annotations
|
||||
path: tower_ingress_annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:Ingress
|
||||
- displayName: Tower Ingress TLS Secret
|
||||
path: tower_ingress_tls_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:Ingress
|
||||
- displayName: Tower LoadBalancer Annotations
|
||||
path: tower_loadbalancer_annotations
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:LoadBalancer
|
||||
- displayName: Tower LoadBalancer Protocol
|
||||
path: tower_loadbalancer_protocol
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:http
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:https
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:LoadBalancer
|
||||
- displayName: Tower LoadBalancer Port
|
||||
path: tower_loadbalancer_port
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:number
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:LoadBalancer
|
||||
- displayName: Route DNS host
|
||||
path: tower_route_host
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:Route
|
||||
- displayName: Route TLS termination mechanism
|
||||
path: tower_route_tls_termination_mechanism
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Edge
|
||||
- urn:alm:descriptor:com.tectonic.ui:select:Passthrough
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:Route
|
||||
- displayName: Route TLS credential secret
|
||||
path: tower_route_tls_secret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- urn:alm:descriptor:com.tectonic.ui:fieldDependency:tower_ingress_type:Route
|
||||
- displayName: Image Pull Policy
|
||||
path: tower_image_pull_policy
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:imagePullPolicy
|
||||
- displayName: Web container resource requirements
|
||||
path: tower_web_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: Task container resource requirements
|
||||
path: tower_task_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: PostgreSQL container resource requirements (when using a managed
|
||||
instance)
|
||||
path: tower_postgres_resource_requirements
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:resourceRequirements
|
||||
- displayName: Replicas
|
||||
path: tower_replicas
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:number
|
||||
- displayName: Remove used secrets on instance removal ?
|
||||
path: tower_garbage_collect_secrets
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Preload instance with data upon creation ?
|
||||
path: tower_create_preload_data
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Deployment Type
|
||||
path: deployment_type
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Tower Image
|
||||
path: tower_image
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Tower Postgres Storage Class
|
||||
path: tower_postgres_storage_class
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Certificate Authorirty Trust Bundle
|
||||
path: ca_trust_bundle
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
statusDescriptors:
|
||||
- description: Route to access the instance deployed
|
||||
displayName: URL
|
||||
path: towerURL
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:org.w3:link
|
||||
- description: Admin user for the instance deployed
|
||||
displayName: Admin User
|
||||
path: towerAdminUser
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Admin password for the instance deployed
|
||||
displayName: Admin Password
|
||||
path: towerAdminPasswordSecret
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:io.kubernetes:Secret
|
||||
- description: Version of the instance deployed
|
||||
displayName: Version
|
||||
path: towerVersion
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- description: Image of the instance deployed
|
||||
displayName: Image
|
||||
path: towerImage
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
version: v1beta1
|
||||
description: AWX operator
|
||||
displayName: AWX
|
||||
icon:
|
||||
- base64data: ""
|
||||
mediatype: ""
|
||||
install:
|
||||
spec:
|
||||
clusterPermissions:
|
||||
- rules:
|
||||
- apiGroups:
|
||||
- route.openshift.io
|
||||
resources:
|
||||
- routes
|
||||
- routes/custom-host
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
- rbac.authorization.k8s.io
|
||||
resources:
|
||||
- pods
|
||||
- services
|
||||
- services/finalizers
|
||||
- serviceaccounts
|
||||
- endpoints
|
||||
- persistentvolumeclaims
|
||||
- events
|
||||
- configmaps
|
||||
- secrets
|
||||
- roles
|
||||
- rolebindings
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- apps
|
||||
- extensions
|
||||
resources:
|
||||
- deployments
|
||||
- daemonsets
|
||||
- replicasets
|
||||
- statefulsets
|
||||
- ingresses
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- monitoring.coreos.com
|
||||
resources:
|
||||
- servicemonitors
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
- apiGroups:
|
||||
- apps
|
||||
resourceNames:
|
||||
- awx-operator
|
||||
resources:
|
||||
- deployments/finalizers
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/exec
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- replicasets
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- awx.ansible.com
|
||||
resources:
|
||||
- '*'
|
||||
verbs:
|
||||
- '*'
|
||||
serviceAccountName: awx-operator
|
||||
deployments:
|
||||
- name: awx-operator
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
name: awx-operator
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: awx-operator
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: WATCH_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.annotations['olm.targetNamespaces']
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: OPERATOR_NAME
|
||||
value: awx-operator
|
||||
- name: ANSIBLE_GATHERING
|
||||
value: explicit
|
||||
image: quay.io/ansible/awx-operator:0.6.0
|
||||
imagePullPolicy: Always
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 6789
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 3
|
||||
name: awx-operator
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/ansible-operator/runner
|
||||
name: runner
|
||||
serviceAccountName: awx-operator
|
||||
volumes:
|
||||
- emptyDir: {}
|
||||
name: runner
|
||||
strategy: deployment
|
||||
installModes:
|
||||
- supported: true
|
||||
type: OwnNamespace
|
||||
- supported: true
|
||||
type: SingleNamespace
|
||||
- supported: false
|
||||
type: MultiNamespace
|
||||
- supported: true
|
||||
type: AllNamespaces
|
||||
keywords:
|
||||
- awx
|
||||
links:
|
||||
- name: Awx Operator
|
||||
url: https://github.com/ansible/awx-operator
|
||||
maintainers:
|
||||
- email: yguenane@redhat.com
|
||||
name: Yanis Guenane
|
||||
maturity: alpha
|
||||
provider:
|
||||
name: AWX Community
|
||||
url: https://github.com/ansible/awx-operator
|
||||
version: 0.0.1
|
||||
@@ -1,280 +0,0 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: awxs.awx.ansible.com
|
||||
spec:
|
||||
group: awx.ansible.com
|
||||
names:
|
||||
kind: AWX
|
||||
listKind: AWXList
|
||||
plural: awxs
|
||||
singular: awx
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: Schema validation for the AWX CRD
|
||||
properties:
|
||||
spec:
|
||||
properties:
|
||||
ca_trust_bundle:
|
||||
description: Path where the trusted CA bundle is available
|
||||
type: string
|
||||
deployment_type:
|
||||
description: Name of the deployment type
|
||||
type: string
|
||||
development_mode:
|
||||
description: If the deployment should be done in development mode
|
||||
type: boolean
|
||||
tower_admin_email:
|
||||
description: The admin user email
|
||||
type: string
|
||||
tower_admin_password_secret:
|
||||
description: Secret where the admin password can be found
|
||||
type: string
|
||||
tower_admin_user:
|
||||
description: Username to use for the admin account
|
||||
type: string
|
||||
tower_broadcast_websocket_secret:
|
||||
description: Secret where the broadcast websocket secret can be found
|
||||
type: string
|
||||
tower_create_preload_data:
|
||||
default: true
|
||||
description: Whether or not to preload data upon Tower instance creation
|
||||
type: boolean
|
||||
tower_extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
tower_garbage_collect_secrets:
|
||||
default: false
|
||||
description: Whether or not to remove secrets upon instance removal
|
||||
type: boolean
|
||||
tower_hostname:
|
||||
description: The hostname of the instance
|
||||
type: string
|
||||
tower_image:
|
||||
description: Registry path to the application container to use
|
||||
type: string
|
||||
tower_image_pull_policy:
|
||||
default: IfNotPresent
|
||||
description: The image pull policy
|
||||
enum:
|
||||
- Always
|
||||
- always
|
||||
- Never
|
||||
- never
|
||||
- IfNotPresent
|
||||
- ifnotpresent
|
||||
type: string
|
||||
tower_ingress_annotations:
|
||||
description: Annotations to add to the ingress
|
||||
type: string
|
||||
tower_ingress_tls_secret:
|
||||
description: Secret where the ingress TLS secret can be found
|
||||
type: string
|
||||
tower_ingress_type:
|
||||
description: The ingress type to use to reach the deployed instance
|
||||
enum:
|
||||
- none
|
||||
- Ingress
|
||||
- ingress
|
||||
- Route
|
||||
- route
|
||||
- LoadBalancer
|
||||
- loadbalancer
|
||||
type: string
|
||||
tower_loadbalancer_annotations:
|
||||
description: Annotations to add to the loadbalancer
|
||||
type: string
|
||||
tower_loadbalancer_protocol:
|
||||
description: Protocol to use for the loadbalancer
|
||||
type: string
|
||||
default: http
|
||||
enum:
|
||||
- http
|
||||
- https
|
||||
tower_loadbalancer_port:
|
||||
description: Port to use for the loadbalancer
|
||||
type: number
|
||||
default: 80
|
||||
tower_postgres_configuration_secret:
|
||||
description: Secret where the database configuration can be found
|
||||
type: string
|
||||
tower_old_postgres_configuration_secret:
|
||||
description: Secret where the old database configuration can be found for data migration
|
||||
type: string
|
||||
tower_postgres_data_path:
|
||||
description: Path where the PostgreSQL data are located
|
||||
type: string
|
||||
tower_postgres_image:
|
||||
description: Registry path to the PostgreSQL container to use
|
||||
type: string
|
||||
tower_postgres_resource_requirements:
|
||||
description: Resource requirements for the PostgreSQL container
|
||||
properties:
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_postgres_storage_class:
|
||||
description: Storage class to use for the PostgreSQL PVC
|
||||
type: string
|
||||
tower_redis_image:
|
||||
description: Registry path to the redis container to use
|
||||
type: string
|
||||
tower_replicas:
|
||||
default: 1
|
||||
description: Number of instance replicas
|
||||
format: int32
|
||||
type: integer
|
||||
tower_route_host:
|
||||
description: The DNS to use to points to the instance
|
||||
type: string
|
||||
tower_route_tls_secret:
|
||||
description: Secret where the TLS related credentials are stored
|
||||
type: string
|
||||
tower_route_tls_termination_mechanism:
|
||||
default: Edge
|
||||
description: The secure TLS termination mechanism to use
|
||||
enum:
|
||||
- Edge
|
||||
- edge
|
||||
- Passthrough
|
||||
- passthrough
|
||||
type: string
|
||||
tower_secret_key_secret:
|
||||
description: Secret where the secret key can be found
|
||||
type: string
|
||||
tower_task_args:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
tower_task_command:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
tower_task_extra_env:
|
||||
type: string
|
||||
tower_task_extra_volume_mounts:
|
||||
type: string
|
||||
tower_task_privileged:
|
||||
description: If a privileged security context should be enabled
|
||||
type: boolean
|
||||
tower_task_resource_requirements:
|
||||
description: Resource requirements for the task container
|
||||
properties:
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
tower_web_args:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
tower_web_command:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
tower_web_extra_env:
|
||||
type: string
|
||||
tower_web_extra_volume_mounts:
|
||||
type: string
|
||||
tower_web_resource_requirements:
|
||||
description: Resource requirements for the web container
|
||||
properties:
|
||||
limits:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
requests:
|
||||
properties:
|
||||
cpu:
|
||||
type: string
|
||||
memory:
|
||||
type: string
|
||||
storage:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
conditions:
|
||||
description: The resulting conditions when a Service Telemetry is
|
||||
instantiated
|
||||
items:
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
towerAdminPasswordSecret:
|
||||
description: Admin password of the deployed instance
|
||||
type: string
|
||||
towerAdminUser:
|
||||
description: Admin user of the deployed instance
|
||||
type: string
|
||||
towerImage:
|
||||
description: URL of the image used for the deployed instance
|
||||
type: string
|
||||
towerURL:
|
||||
description: URL to access the deployed instance
|
||||
type: string
|
||||
towerVersion:
|
||||
description: Version of the deployed instance
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: null
|
||||
storedVersions: null
|
||||
@@ -1,10 +0,0 @@
|
||||
annotations:
|
||||
operators.operatorframework.io.bundle.channel.default.v1: alpha
|
||||
operators.operatorframework.io.bundle.channels.v1: alpha
|
||||
operators.operatorframework.io.bundle.manifests.v1: manifests/
|
||||
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
|
||||
operators.operatorframework.io.bundle.metadata.v1: metadata/
|
||||
operators.operatorframework.io.bundle.package.v1: awx-operator
|
||||
operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.4
|
||||
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
|
||||
operators.operatorframework.io.metrics.project_layout: ansible
|
||||
1
docs/awx-demo.svg
Normal file
1
docs/awx-demo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 825 KiB |
@@ -6,14 +6,14 @@ To migrate data from an older AWX installation, you must provide some informatio
|
||||
|
||||
### Secret Key
|
||||
|
||||
You can find your old secret key in the inventory file you used to deploy AWX in releases prior to version 18.
|
||||
You can find your old secret key in the inventory file you used to deploy AWX in releases prior to version 18.
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: <resourcename>-secret-key
|
||||
namespace: <target namespace>
|
||||
namespace: <target-namespace>
|
||||
stringData:
|
||||
secret_key: <old-secret-key>
|
||||
type: Opaque
|
||||
@@ -21,7 +21,7 @@ type: Opaque
|
||||
|
||||
**Note**: `<resourcename>` must match the `name` of the AWX object you are creating. In our example below, it is `awx`.
|
||||
|
||||
### Old Databse Credentials
|
||||
### Old Database Credentials
|
||||
|
||||
The secret should be formatted as follows:
|
||||
|
||||
@@ -43,6 +43,15 @@ type: Opaque
|
||||
|
||||
> For `host`, a URL resolvable by the cluster could look something like `postgresql.<namespace>.svc.cluster.local`, where `<namespace>` is filled in with the namespace of the AWX deployment you are migrating data from.
|
||||
|
||||
If your AWX deployment is already using an external database server or its database is otherwise not managed
|
||||
by the AWX deployment, you can instead create the same secret as above but omit the `-old-` from the `name`.
|
||||
In the next section pass it in through `postgres_configuration_secret` instead, omitting the `_old_`
|
||||
from the key and ensuring the value matches the name of the secret. This will make AWX pick up on the existing
|
||||
database and apply any pending migrations. It is strongly recommended to backup your database beforehand.
|
||||
|
||||
The postgresql pod for the old deployment is used when streaming data to the new postgresql pod. If your postgresql pod has a custom label,
|
||||
you can pass that via the `postgres_label_selector` variable to make sure the postgresql pod can be found.
|
||||
|
||||
## Deploy AWX
|
||||
|
||||
When you apply your AWX object, you must specify the name to the database secret you created above:
|
||||
@@ -53,6 +62,21 @@ kind: AWX
|
||||
metadata:
|
||||
name: awx
|
||||
spec:
|
||||
tower_old_postgres_configuration_secret: <resourcename>-old-postgres-configuration
|
||||
old_postgres_configuration_secret: <resourcename>-old-postgres-configuration
|
||||
secret_key_secret: <resourcename>-secret-key
|
||||
...
|
||||
```
|
||||
## Important Note
|
||||
If you intend to put all the above in one file, make sure to separate each block with three dashes like so:
|
||||
|
||||
```yaml
|
||||
---
|
||||
# Secret key
|
||||
|
||||
---
|
||||
# Database creds
|
||||
|
||||
---
|
||||
# AWX Config
|
||||
```
|
||||
Failing to do so will lead to an inoperable setup.
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
- name: Verify cluster resources
|
||||
hosts: localhost
|
||||
connection: local
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
||||
|
||||
tasks:
|
||||
- name: Get AWX Pod data
|
||||
k8s_info:
|
||||
kind: Pod
|
||||
namespace: example-awx
|
||||
label_selectors:
|
||||
- app=awx
|
||||
register: tower_pods
|
||||
|
||||
- name: Verify there is one AWX pod
|
||||
assert:
|
||||
that: '{{ (tower_pods.resources | length) == 1 }}'
|
||||
@@ -2,9 +2,17 @@
|
||||
- name: Converge
|
||||
hosts: localhost
|
||||
connection: local
|
||||
vars:
|
||||
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
||||
roles:
|
||||
- installer
|
||||
gather_facts: no
|
||||
collections:
|
||||
- kubernetes.core
|
||||
|
||||
- import_playbook: '{{ playbook_dir }}/asserts.yml'
|
||||
tasks:
|
||||
- name: Create Namespace
|
||||
k8s:
|
||||
api_version: v1
|
||||
kind: Namespace
|
||||
name: '{{ namespace }}'
|
||||
|
||||
- import_tasks: kustomize.yml
|
||||
vars:
|
||||
state: present
|
||||
|
||||
6
molecule/default/create.yml
Normal file
6
molecule/default/create.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
- name: Create
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
tasks: []
|
||||
24
molecule/default/destroy.yml
Normal file
24
molecule/default/destroy.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Destroy
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
collections:
|
||||
- kubernetes.core
|
||||
|
||||
tasks:
|
||||
- import_tasks: kustomize.yml
|
||||
vars:
|
||||
state: absent
|
||||
|
||||
- name: Destroy Namespace
|
||||
k8s:
|
||||
api_version: v1
|
||||
kind: Namespace
|
||||
name: '{{ namespace }}'
|
||||
state: absent
|
||||
|
||||
- name: Unset pull policy
|
||||
command: '{{ kustomize }} edit remove patch pull_policy/{{ operator_pull_policy }}.yaml'
|
||||
args:
|
||||
chdir: '{{ config_dir }}/testing'
|
||||
15
molecule/default/kustomize.yml
Normal file
15
molecule/default/kustomize.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
- name: Build kustomize testing overlay
|
||||
# load_restrictor must be set to none so we can load patch files from the default overlay
|
||||
command: '{{ kustomize }} build --load_restrictor none .'
|
||||
args:
|
||||
chdir: '{{ config_dir }}/testing'
|
||||
register: resources
|
||||
changed_when: false
|
||||
|
||||
- name: Set resources to {{ state }}
|
||||
k8s:
|
||||
definition: '{{ item }}'
|
||||
state: '{{ state }}'
|
||||
wait: yes
|
||||
loop: '{{ resources.stdout | from_yaml_all | list }}'
|
||||
@@ -2,33 +2,38 @@
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
name: delegated
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint
|
||||
platforms:
|
||||
- name: kind-default
|
||||
- name: cluster
|
||||
groups:
|
||||
- k8s
|
||||
image: bsycorp/kind:latest-1.14
|
||||
privileged: True
|
||||
override_command: no
|
||||
exposed_ports:
|
||||
- 8443/tcp
|
||||
- 10080/tcp
|
||||
published_ports:
|
||||
- 0.0.0.0:${TEST_CLUSTER_PORT:-9443}:8443/tcp
|
||||
pre_build_image: yes
|
||||
provisioner:
|
||||
name: ansible
|
||||
log: True
|
||||
lint: |
|
||||
set -e
|
||||
ansible-lint
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
operator_namespace: ${TEST_NAMESPACE:-default}
|
||||
namespace: ${TEST_OPERATOR_NAMESPACE:-osdk-test}
|
||||
host_vars:
|
||||
localhost:
|
||||
awx_image: ${AWX_TEST_IMAGE:-""}
|
||||
awx_version: ${AWX_TEST_VERSION:-""}
|
||||
default_awx_version: "{{ lookup('url', 'https://api.github.com/repos/ansible/awx/releases/latest') | from_json | json_query('tag_name') }}"
|
||||
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
||||
config_dir: ${MOLECULE_PROJECT_DIRECTORY}/config
|
||||
samples_dir: ${MOLECULE_PROJECT_DIRECTORY}/config/samples
|
||||
operator_image: ${OPERATOR_IMAGE:-""}
|
||||
operator_pull_policy: ${OPERATOR_PULL_POLICY:-"Always"}
|
||||
kustomize: ${KUSTOMIZE_PATH:-kustomize}
|
||||
env:
|
||||
K8S_AUTH_KUBECONFIG: /tmp/molecule/kind-default/kubeconfig
|
||||
KUBECONFIG: /tmp/molecule/kind-default/kubeconfig
|
||||
ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/roles
|
||||
KIND_PORT: '${TEST_CLUSTER_PORT:-9443}'
|
||||
K8S_AUTH_KUBECONFIG: ${KUBECONFIG:-"~/.kube/config"}
|
||||
verifier:
|
||||
name: ansible
|
||||
lint: |
|
||||
set -e
|
||||
ansible-lint
|
||||
|
||||
@@ -1,31 +1,28 @@
|
||||
---
|
||||
- name: Prepare operator resources
|
||||
- name: Prepare
|
||||
hosts: localhost
|
||||
connection: local
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
||||
deploy_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/deploy"
|
||||
templates_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/ansible/templates"
|
||||
vars_files:
|
||||
- "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/ansible/group_vars/all"
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Create Custom Resource Definition
|
||||
k8s:
|
||||
definition: "{{ lookup('file', '/'.join([deploy_dir, 'crds/awx_v1beta1_crd.yaml'])) }}"
|
||||
- name: Ensure operator image is set
|
||||
fail:
|
||||
msg: |
|
||||
You must specify the OPERATOR_IMAGE environment variable in order to run the
|
||||
'default' scenario
|
||||
when: not operator_image
|
||||
|
||||
- name: Ensure specified namespace is present
|
||||
k8s:
|
||||
api_version: v1
|
||||
kind: Namespace
|
||||
name: '{{ operator_namespace }}'
|
||||
- name: Set testing image
|
||||
command: '{{ kustomize }} edit set image testing={{ operator_image }}'
|
||||
args:
|
||||
chdir: '{{ config_dir }}/testing'
|
||||
|
||||
- name: Create RBAC resources
|
||||
k8s:
|
||||
definition: "{{ lookup('template', '/'.join([templates_dir, item])) }}"
|
||||
namespace: '{{ operator_namespace }}'
|
||||
with_items:
|
||||
- role.yml.j2
|
||||
- role_binding.yml.j2
|
||||
- service_account.yml.j2
|
||||
- name: Set pull policy
|
||||
command: '{{ kustomize }} edit add patch --path pull_policy/{{ operator_pull_policy }}.yaml'
|
||||
args:
|
||||
chdir: '{{ config_dir }}/testing'
|
||||
|
||||
- name: Set testing namespace
|
||||
command: '{{ kustomize }} edit set namespace {{ namespace }}'
|
||||
args:
|
||||
chdir: '{{ config_dir }}/testing'
|
||||
|
||||
85
molecule/default/tasks/awx_test.yml
Normal file
85
molecule/default/tasks/awx_test.yml
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
- name: Create the awx.ansible.com/v1alpha1.AWX
|
||||
k8s:
|
||||
state: present
|
||||
namespace: '{{ namespace }}'
|
||||
definition: "{{ lookup('template', 'awx_cr_molecule.yml.j2') | from_yaml }}"
|
||||
wait: yes
|
||||
wait_timeout: 900
|
||||
wait_condition:
|
||||
type: Running
|
||||
reason: Successful
|
||||
status: "True"
|
||||
|
||||
- name: Obtain generated admin password
|
||||
k8s_info:
|
||||
namespace: '{{ namespace }}'
|
||||
kind: Secret
|
||||
name: example-awx-admin-password
|
||||
register: admin_pw_secret
|
||||
|
||||
- block:
|
||||
- name: Get pod details
|
||||
k8s_info:
|
||||
namespace: '{{ namespace }}'
|
||||
kind: Pod
|
||||
label_selectors:
|
||||
- app.kubernetes.io/name = example-awx
|
||||
register: awx_pod
|
||||
when: not awx_version
|
||||
|
||||
- name: Exract tags from images
|
||||
set_fact:
|
||||
image_tags: |
|
||||
{{ awx_pod.resources[0].spec.containers |
|
||||
map(attribute='image') |
|
||||
map('regex_search', default_awx_version) }}
|
||||
when: not awx_version
|
||||
|
||||
- fail:
|
||||
msg: |
|
||||
It looks like you may have broken the DEFAULT_AWX_VERSION functionality.
|
||||
This is an environment variable that is set via build arg when releasing awx-operator.
|
||||
when:
|
||||
- not awx_version
|
||||
- default_awx_version not in image_tags
|
||||
|
||||
- name: Launch Demo Job Template
|
||||
awx.awx.job_launch:
|
||||
name: Demo Job Template
|
||||
wait: yes
|
||||
validate_certs: no
|
||||
controller_host: localhost
|
||||
controller_username: admin
|
||||
controller_password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
||||
rescue:
|
||||
- name: Get list of project updates and jobs
|
||||
uri:
|
||||
url: "http://localhost/api/v2/{{ resource }}/"
|
||||
user: admin
|
||||
password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
||||
force_basic_auth: yes
|
||||
register: job_lists
|
||||
loop:
|
||||
- project_updates
|
||||
- jobs
|
||||
loop_control:
|
||||
loop_var: resource
|
||||
|
||||
- name: Get all job and project details
|
||||
uri:
|
||||
url: "http://localhost{{ endpoint }}"
|
||||
user: admin
|
||||
password: "{{ admin_pw_secret.resources[0].data.password | b64decode }}"
|
||||
force_basic_auth: yes
|
||||
loop: |
|
||||
{{ job_lists.results | map(attribute='json') | map(attribute='results') | flatten | map(attribute='url') }}
|
||||
loop_control:
|
||||
loop_var: endpoint
|
||||
|
||||
- name: Re-emit failure
|
||||
vars:
|
||||
failed_task:
|
||||
result: '{{ ansible_failed_result }}'
|
||||
fail:
|
||||
msg: '{{ failed_task }}'
|
||||
27
molecule/default/templates/awx_cr_molecule.yml.j2
Normal file
27
molecule/default/templates/awx_cr_molecule.yml.j2
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: example-awx
|
||||
spec:
|
||||
{% if awx_image %}
|
||||
image: {{ awx_image }}
|
||||
{% endif %}
|
||||
{% if awx_version %}
|
||||
image_version: {{ awx_version }}
|
||||
{% endif %}
|
||||
ingress_type: ingress
|
||||
ingress_annotations: |
|
||||
kubernetes.io/ingress.class: nginx
|
||||
web_resource_requirements:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 128M
|
||||
task_resource_requirements:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 128M
|
||||
ee_resource_requirements:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 64M
|
||||
57
molecule/default/verify.yml
Normal file
57
molecule/default/verify.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
- name: Verify
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: no
|
||||
collections:
|
||||
- kubernetes.core
|
||||
|
||||
vars:
|
||||
ctrl_label: control-plane=controller-manager
|
||||
|
||||
tasks:
|
||||
- block:
|
||||
- name: Import all test files from tasks/
|
||||
include_tasks: '{{ item }}'
|
||||
with_fileglob:
|
||||
- tasks/*_test.yml
|
||||
rescue:
|
||||
- name: Retrieve relevant resources
|
||||
k8s_info:
|
||||
api_version: '{{ item.api_version }}'
|
||||
kind: '{{ item.kind }}'
|
||||
namespace: '{{ namespace }}'
|
||||
loop:
|
||||
- api_version: v1
|
||||
kind: Pod
|
||||
- api_version: apps/v1
|
||||
kind: Deployment
|
||||
- api_version: v1
|
||||
kind: Secret
|
||||
- api_version: v1
|
||||
kind: ConfigMap
|
||||
register: debug_resources
|
||||
|
||||
- name: Retrieve Pod logs
|
||||
k8s_log:
|
||||
name: '{{ item.metadata.name }}'
|
||||
namespace: '{{ namespace }}'
|
||||
container: awx-manager
|
||||
loop: "{{ q('k8s', api_version='v1', kind='Pod', namespace=namespace, label_selector=ctrl_label) }}"
|
||||
register: debug_logs
|
||||
|
||||
- name: Output gathered resources
|
||||
debug:
|
||||
var: debug_resources
|
||||
|
||||
- name: Output gathered logs
|
||||
debug:
|
||||
var: item.log_lines
|
||||
loop: '{{ debug_logs.results }}'
|
||||
|
||||
- name: Re-emit failure
|
||||
vars:
|
||||
failed_task:
|
||||
result: '{{ ansible_failed_result }}'
|
||||
fail:
|
||||
msg: '{{ failed_task }}'
|
||||
34
molecule/kind/converge.yml
Normal file
34
molecule/kind/converge.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
- name: Build operator image
|
||||
docker_image:
|
||||
build:
|
||||
path: '{{ project_dir }}'
|
||||
pull: no
|
||||
args:
|
||||
DEFAULT_AWX_VERSION: '{{ default_awx_version }}'
|
||||
name: '{{ operator_image }}'
|
||||
tag: latest
|
||||
push: no
|
||||
source: build
|
||||
force_source: yes
|
||||
|
||||
- name: Load operator image into kind cluster
|
||||
command: kind load docker-image --name osdk-test '{{ operator_image }}'
|
||||
register: result
|
||||
changed_when: '"not yet present" in result.stdout'
|
||||
|
||||
- name: Load awx image into kind cluster
|
||||
command: kind load docker-image --name osdk-test '{{ awx_image }}:{{ awx_version }}'
|
||||
register: result
|
||||
changed_when: '"not yet present" in result.stdout'
|
||||
when:
|
||||
- awx_image is defined
|
||||
- awx_image != ''
|
||||
|
||||
- import_playbook: ../default/converge.yml
|
||||
27
molecule/kind/create.yml
Normal file
27
molecule/kind/create.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Create
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: Create test kind cluster
|
||||
shell: |
|
||||
cat <<EOF | kind create cluster --name osdk-test --kubeconfig {{ kubeconfig }} --config=-
|
||||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
nodes:
|
||||
- role: control-plane
|
||||
kubeadmConfigPatches:
|
||||
- |
|
||||
kind: InitConfiguration
|
||||
nodeRegistration:
|
||||
kubeletExtraArgs:
|
||||
node-labels: "ingress-ready=true"
|
||||
extraPortMappings:
|
||||
- containerPort: 80
|
||||
hostPort: 80
|
||||
protocol: TCP
|
||||
- containerPort: 443
|
||||
hostPort: 443
|
||||
protocol: TCP
|
||||
EOF
|
||||
16
molecule/kind/destroy.yml
Normal file
16
molecule/kind/destroy.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Destroy
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
collections:
|
||||
- kubernetes.core
|
||||
|
||||
tasks:
|
||||
- name: Destroy test kind cluster
|
||||
command: kind delete cluster --name osdk-test --kubeconfig {{ kubeconfig }}
|
||||
|
||||
- name: Unset pull policy
|
||||
command: '{{ kustomize }} edit remove patch pull_policy/{{ operator_pull_policy }}.yaml'
|
||||
args:
|
||||
chdir: '{{ config_dir }}/testing'
|
||||
44
molecule/kind/molecule.yml
Normal file
44
molecule/kind/molecule.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: delegated
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
platforms:
|
||||
- name: cluster
|
||||
groups:
|
||||
- k8s
|
||||
provisioner:
|
||||
name: ansible
|
||||
playbooks:
|
||||
verify: ../default/verify.yml
|
||||
lint: |
|
||||
set -e
|
||||
ansible-lint
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
namespace: ${TEST_OPERATOR_NAMESPACE:-osdk-test}
|
||||
host_vars:
|
||||
localhost:
|
||||
awx_image: ${AWX_TEST_IMAGE:-""}
|
||||
awx_version: ${AWX_TEST_VERSION:-""}
|
||||
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
||||
default_awx_version: "{{ lookup('url', 'https://api.github.com/repos/ansible/awx/releases/latest') | from_json | json_query('tag_name') }}"
|
||||
config_dir: ${MOLECULE_PROJECT_DIRECTORY}/config
|
||||
samples_dir: ${MOLECULE_PROJECT_DIRECTORY}/config/samples
|
||||
project_dir: ${MOLECULE_PROJECT_DIRECTORY}
|
||||
operator_image: testing-operator
|
||||
operator_pull_policy: "Never"
|
||||
kubeconfig: "{{ lookup('env', 'KUBECONFIG') }}"
|
||||
kustomize: ${KUSTOMIZE_PATH:-kustomize}
|
||||
env:
|
||||
K8S_AUTH_KUBECONFIG: ${MOLECULE_EPHEMERAL_DIRECTORY}/kubeconfig
|
||||
KUBECONFIG: ${MOLECULE_EPHEMERAL_DIRECTORY}/kubeconfig
|
||||
verifier:
|
||||
name: ansible
|
||||
lint: |
|
||||
set -e
|
||||
ansible-lint
|
||||
29
molecule/kind/prepare.yml
Normal file
29
molecule/kind/prepare.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Prepare
|
||||
hosts: localhost
|
||||
connection: local
|
||||
gather_facts: false
|
||||
collections:
|
||||
- kubernetes.core
|
||||
vars:
|
||||
nginx_ingress_definition: 'https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml'
|
||||
tasks:
|
||||
- name: Install NGINX ingress
|
||||
k8s:
|
||||
definition: |
|
||||
{{ lookup('url', nginx_ingress_definition, split_lines=False) | from_yaml_all }}
|
||||
|
||||
- name: Wait for NGINX ingress to become available
|
||||
k8s_info:
|
||||
kind: Pod
|
||||
namespace: ingress-nginx
|
||||
label_selectors:
|
||||
- app.kubernetes.io/component=controller
|
||||
wait: yes
|
||||
wait_timeout: 30
|
||||
wait_condition:
|
||||
type: Ready
|
||||
register: result # For some reason, this task always fails on the first try...
|
||||
until: result is not failed
|
||||
|
||||
- import_playbook: ../default/prepare.yml
|
||||
7
molecule/requirements.txt
Normal file
7
molecule/requirements.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
molecule
|
||||
molecule-docker
|
||||
yamllint
|
||||
ansible-lint
|
||||
openshift!=0.13.0
|
||||
jmespath
|
||||
ansible-core
|
||||
8
molecule/requirements.yml
Normal file
8
molecule/requirements.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
collections:
|
||||
- name: community.general
|
||||
- name: kubernetes.core
|
||||
version: 1.2.1
|
||||
- name: operator_sdk.util
|
||||
- name: community.docker
|
||||
- name: awx.awx
|
||||
@@ -1,2 +0,0 @@
|
||||
[defaults]
|
||||
stdout_callback = yaml
|
||||
@@ -1,133 +0,0 @@
|
||||
---
|
||||
- name: Build Operator in Kind container
|
||||
hosts: k8s
|
||||
|
||||
vars:
|
||||
image_name: awx.ansible.com/awx-operator:testing
|
||||
|
||||
tasks:
|
||||
# using command so we don't need to install any dependencies
|
||||
- name: Get existing image hash
|
||||
command: docker images -q {{ image_name }}
|
||||
register: prev_hash
|
||||
changed_when: false
|
||||
|
||||
- name: Build Operator Image
|
||||
command: docker build -f /build/build/Dockerfile -t {{ image_name }} /build
|
||||
register: build_cmd
|
||||
changed_when: not prev_hash.stdout or (prev_hash.stdout and prev_hash.stdout not in ''.join(build_cmd.stdout_lines[-2:]))
|
||||
|
||||
- name: Converge
|
||||
hosts: localhost
|
||||
connection: local
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
||||
deploy_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/deploy"
|
||||
templates_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/ansible/templates"
|
||||
pull_policy: Never
|
||||
operator_image: awx.ansible.com/awx-operator
|
||||
operator_version: testing
|
||||
custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/awx_v1beta1_molecule.yaml'])) | from_yaml }}"
|
||||
tasks:
|
||||
|
||||
- block:
|
||||
|
||||
- name: Delete the Operator Deployment
|
||||
k8s:
|
||||
state: absent
|
||||
namespace: '{{ operator_namespace }}'
|
||||
definition: "{{ lookup('template', '/'.join([templates_dir, 'operator.yml.j2'])) }}"
|
||||
register: delete_deployment
|
||||
when: hostvars[groups.k8s.0].build_cmd.changed
|
||||
|
||||
- name: Wait 30s for Operator Deployment to terminate
|
||||
k8s_info:
|
||||
api_version: '{{ definition.apiVersion }}'
|
||||
kind: '{{ definition.kind }}'
|
||||
namespace: '{{ operator_namespace }}'
|
||||
name: '{{ definition.metadata.name }}'
|
||||
vars:
|
||||
definition: "{{ lookup('template', '/'.join([templates_dir, 'operator.yml.j2'])) | from_yaml }}"
|
||||
register: deployment
|
||||
until: not deployment.resources
|
||||
delay: 3
|
||||
retries: 10
|
||||
when: delete_deployment.changed
|
||||
|
||||
- name: Create the Operator Deployment
|
||||
k8s:
|
||||
namespace: '{{ operator_namespace }}'
|
||||
definition: "{{ lookup('template', '/'.join([templates_dir, 'operator.yml.j2'])) }}"
|
||||
|
||||
- name: Ensure the AWX custom_resource namespace exists
|
||||
k8s:
|
||||
state: present
|
||||
name: '{{ custom_resource.metadata.namespace }}'
|
||||
kind: Namespace
|
||||
api_version: v1
|
||||
|
||||
- name: Create the AWX Custom Resource
|
||||
k8s:
|
||||
state: present
|
||||
namespace: '{{ custom_resource.metadata.namespace }}'
|
||||
definition: '{{ custom_resource }}'
|
||||
|
||||
- name: Wait 15m for reconciliation to run
|
||||
k8s_info:
|
||||
api_version: '{{ custom_resource.apiVersion }}'
|
||||
kind: '{{ custom_resource.kind }}'
|
||||
namespace: '{{ custom_resource.metadata.namespace }}'
|
||||
name: '{{ custom_resource.metadata.name }}'
|
||||
register: cr
|
||||
until:
|
||||
- "'Successful' in (cr | json_query('resources[].status.conditions[].reason'))"
|
||||
delay: 6
|
||||
retries: 150
|
||||
|
||||
rescue:
|
||||
|
||||
- name: debug cr
|
||||
ignore_errors: yes
|
||||
failed_when: false
|
||||
debug:
|
||||
var: debug_cr
|
||||
vars:
|
||||
debug_cr: '{{ lookup("k8s",
|
||||
kind=custom_resource.kind,
|
||||
api_version=custom_resource.apiVersion,
|
||||
namespace=custom_resource.metadata.namespace,
|
||||
resource_name=custom_resource.metadata.name)
|
||||
}}'
|
||||
|
||||
- name: debug awx deployment
|
||||
ignore_errors: yes
|
||||
failed_when: false
|
||||
debug:
|
||||
var: deploy
|
||||
vars:
|
||||
deploy: '{{ lookup("k8s",
|
||||
kind="Deployment",
|
||||
api_version="apps/v1",
|
||||
namespace=custom_resource.metadata.namespace,
|
||||
label_selector="app=awx")
|
||||
}}'
|
||||
|
||||
- name: get operator logs
|
||||
ignore_errors: yes
|
||||
failed_when: false
|
||||
command: kubectl logs deployment/{{ definition.metadata.name }} -n {{ operator_namespace }}
|
||||
environment:
|
||||
KUBECONFIG: '{{ lookup("env", "KUBECONFIG") }}'
|
||||
vars:
|
||||
definition: "{{ lookup('template', '/'.join([templates_dir, 'operator.yml.j2'])) | from_yaml }}"
|
||||
register: log
|
||||
|
||||
- name: print debug output
|
||||
debug: var=log.stdout_lines
|
||||
|
||||
- name: fail if converge didn't succeed
|
||||
fail:
|
||||
msg: "Failed on action: converge"
|
||||
|
||||
- import_playbook: '{{ playbook_dir }}/../default/asserts.yml'
|
||||
@@ -1,46 +0,0 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint
|
||||
platforms:
|
||||
- name: kind-test-local
|
||||
groups:
|
||||
- k8s
|
||||
image: bsycorp/kind:v1.17.9
|
||||
privileged: True
|
||||
override_command: no
|
||||
exposed_ports:
|
||||
- 8443/tcp
|
||||
- 10080/tcp
|
||||
published_ports:
|
||||
- 0.0.0.0:${TEST_CLUSTER_PORT:-10443}:8443/tcp
|
||||
pre_build_image: yes
|
||||
volumes:
|
||||
- ${MOLECULE_PROJECT_DIRECTORY}:/build:Z
|
||||
provisioner:
|
||||
name: ansible
|
||||
log: True
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
operator_namespace: ${TEST_NAMESPACE:-default}
|
||||
env:
|
||||
K8S_AUTH_KUBECONFIG: /tmp/molecule/kind-test-local/kubeconfig
|
||||
KUBECONFIG: /tmp/molecule/kind-test-local/kubeconfig
|
||||
ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/roles
|
||||
KIND_PORT: '${TEST_CLUSTER_PORT:-10443}'
|
||||
scenario:
|
||||
test_sequence:
|
||||
- lint
|
||||
- destroy
|
||||
- dependency
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- converge
|
||||
- destroy
|
||||
@@ -1,38 +0,0 @@
|
||||
---
|
||||
- name: Prepare kubernetes environment
|
||||
hosts: k8s
|
||||
gather_facts: no
|
||||
vars:
|
||||
kubeconfig: "{{ lookup('env', 'KUBECONFIG') }}"
|
||||
tasks:
|
||||
- name: delete the kubeconfig if present
|
||||
file:
|
||||
path: '{{ kubeconfig }}'
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Fetch the kubeconfig
|
||||
fetch:
|
||||
dest: '{{ kubeconfig }}'
|
||||
flat: yes
|
||||
src: /root/.kube/config
|
||||
|
||||
- name: Change the kubeconfig port to the proper value
|
||||
replace:
|
||||
regexp: 8443
|
||||
replace: "{{ lookup('env', 'KIND_PORT') }}"
|
||||
path: '{{ kubeconfig }}'
|
||||
mode: 0644
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Wait for the Kubernetes API to become available (this could take a minute)
|
||||
uri:
|
||||
url: "http://localhost:10080/kubernetes-ready"
|
||||
status_code: 200
|
||||
validate_certs: no
|
||||
register: result
|
||||
until: (result.status|default(-1)) == 200
|
||||
retries: 60
|
||||
delay: 5
|
||||
|
||||
- import_playbook: ../default/prepare.yml
|
||||
@@ -1,141 +0,0 @@
|
||||
---
|
||||
# TODO: For some reason prepare is not run after a destroy in the Minikube env.
|
||||
- import_playbook: ../default/prepare.yml
|
||||
|
||||
- name: Build Operator in Minikube
|
||||
hosts: localhost
|
||||
connection: local
|
||||
|
||||
vars:
|
||||
image_name: awx.ansible.com/awx-operator:testing
|
||||
|
||||
tasks:
|
||||
# Use raw Docker commands inside Minikube to avoid extra Python dependencies.
|
||||
- name: Get existing image hash
|
||||
shell: |
|
||||
eval $(minikube docker-env)
|
||||
docker images -q {{ image_name }}
|
||||
register: prev_hash
|
||||
changed_when: false
|
||||
|
||||
- name: Build Operator Image
|
||||
shell: |
|
||||
eval $(minikube docker-env)
|
||||
docker build -f ../../build/Dockerfile -t {{ image_name }} ../..
|
||||
register: build_cmd
|
||||
changed_when: not prev_hash.stdout or (prev_hash.stdout and prev_hash.stdout not in ''.join(build_cmd.stdout_lines[-2:]))
|
||||
|
||||
- name: Converge
|
||||
hosts: localhost
|
||||
connection: local
|
||||
|
||||
vars:
|
||||
ansible_python_interpreter: '{{ ansible_playbook_python }}'
|
||||
deploy_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/deploy"
|
||||
templates_dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/ansible/templates"
|
||||
pull_policy: Never
|
||||
operator_image: awx.ansible.com/awx-operator
|
||||
operator_version: testing
|
||||
# Change this to _awx to test AWX, _tower to test Tower.
|
||||
custom_resource: "{{ lookup('file', '/'.join([deploy_dir, 'crds/awx_v1beta1_molecule.yaml'])) | from_yaml }}"
|
||||
|
||||
tasks:
|
||||
- block:
|
||||
- name: Delete the Operator Deployment
|
||||
k8s:
|
||||
state: absent
|
||||
namespace: '{{ operator_namespace }}'
|
||||
definition: "{{ lookup('template', '/'.join([templates_dir, 'operator.yml.j2'])) }}"
|
||||
register: delete_deployment
|
||||
when: build_cmd.changed
|
||||
|
||||
- name: Wait 30s for Operator Deployment to terminate
|
||||
k8s_info:
|
||||
api_version: '{{ definition.apiVersion }}'
|
||||
kind: '{{ definition.kind }}'
|
||||
namespace: '{{ operator_namespace }}'
|
||||
name: '{{ definition.metadata.name }}'
|
||||
vars:
|
||||
definition: "{{ lookup('template', '/'.join([templates_dir, 'operator.yml.j2'])) | from_yaml }}"
|
||||
register: deployment
|
||||
until: not deployment.resources
|
||||
delay: 3
|
||||
retries: 10
|
||||
when: delete_deployment.changed
|
||||
|
||||
- name: Create the Operator Deployment
|
||||
k8s:
|
||||
namespace: '{{ operator_namespace }}'
|
||||
definition: "{{ lookup('template', '/'.join([templates_dir, 'operator.yml.j2'])) }}"
|
||||
|
||||
- name: Ensure the AWX custom_resource namespace exists
|
||||
k8s:
|
||||
state: present
|
||||
name: '{{ custom_resource.metadata.namespace }}'
|
||||
kind: Namespace
|
||||
api_version: v1
|
||||
|
||||
- name: Create the AWX Custom Resource
|
||||
k8s:
|
||||
state: present
|
||||
namespace: '{{ custom_resource.metadata.namespace }}'
|
||||
definition: '{{ custom_resource }}'
|
||||
|
||||
- name: Wait 15m for reconciliation to run
|
||||
k8s_info:
|
||||
api_version: '{{ custom_resource.apiVersion }}'
|
||||
kind: '{{ custom_resource.kind }}'
|
||||
namespace: '{{ custom_resource.metadata.namespace }}'
|
||||
name: '{{ custom_resource.metadata.name }}'
|
||||
register: cr
|
||||
until:
|
||||
- "'Successful' in (cr | json_query('resources[].status.conditions[].reason'))"
|
||||
delay: 6
|
||||
retries: 150
|
||||
|
||||
rescue:
|
||||
|
||||
- name: debug cr
|
||||
ignore_errors: yes
|
||||
failed_when: false
|
||||
debug:
|
||||
var: debug_cr
|
||||
vars:
|
||||
debug_cr: '{{ lookup("k8s",
|
||||
kind=custom_resource.kind,
|
||||
api_version=custom_resource.apiVersion,
|
||||
namespace=custom_resource.metadata.namespace,
|
||||
resource_name=custom_resource.metadata.name)
|
||||
}}'
|
||||
|
||||
- name: debug awx deployment
|
||||
ignore_errors: yes
|
||||
failed_when: false
|
||||
debug:
|
||||
var: deploy
|
||||
vars:
|
||||
deploy: '{{ lookup("k8s",
|
||||
kind="Deployment",
|
||||
api_version="apps/v1",
|
||||
namespace=custom_resource.metadata.namespace,
|
||||
label_selector="app=awx")
|
||||
}}'
|
||||
|
||||
- name: get operator logs
|
||||
ignore_errors: yes
|
||||
failed_when: false
|
||||
command: kubectl logs deployment/{{ definition.metadata.name }} -n {{ operator_namespace }} -c operator
|
||||
environment:
|
||||
KUBECONFIG: '{{ lookup("env", "KUBECONFIG") }}'
|
||||
vars:
|
||||
definition: "{{ lookup('template', '/'.join([templates_dir, 'operator.yml.j2'])) | from_yaml }}"
|
||||
register: log
|
||||
|
||||
- name: print debug output
|
||||
debug: var=log.stdout_lines
|
||||
|
||||
- name: fail if converge didn't succeed
|
||||
fail:
|
||||
msg: "Failed on action: converge"
|
||||
|
||||
- import_playbook: '{{ playbook_dir }}/../default/asserts.yml'
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
dependency:
|
||||
name: galaxy
|
||||
driver:
|
||||
name: delegated
|
||||
options:
|
||||
managed: False
|
||||
ansible_connection_options: {}
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint
|
||||
platforms:
|
||||
- name: test-minikube
|
||||
groups:
|
||||
- k8s
|
||||
provisioner:
|
||||
name: ansible
|
||||
inventory:
|
||||
group_vars:
|
||||
all:
|
||||
operator_namespace: ${TEST_NAMESPACE:-default}
|
||||
env:
|
||||
ANSIBLE_ROLES_PATH: ${MOLECULE_PROJECT_DIRECTORY}/roles
|
||||
scenario:
|
||||
test_sequence:
|
||||
- lint
|
||||
- destroy
|
||||
- dependency
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- converge
|
||||
- destroy
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user