Rework mage (#10417)
This commit is contained in:
parent
8f54b538d9
commit
9635ece4c0
18 changed files with 959 additions and 624 deletions
6
go.work
Normal file
6
go.work
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
go 1.21.1
|
||||||
|
|
||||||
|
use (
|
||||||
|
.
|
||||||
|
./magefiles
|
||||||
|
)
|
253
go.work.sum
Normal file
253
go.work.sum
Normal file
|
@ -0,0 +1,253 @@
|
||||||
|
cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw=
|
||||||
|
cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI=
|
||||||
|
cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68=
|
||||||
|
cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo=
|
||||||
|
cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA=
|
||||||
|
cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo=
|
||||||
|
cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA=
|
||||||
|
cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs=
|
||||||
|
cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw=
|
||||||
|
cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY=
|
||||||
|
cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg=
|
||||||
|
cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E=
|
||||||
|
cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ=
|
||||||
|
cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0=
|
||||||
|
cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE=
|
||||||
|
cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss=
|
||||||
|
cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g=
|
||||||
|
cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4=
|
||||||
|
cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4=
|
||||||
|
cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA=
|
||||||
|
cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U=
|
||||||
|
cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI=
|
||||||
|
cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc=
|
||||||
|
cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU=
|
||||||
|
cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI=
|
||||||
|
cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM=
|
||||||
|
cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI=
|
||||||
|
cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
|
||||||
|
cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
|
||||||
|
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
|
||||||
|
cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM=
|
||||||
|
cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4=
|
||||||
|
cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0=
|
||||||
|
cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4=
|
||||||
|
cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw=
|
||||||
|
cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M=
|
||||||
|
cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI=
|
||||||
|
cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY=
|
||||||
|
cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE=
|
||||||
|
cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4=
|
||||||
|
cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8=
|
||||||
|
cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70=
|
||||||
|
cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q=
|
||||||
|
cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g=
|
||||||
|
cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4=
|
||||||
|
cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI=
|
||||||
|
cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E=
|
||||||
|
cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE=
|
||||||
|
cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk=
|
||||||
|
cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU=
|
||||||
|
cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4=
|
||||||
|
cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI=
|
||||||
|
cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4=
|
||||||
|
cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4=
|
||||||
|
cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE=
|
||||||
|
cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg=
|
||||||
|
cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw=
|
||||||
|
cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY=
|
||||||
|
cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw=
|
||||||
|
cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY=
|
||||||
|
cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0=
|
||||||
|
cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU=
|
||||||
|
cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ=
|
||||||
|
cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw=
|
||||||
|
cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk=
|
||||||
|
cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM=
|
||||||
|
cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0=
|
||||||
|
cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc=
|
||||||
|
cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M=
|
||||||
|
cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc=
|
||||||
|
cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc=
|
||||||
|
cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak=
|
||||||
|
cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY=
|
||||||
|
cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig=
|
||||||
|
cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA=
|
||||||
|
cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA=
|
||||||
|
cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM=
|
||||||
|
cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E=
|
||||||
|
cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0=
|
||||||
|
cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ=
|
||||||
|
cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8=
|
||||||
|
cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk=
|
||||||
|
cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8=
|
||||||
|
cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE=
|
||||||
|
cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE=
|
||||||
|
cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs=
|
||||||
|
cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I=
|
||||||
|
cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0=
|
||||||
|
cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA=
|
||||||
|
cloud.google.com/go/pubsub v1.32.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc=
|
||||||
|
cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0=
|
||||||
|
cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU=
|
||||||
|
cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE=
|
||||||
|
cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA=
|
||||||
|
cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg=
|
||||||
|
cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8=
|
||||||
|
cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw=
|
||||||
|
cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE=
|
||||||
|
cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg=
|
||||||
|
cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo=
|
||||||
|
cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw=
|
||||||
|
cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA=
|
||||||
|
cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ=
|
||||||
|
cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ=
|
||||||
|
cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g=
|
||||||
|
cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI=
|
||||||
|
cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo=
|
||||||
|
cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E=
|
||||||
|
cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA=
|
||||||
|
cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24=
|
||||||
|
cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk=
|
||||||
|
cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E=
|
||||||
|
cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk=
|
||||||
|
cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs=
|
||||||
|
cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU=
|
||||||
|
cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo=
|
||||||
|
cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU=
|
||||||
|
cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro=
|
||||||
|
cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0=
|
||||||
|
cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs=
|
||||||
|
cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc=
|
||||||
|
cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg=
|
||||||
|
cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g=
|
||||||
|
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
|
||||||
|
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
|
||||||
|
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||||
|
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||||
|
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||||
|
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||||
|
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
|
||||||
|
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
|
||||||
|
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
|
||||||
|
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||||
|
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||||
|
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||||
|
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||||
|
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||||
|
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||||
|
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||||
|
github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||||
|
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||||
|
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||||
|
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||||
|
github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g=
|
||||||
|
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
|
||||||
|
github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||||
|
github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas=
|
||||||
|
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||||
|
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
|
||||||
|
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
|
||||||
|
github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ=
|
||||||
|
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
|
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
|
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
|
||||||
|
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
|
||||||
|
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
|
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||||
|
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
|
github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
|
||||||
|
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||||
|
github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
|
||||||
|
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
|
github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
|
||||||
|
github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI=
|
||||||
|
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||||
|
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||||
|
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
|
||||||
|
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||||
|
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||||
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||||
|
github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU=
|
||||||
|
github.com/onsi/ginkgo/v2 v2.9.4/go.mod h1:gCQYp2Q+kSoIj7ykSVb9nskRSsR6PUj4AiLywzIhbKM=
|
||||||
|
github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM=
|
||||||
|
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
|
||||||
|
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||||
|
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||||
|
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||||
|
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||||
|
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||||
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
|
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||||
|
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||||
|
go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
|
||||||
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
|
golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
|
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
|
||||||
|
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y=
|
||||||
|
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||||
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
|
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
|
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
|
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
|
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||||
|
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
|
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
|
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||||
|
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||||
|
golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||||
|
golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
|
||||||
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||||
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||||
|
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
|
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||||
|
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
|
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
|
golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
|
||||||
|
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||||
|
golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4=
|
||||||
|
golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
|
||||||
|
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
|
||||||
|
google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw=
|
||||||
|
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||||
|
google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64=
|
||||||
|
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y=
|
||||||
|
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g=
|
||||||
|
google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0=
|
||||||
|
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig=
|
||||||
|
google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ=
|
||||||
|
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ=
|
||||||
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
|
||||||
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o=
|
||||||
|
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||||
|
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
||||||
|
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||||
|
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||||
|
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
|
||||||
|
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
|
||||||
|
google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
|
||||||
|
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||||
|
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
|
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
|
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
|
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
|
||||||
|
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||||
|
k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||||
|
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ=
|
||||||
|
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM=
|
||||||
|
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||||
|
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk=
|
||||||
|
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
|
@ -1,67 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright 2020 The Kubernetes Authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
if [ -n "$DEBUG" ]; then
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
URL="https://github.com/kubernetes/ingress-nginx/tree/main/"
|
|
||||||
DIR=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd -P)
|
|
||||||
|
|
||||||
declare -A skip_files=(
|
|
||||||
["$DIR/test/e2e/framework/framework.go"]=1
|
|
||||||
["$DIR/test/e2e/e2e.go"]=1
|
|
||||||
["$DIR/test/e2e/e2e_test.go"]=1
|
|
||||||
)
|
|
||||||
|
|
||||||
echo "<!---
|
|
||||||
This file is autogenerated!
|
|
||||||
Do not try to edit it manually.
|
|
||||||
-->
|
|
||||||
|
|
||||||
# e2e test suite for [Ingress NGINX Controller]($URL)
|
|
||||||
|
|
||||||
"
|
|
||||||
|
|
||||||
for FILE in $(find $DIR/test/e2e -name "*.go");do
|
|
||||||
# skip files
|
|
||||||
if [ ${skip_files[$FILE]} ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# describe definition
|
|
||||||
DESCRIBE=$(cat $FILE | grep -n -oP 'Describe.*')
|
|
||||||
if [ -z "$DESCRIBE" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
# line number
|
|
||||||
DESCRIBE_LINE=$(echo $DESCRIBE | cut -f1 -d ':')
|
|
||||||
# clean describe, extracting the string
|
|
||||||
DESCRIBE=$(echo $DESCRIBE | sed -En 's/.*("|`)(.*)("|`).*/\2/p')
|
|
||||||
|
|
||||||
FILE_URL=$(echo $FILE | sed "s|${DIR}/|${URL}|g")
|
|
||||||
echo "
|
|
||||||
### [$DESCRIBE]($FILE_URL#L$DESCRIBE_LINE)
|
|
||||||
"
|
|
||||||
|
|
||||||
# extract Tests
|
|
||||||
ITS=$(cat $FILE | grep -n -oP 'It\(.*')
|
|
||||||
while IFS= read -r line; do
|
|
||||||
IT_LINE=$(echo $line | cut -f1 -d ':')
|
|
||||||
IT=$(echo $line | sed -En 's/.*("|`)(.*)("|`).*/\2/p')
|
|
||||||
echo "- [$IT]($FILE_URL#L$IT_LINE)"
|
|
||||||
done <<< "$ITS"
|
|
||||||
done
|
|
|
@ -1,19 +0,0 @@
|
||||||
//go:build mage
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2023 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package main
|
|
|
@ -1,4 +1,4 @@
|
||||||
//go:build mage
|
//go:build ignore
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2023 The Kubernetes Authors.
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
@ -17,3 +17,11 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/magefile/mage/mage"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() { os.Exit(mage.Main()) }
|
|
@ -1,31 +0,0 @@
|
||||||
//go:build mage
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2023 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
//import (
|
|
||||||
// "github.com/magefile/mage/mg"
|
|
||||||
// "github.com/mysteriumnetwork/go-ci/commands"
|
|
||||||
//)
|
|
||||||
//
|
|
||||||
//type Go mg.Namespace
|
|
||||||
//
|
|
||||||
//// Checks for issues with go imports
|
|
||||||
//func (Go) CheckGoImports() error {
|
|
||||||
// return commands.GoImports("./...")
|
|
||||||
//}
|
|
|
@ -1,4 +1,4 @@
|
||||||
module github.com/kubernetes/ingress-nginx/magefiles
|
module k8s.io/ingress-nginx/magefiles
|
||||||
|
|
||||||
go 1.21.1
|
go 1.21.1
|
||||||
|
|
||||||
|
@ -6,27 +6,27 @@ require (
|
||||||
github.com/blang/semver/v4 v4.0.0
|
github.com/blang/semver/v4 v4.0.0
|
||||||
github.com/google/go-github/v48 v48.2.0
|
github.com/google/go-github/v48 v48.2.0
|
||||||
github.com/helm/helm v2.17.0+incompatible
|
github.com/helm/helm v2.17.0+incompatible
|
||||||
github.com/magefile/mage v1.14.0
|
github.com/magefile/mage v1.15.0
|
||||||
github.com/vmware-labs/yaml-jsonpath v0.3.2
|
github.com/vmware-labs/yaml-jsonpath v0.3.2
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
|
golang.org/x/oauth2 v0.12.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/BurntSushi/toml v1.2.1 // indirect
|
github.com/BurntSushi/toml v1.3.2 // indirect
|
||||||
github.com/Masterminds/semver v1.5.0 // indirect
|
github.com/Masterminds/semver v1.5.0 // indirect
|
||||||
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
|
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
|
||||||
github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 // indirect
|
github.com/dprotaso/go-yit v0.0.0-20191028211022-135eb7262960 // indirect
|
||||||
github.com/ghodss/yaml v1.0.0 // indirect
|
github.com/ghodss/yaml v1.0.0 // indirect
|
||||||
github.com/gobwas/glob v0.2.3 // indirect
|
github.com/gobwas/glob v0.2.3 // indirect
|
||||||
github.com/golang/protobuf v1.5.2 // indirect
|
github.com/golang/protobuf v1.5.3 // indirect
|
||||||
github.com/google/go-querystring v1.1.0 // indirect
|
github.com/google/go-querystring v1.1.0 // indirect
|
||||||
github.com/stretchr/testify v1.8.1 // indirect
|
github.com/rogpeppe/go-internal v1.11.0 // indirect
|
||||||
golang.org/x/crypto v0.1.0 // indirect
|
golang.org/x/crypto v0.13.0 // indirect
|
||||||
golang.org/x/net v0.7.0 // indirect
|
golang.org/x/net v0.15.0 // indirect
|
||||||
google.golang.org/appengine v1.6.7 // indirect
|
google.golang.org/appengine v1.6.7 // indirect
|
||||||
google.golang.org/protobuf v1.28.0 // indirect
|
google.golang.org/protobuf v1.31.0 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
k8s.io/apimachinery v0.25.4 // indirect
|
k8s.io/apimachinery v0.27.4 // indirect
|
||||||
k8s.io/helm v2.17.0+incompatible // indirect
|
k8s.io/helm v2.17.0+incompatible // indirect
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
|
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
|
||||||
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||||
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
|
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
|
||||||
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||||
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
|
github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM=
|
||||||
|
@ -19,8 +19,8 @@ github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJA
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||||
|
@ -34,65 +34,61 @@ github.com/helm/helm v2.17.0+incompatible/go.mod h1:ahXhuvluW4YnSL6W6hDVetZsVK8P
|
||||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
|
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||||
|
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
|
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
|
||||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
|
||||||
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
|
|
||||||
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
|
|
||||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
|
||||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/ginkgo v1.10.2 h1:uqH7bpe+ERSiDa34FDOF7RikN6RzXgduUF8yarlZp94=
|
github.com/onsi/ginkgo v1.10.2 h1:uqH7bpe+ERSiDa34FDOF7RikN6RzXgduUF8yarlZp94=
|
||||||
github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||||
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||||
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
|
github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E=
|
||||||
github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
|
github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
|
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
||||||
|
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||||
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
|
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
|
||||||
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
|
||||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
|
||||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk=
|
github.com/vmware-labs/yaml-jsonpath v0.3.2 h1:/5QKeCBGdsInyDCyVNLbXyilb61MXGi9NP674f9Hobk=
|
||||||
github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ=
|
github.com/vmware-labs/yaml-jsonpath v0.3.2/go.mod h1:U6whw1z03QyqgWdgXxvVnQ90zN1BWz5V+51Ewf8k+rQ=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU=
|
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
|
||||||
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||||
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
|
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
|
||||||
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs=
|
golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
|
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
|
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
|
||||||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
|
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
||||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
|
||||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
||||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||||
|
@ -106,7 +102,7 @@ gopkg.in/yaml.v3 v3.0.0-20191026110619-0b21df46bc1d/go.mod h1:K4uyk7z7BCEPqu6E+C
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
k8s.io/apimachinery v0.25.4 h1:CtXsuaitMESSu339tfhVXhQrPET+EiWnIY1rcurKnAc=
|
k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs=
|
||||||
k8s.io/apimachinery v0.25.4/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo=
|
k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E=
|
||||||
k8s.io/helm v2.17.0+incompatible h1:Bpn6o1wKLYqKM3+Osh8e+1/K2g/GsQJ4F4yNF2+deao=
|
k8s.io/helm v2.17.0+incompatible h1:Bpn6o1wKLYqKM3+Osh8e+1/K2g/GsQJ4F4yNF2+deao=
|
||||||
k8s.io/helm v2.17.0+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI=
|
k8s.io/helm v2.17.0+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI=
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
//go:build ignore
|
//go:build mage
|
||||||
// +build ignore
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2021 The Kubernetes Authors.
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -20,11 +19,6 @@ limitations under the License.
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
//mage:import
|
||||||
|
_ "k8s.io/ingress-nginx/magefiles/steps"
|
||||||
"github.com/magefile/mage/mage"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
|
||||||
os.Exit(mage.Main())
|
|
||||||
}
|
|
||||||
|
|
187
magefiles/steps/helm.go
Normal file
187
magefiles/steps/helm.go
Normal file
|
@ -0,0 +1,187 @@
|
||||||
|
/*
|
||||||
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package steps
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
semver "github.com/blang/semver/v4"
|
||||||
|
"github.com/helm/helm/pkg/chartutil"
|
||||||
|
"github.com/magefile/mage/mg"
|
||||||
|
"github.com/magefile/mage/sh"
|
||||||
|
yamlpath "github.com/vmware-labs/yaml-jsonpath/pkg/yamlpath"
|
||||||
|
"gopkg.in/yaml.v3"
|
||||||
|
|
||||||
|
utils "k8s.io/ingress-nginx/magefiles/utils"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
HelmChartPath = "charts/ingress-nginx/Chart.yaml"
|
||||||
|
HelmChartValues = "charts/ingress-nginx/values.yaml"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Helm mg.Namespace
|
||||||
|
|
||||||
|
// UpdateVersion Update Helm Version of the Chart
|
||||||
|
func (Helm) UpdateVersion(version string) {
|
||||||
|
updateVersion(version)
|
||||||
|
}
|
||||||
|
|
||||||
|
func currentChartVersion() string {
|
||||||
|
chart, err := chartutil.LoadChartfile(HelmChartPath)
|
||||||
|
utils.CheckIfError(err, "HELM Could not Load Chart")
|
||||||
|
return chart.Version
|
||||||
|
}
|
||||||
|
|
||||||
|
func updateVersion(version string) {
|
||||||
|
utils.Info("HELM Reading File %v", HelmChartPath)
|
||||||
|
|
||||||
|
chart, err := chartutil.LoadChartfile(HelmChartPath)
|
||||||
|
utils.CheckIfError(err, "HELM Could not Load Chart")
|
||||||
|
|
||||||
|
// Get the current tag
|
||||||
|
// appVersionV, err := getIngressNGINXVersion()
|
||||||
|
// utils.CheckIfError(err, "HELM Issue Retrieving the Current Ingress Nginx Version")
|
||||||
|
|
||||||
|
// remove the v from TAG
|
||||||
|
appVersion := version
|
||||||
|
|
||||||
|
utils.Info("HELM Ingress-Nginx App Version: %s Chart AppVersion: %s", appVersion, chart.AppVersion)
|
||||||
|
if appVersion == chart.AppVersion {
|
||||||
|
utils.Warning("HELM Ingress NGINX Version didnt change Ingress-Nginx App Version: %s Chart AppVersion: %s", appVersion, chart.AppVersion)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
controllerSemVer, err := semver.Parse(version)
|
||||||
|
utils.CheckIfError(err, "error parsing semver of new app")
|
||||||
|
isPreRelease := len(controllerSemVer.Pre) > 0
|
||||||
|
oldControllerSemVer, err := semver.Parse(chart.AppVersion)
|
||||||
|
utils.CheckIfError(err, "error parsing semver of old chart")
|
||||||
|
isBreakingChange := controllerSemVer.Major > oldControllerSemVer.Major || controllerSemVer.Minor > oldControllerSemVer.Minor
|
||||||
|
|
||||||
|
// Update the helm chart
|
||||||
|
chart.AppVersion = appVersion
|
||||||
|
cTag, err := semver.Make(chart.Version)
|
||||||
|
utils.CheckIfError(err, "HELM Creating Chart Version: %v", err)
|
||||||
|
|
||||||
|
incrFunc := cTag.IncrementPatch
|
||||||
|
if isBreakingChange {
|
||||||
|
cTag.Patch = 0
|
||||||
|
incrFunc = cTag.IncrementMinor
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if isPreRelease {
|
||||||
|
chart.Annotations["artifacthub.io/prerelease"] = "true"
|
||||||
|
cTag.Pre = controllerSemVer.Pre
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = incrFunc(); err != nil {
|
||||||
|
utils.ErrorF("HELM Incrementing Chart Version: %v", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
chart.Version = cTag.String()
|
||||||
|
utils.Debug("HELM Updated Chart Version: %v", chart.Version)
|
||||||
|
|
||||||
|
err = chartutil.SaveChartfile(HelmChartPath, chart)
|
||||||
|
utils.CheckIfError(err, "HELM Saving new Chart")
|
||||||
|
}
|
||||||
|
|
||||||
|
func updateChartReleaseNotes(releasesNotes []string) {
|
||||||
|
utils.Info("HELM Updating the Chart Release notes")
|
||||||
|
chart, err := chartutil.LoadChartfile(HelmChartPath)
|
||||||
|
utils.CheckIfError(err, "HELM Could not Load Chart to update release notes %s", HelmChartPath)
|
||||||
|
var releaseNoteString string
|
||||||
|
for i := range releasesNotes {
|
||||||
|
releaseNoteString = fmt.Sprintf("%s - \"%s\"\n", releaseNoteString, releasesNotes[i])
|
||||||
|
}
|
||||||
|
utils.Info("HELM Release note string %s", releaseNoteString)
|
||||||
|
chart.Annotations["artifacthub.io/changes"] = releaseNoteString
|
||||||
|
err = chartutil.SaveChartfile(HelmChartPath, chart)
|
||||||
|
utils.CheckIfError(err, "HELM Saving updated release notes for Chart")
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateChartValue Updates the Helm ChartValue
|
||||||
|
func (Helm) UpdateChartValue(key, value string) {
|
||||||
|
updateChartValue(key, value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func updateChartValue(key, value string) {
|
||||||
|
utils.Info("HELM Updating Chart %s %s:%s", HelmChartValues, key, value)
|
||||||
|
|
||||||
|
// read current values.yaml
|
||||||
|
data, err := os.ReadFile(HelmChartValues)
|
||||||
|
utils.CheckIfError(err, "HELM Could not Load Helm Chart Values files %s", HelmChartValues)
|
||||||
|
|
||||||
|
// var valuesStruct IngressChartValue
|
||||||
|
var n yaml.Node
|
||||||
|
utils.CheckIfError(yaml.Unmarshal(data, &n), "HELM Could not Unmarshal %s", HelmChartValues)
|
||||||
|
|
||||||
|
// update value
|
||||||
|
// keyParse := parsePath(key)
|
||||||
|
p, err := yamlpath.NewPath(key)
|
||||||
|
utils.CheckIfError(err, "HELM cannot create path")
|
||||||
|
|
||||||
|
q, err := p.Find(&n)
|
||||||
|
utils.CheckIfError(err, "HELM unexpected error finding path")
|
||||||
|
|
||||||
|
for _, i := range q {
|
||||||
|
utils.Info("HELM Found %s at %s", i.Value, key)
|
||||||
|
i.Value = value
|
||||||
|
utils.Info("HELM Updated %s at %s", i.Value, key)
|
||||||
|
}
|
||||||
|
|
||||||
|
//// write to file
|
||||||
|
var b bytes.Buffer
|
||||||
|
yamlEncoder := yaml.NewEncoder(&b)
|
||||||
|
yamlEncoder.SetIndent(2)
|
||||||
|
err = yamlEncoder.Encode(&n)
|
||||||
|
utils.CheckIfError(err, "HELM Could not Marshal new Values file")
|
||||||
|
err = os.WriteFile(HelmChartValues, b.Bytes(), 0o644)
|
||||||
|
utils.CheckIfError(err, "HELM Could not write new Values file to %s", HelmChartValues)
|
||||||
|
|
||||||
|
utils.Info("HELM Ingress Nginx Helm Chart update %s %s", key, value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (Helm) Helmdocs() error {
|
||||||
|
return runHelmDocs()
|
||||||
|
}
|
||||||
|
|
||||||
|
func runHelmDocs() error {
|
||||||
|
err := installHelmDocs()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
err = sh.RunV("helm-docs", "--chart-search-root=${PWD}/charts")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func installHelmDocs() error {
|
||||||
|
utils.Info("HELM Install HelmDocs")
|
||||||
|
g0 := sh.RunCmd("go")
|
||||||
|
|
||||||
|
err := g0("install", "github.com/norwoodj/helm-docs/cmd/helm-docs@v1.11.0")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -1,5 +1,3 @@
|
||||||
//go:build mage
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2023 The Kubernetes Authors.
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -16,26 +14,23 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package steps
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
"net"
|
|
||||||
"net/http"
|
|
||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/google/go-github/v48/github"
|
"github.com/google/go-github/v48/github"
|
||||||
"github.com/magefile/mage/mg"
|
"github.com/magefile/mage/mg"
|
||||||
"github.com/magefile/mage/sh"
|
"github.com/magefile/mage/sh"
|
||||||
"golang.org/x/oauth2"
|
"golang.org/x/oauth2"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
|
|
||||||
|
utils "k8s.io/ingress-nginx/magefiles/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Release mg.Namespace
|
type Release mg.Namespace
|
||||||
|
@ -62,55 +57,28 @@ const (
|
||||||
CHANGELOG = "Changelog.md" // Name of the changelog
|
CHANGELOG = "Changelog.md" // Name of the changelog
|
||||||
)
|
)
|
||||||
|
|
||||||
// ControllerImage - struct with info about controllers
|
|
||||||
type ControllerImage struct {
|
|
||||||
Tag string
|
|
||||||
Digest string
|
|
||||||
Registry string
|
|
||||||
Name string
|
|
||||||
}
|
|
||||||
|
|
||||||
// IngressRelease All the information about an ingress-nginx release that gets updated
|
|
||||||
type IngressRelease struct {
|
|
||||||
ControllerVersion string
|
|
||||||
ControllerImage ControllerImage
|
|
||||||
ReleaseNote ReleaseNote
|
|
||||||
Release *github.RepositoryRelease
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReleaseNote - All the pieces of information/documents that get updated during a release
|
|
||||||
type ReleaseNote struct {
|
|
||||||
Version string
|
|
||||||
NewControllerVersion string
|
|
||||||
PreviousControllerVersion string
|
|
||||||
ControllerImages []ControllerImage
|
|
||||||
DepUpdates []string
|
|
||||||
Updates []string
|
|
||||||
HelmUpdates []string
|
|
||||||
NewHelmChartVersion string
|
|
||||||
PreviousHelmChartVersion string
|
|
||||||
}
|
|
||||||
|
|
||||||
// IMAGES_YAML returns this data structure
|
|
||||||
type ImageYamls []ImageElement
|
|
||||||
|
|
||||||
// ImageElement - a specific image and it's data structure the dmap is a list of shas and container versions
|
|
||||||
type ImageElement struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Dmap map[string][]string `json:"dmap"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// init will set the GitHub token from the committers/releasers env var
|
// init will set the GitHub token from the committers/releasers env var
|
||||||
func init() {
|
func init() {
|
||||||
GITHUB_TOKEN = os.Getenv("GITHUB_TOKEN")
|
GITHUB_TOKEN = os.Getenv("GITHUB_TOKEN")
|
||||||
}
|
}
|
||||||
|
|
||||||
// PromoteImage Creates PR into the k8s.io repo for promotion of ingress from staging to production
|
|
||||||
func (Release) PromoteImage(version, sha string) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release Create a new release of ingress nginx controller
|
// Release Create a new release of ingress nginx controller
|
||||||
func (Release) NewRelease(version string) {
|
func (Release) NewRelease(version string) {
|
||||||
|
newRelease(version, "")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (Release) NewReleaseFromOld(version, oldversion string) {
|
||||||
|
newRelease(version, oldversion)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (Release) E2EDocs() {
|
||||||
|
e2edocs, err := utils.GenerateE2EDocs()
|
||||||
|
utils.CheckIfError(err, "error on template")
|
||||||
|
err = os.WriteFile("docs/e2e-tests.md", []byte(e2edocs), 644)
|
||||||
|
utils.CheckIfError(err, "Could not write new e2e test file ")
|
||||||
|
}
|
||||||
|
|
||||||
|
func newRelease(version, oldversion string) {
|
||||||
// newRelease := Release{}
|
// newRelease := Release{}
|
||||||
|
|
||||||
// update ingress-nginx version
|
// update ingress-nginx version
|
||||||
|
@ -119,12 +87,12 @@ func (Release) NewRelease(version string) {
|
||||||
// mg.Deps(mg.F(Tag.BumpNginx, version))
|
// mg.Deps(mg.F(Tag.BumpNginx, version))
|
||||||
|
|
||||||
tag, err := getIngressNGINXVersion()
|
tag, err := getIngressNGINXVersion()
|
||||||
CheckIfError(err, "RELEASE Retrieving the current Ingress Nginx Version")
|
utils.CheckIfError(err, "RELEASE Retrieving the current Ingress Nginx Version")
|
||||||
|
|
||||||
Info("RELEASE Checking Current Version %s to New Version %s", tag, version)
|
utils.Info("RELEASE Checking Current Version %s to New Version %s", tag, version)
|
||||||
// if the version were upgrading does not match the TAG file, lets update the TAG file
|
// if the version were upgrading does not match the TAG file, lets update the TAG file
|
||||||
if tag[1:] != version {
|
if tag[1:] != version {
|
||||||
Warning("RELEASE Ingress Nginx TAG %s and new version %s do not match", tag, version)
|
utils.Warning("RELEASE Ingress Nginx TAG %s and new version %s do not match", tag, version)
|
||||||
mg.Deps(mg.F(Tag.BumpNginx, fmt.Sprintf("v%s", version)))
|
mg.Deps(mg.F(Tag.BumpNginx, fmt.Sprintf("v%s", version)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,25 +100,25 @@ func (Release) NewRelease(version string) {
|
||||||
mg.Deps(mg.F(Tag.NewControllerTag, version))
|
mg.Deps(mg.F(Tag.NewControllerTag, version))
|
||||||
|
|
||||||
// make release notes
|
// make release notes
|
||||||
releaseNotes, err := makeReleaseNotes(version)
|
releaseNotes, err := makeReleaseNotes(version, oldversion)
|
||||||
CheckIfError(err, "RELEASE Creating Release Notes for version %s", version)
|
utils.CheckIfError(err, "RELEASE Creating Release Notes for version %s", version)
|
||||||
Info("RELEASE Release Notes %s completed", releaseNotes.Version)
|
utils.Info("RELEASE Release Notes %s completed", releaseNotes.Version)
|
||||||
|
|
||||||
// update chart values.yaml new controller tag and image digest
|
// update chart values.yaml new controller tag and image digest
|
||||||
releaseNotes.PreviousHelmChartVersion = currentChartVersion()
|
releaseNotes.PreviousHelmChartVersion = currentChartVersion()
|
||||||
|
|
||||||
// controller tag
|
// controller tag
|
||||||
updateChartValue("controller.image.tag", fmt.Sprintf("v%s", releaseNotes.Version))
|
updateChartValue("controller.image.tag", fmt.Sprintf("v%s", releaseNotes.Version))
|
||||||
Debug("releaseNotes.ControllerImages[0].Name %s", releaseNotes.ControllerImages[0].Name)
|
utils.Debug("releaseNotes.ControllerImages[0].Name %s", releaseNotes.ControllerImages[0].Name)
|
||||||
Debug("releaseNotes.ControllerImages[1].Name %s", releaseNotes.ControllerImages[1].Name)
|
utils.Debug("releaseNotes.ControllerImages[1].Name %s", releaseNotes.ControllerImages[1].Name)
|
||||||
// controller digest
|
// controller digest
|
||||||
if releaseNotes.ControllerImages[0].Name == "ingress-nginx/controller" {
|
if releaseNotes.ControllerImages[0].Name == "ingress-nginx/controller" {
|
||||||
Debug("Updating Chart Value %s with %s", "controller.image.digest", releaseNotes.ControllerImages[0].Digest)
|
utils.Debug("Updating Chart Value %s with %s", "controller.image.digest", releaseNotes.ControllerImages[0].Digest)
|
||||||
updateChartValue("controller.image.digest", releaseNotes.ControllerImages[0].Digest)
|
updateChartValue("controller.image.digest", releaseNotes.ControllerImages[0].Digest)
|
||||||
}
|
}
|
||||||
// controller chroot digest
|
// controller chroot digest
|
||||||
if releaseNotes.ControllerImages[1].Name == "ingress-nginx/controller-chroot" {
|
if releaseNotes.ControllerImages[1].Name == "ingress-nginx/controller-chroot" {
|
||||||
Debug("Updating Chart Value %s with %s", "controller.image.digestChroot", releaseNotes.ControllerImages[1].Digest)
|
utils.Debug("Updating Chart Value %s with %s", "controller.image.digestChroot", releaseNotes.ControllerImages[1].Digest)
|
||||||
updateChartValue("controller.image.digestChroot", releaseNotes.ControllerImages[1].Digest)
|
updateChartValue("controller.image.digestChroot", releaseNotes.ControllerImages[1].Digest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,18 +131,18 @@ func (Release) NewRelease(version string) {
|
||||||
updateChartReleaseNotes(releaseNotes.HelmUpdates)
|
updateChartReleaseNotes(releaseNotes.HelmUpdates)
|
||||||
|
|
||||||
// Run helm docs update
|
// Run helm docs update
|
||||||
CheckIfError(runHelmDocs(), "Error Updating Helm Docs ")
|
utils.CheckIfError(runHelmDocs(), "Error Updating Helm Docs ")
|
||||||
|
|
||||||
releaseNotes.helmTemplate()
|
releaseNotes.HelmTemplate()
|
||||||
|
|
||||||
// update static manifest
|
// update static manifest
|
||||||
CheckIfError(updateStaticManifest(), "Error Updating Static manifests")
|
utils.CheckIfError(updateStaticManifest(), "Error Updating Static manifests")
|
||||||
|
|
||||||
////update e2e docs
|
////update e2e docs
|
||||||
updateE2EDocs()
|
mg.Deps(mg.F(Release.E2EDocs))
|
||||||
|
|
||||||
// update documentation with ingress-nginx version
|
// update documentation with ingress-nginx version
|
||||||
CheckIfError(updateIndexMD(releaseNotes.PreviousControllerVersion, releaseNotes.NewControllerVersion), "Error Updating %s", INDEX_DOCS)
|
utils.CheckIfError(updateIndexMD(releaseNotes.PreviousControllerVersion, releaseNotes.NewControllerVersion), "Error Updating %s", INDEX_DOCS)
|
||||||
|
|
||||||
// keeping these manual for now
|
// keeping these manual for now
|
||||||
// git commit TODO
|
// git commit TODO
|
||||||
|
@ -185,30 +153,22 @@ func (Release) NewRelease(version string) {
|
||||||
|
|
||||||
// the index.md doc needs the controller version updated
|
// the index.md doc needs the controller version updated
|
||||||
func updateIndexMD(old, new string) error {
|
func updateIndexMD(old, new string) error {
|
||||||
Info("Updating Deploy docs with new version")
|
utils.Info("Updating Deploy docs with new version")
|
||||||
data, err := os.ReadFile(INDEX_DOCS)
|
data, err := os.ReadFile(INDEX_DOCS)
|
||||||
CheckIfError(err, "Could not read INDEX_DOCS file %s", INDEX_DOCS)
|
utils.CheckIfError(err, "Could not read INDEX_DOCS file %s", INDEX_DOCS)
|
||||||
datString := string(data)
|
datString := string(data)
|
||||||
datString = strings.Replace(datString, old, new, -1)
|
datString = strings.Replace(datString, old, new, -1)
|
||||||
err = os.WriteFile(INDEX_DOCS, []byte(datString), 644)
|
err = os.WriteFile(INDEX_DOCS, []byte(datString), 644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorF("Could not write new %s %s", INDEX_DOCS, err)
|
utils.ErrorF("Could not write new %s %s", INDEX_DOCS, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// runs the hack/generate-deploy-scripts.sh
|
|
||||||
func updateE2EDocs() {
|
|
||||||
updates, err := sh.Output("./hack/generate-e2e-suite-doc.sh")
|
|
||||||
CheckIfError(err, "Could not run update hack script")
|
|
||||||
err = os.WriteFile("docs/e2e-tests.md", []byte(updates), 644)
|
|
||||||
CheckIfError(err, "Could not write new e2e test file ")
|
|
||||||
}
|
|
||||||
|
|
||||||
// The static deploy scripts use kustomize to generate them, this function ensures kustomize is installed
|
// The static deploy scripts use kustomize to generate them, this function ensures kustomize is installed
|
||||||
func installKustomize() error {
|
func installKustomize() error {
|
||||||
Info("Install Kustomize")
|
utils.Info("Install Kustomize")
|
||||||
g0 := sh.RunCmd("go")
|
g0 := sh.RunCmd("go")
|
||||||
// somewhere in your main code
|
// somewhere in your main code
|
||||||
err := g0("install", KUSTOMIZE_INSTALL_VERSION)
|
err := g0("install", KUSTOMIZE_INSTALL_VERSION)
|
||||||
|
@ -219,7 +179,7 @@ func installKustomize() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateStaticManifest() error {
|
func updateStaticManifest() error {
|
||||||
CheckIfError(installKustomize(), "error installing kustomize")
|
utils.CheckIfError(installKustomize(), "error installing kustomize")
|
||||||
// hack/generate-deploy-scripts.sh
|
// hack/generate-deploy-scripts.sh
|
||||||
err := sh.RunV("./hack/generate-deploy-scripts.sh")
|
err := sh.RunV("./hack/generate-deploy-scripts.sh")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -231,10 +191,10 @@ func updateStaticManifest() error {
|
||||||
//// CreateRelease Creates a new GitHub Release
|
//// CreateRelease Creates a new GitHub Release
|
||||||
//func (Release) CreateRelease(name string) {
|
//func (Release) CreateRelease(name string) {
|
||||||
// releaser, err := gh_release.NewReleaser(INGRESS_ORG, INGRESS_REPO, GITHUB_TOKEN)
|
// releaser, err := gh_release.NewReleaser(INGRESS_ORG, INGRESS_REPO, GITHUB_TOKEN)
|
||||||
// CheckIfError(err, "GitHub Release Client error")
|
// utils.CheckIfError(err, "GitHub Release Client error")
|
||||||
// newRelease, err := releaser.Create(fmt.Sprintf("controller-%s", name))
|
// newRelease, err := releaser.Create(fmt.Sprintf("controller-%s", name))
|
||||||
// CheckIfError(err, "Create release error")
|
// utils.CheckIfError(err, "Create release error")
|
||||||
// Info("New Release: Tag %v, ID: %v", newRelease.TagName, newRelease.ID)
|
// utils.Info("New Release: Tag %v, ID: %v", newRelease.TagName, newRelease.ID)
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// Returns a GitHub client ready for use
|
// Returns a GitHub client ready for use
|
||||||
|
@ -248,34 +208,44 @@ func githubClient() *github.Client {
|
||||||
|
|
||||||
// LatestCommitLogs Retrieves the commit log between the latest two controller versions.
|
// LatestCommitLogs Retrieves the commit log between the latest two controller versions.
|
||||||
func (Release) LatestCommitLogs() {
|
func (Release) LatestCommitLogs() {
|
||||||
commitLog := commitsBetweenTags()
|
commitLog := commitsBetweenTags("", "")
|
||||||
for i, s := range commitLog {
|
for i, s := range commitLog {
|
||||||
Info("#%v Version %v", i, s)
|
utils.Info("#%v Version %v", i, s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func commitsBetweenTags() []string {
|
func commitsBetweenTags(newversion, oldversion string) []string {
|
||||||
|
|
||||||
|
var newTag, oldTag string
|
||||||
tags := getAllControllerTags()
|
tags := getAllControllerTags()
|
||||||
Info("Getting Commits between %v and %v", tags[0], tags[1])
|
newTag, oldTag = tags[0], tags[1]
|
||||||
commitLog, err := git("log", "--full-history", "--pretty", "--oneline", fmt.Sprintf("%v..%v", tags[1], tags[0]))
|
if newversion != "" {
|
||||||
|
newTag = newversion
|
||||||
|
}
|
||||||
|
if oldversion != "" {
|
||||||
|
oldTag = oldversion
|
||||||
|
}
|
||||||
|
|
||||||
|
utils.Info("Getting Commits between %v and %v", newTag, oldTag)
|
||||||
|
commitLog, err := git("log", "--full-history", "--pretty", "--oneline", fmt.Sprintf("%v..%v", oldTag, newTag))
|
||||||
|
|
||||||
if commitLog == "" {
|
if commitLog == "" {
|
||||||
Warning("All Controller Tags is empty")
|
utils.Warning("All Controller Tags is empty")
|
||||||
}
|
}
|
||||||
CheckIfError(err, "Retrieving Commit log")
|
utils.CheckIfError(err, "Retrieving Commit log")
|
||||||
return strings.Split(commitLog, "\n")
|
return strings.Split(commitLog, "\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate Release Notes
|
// Generate Release Notes
|
||||||
func (Release) ReleaseNotes(newVersion string) error {
|
func (Release) ReleaseNotes(newVersion string) error {
|
||||||
notes, err := makeReleaseNotes(newVersion)
|
notes, err := makeReleaseNotes(newVersion, "")
|
||||||
CheckIfError(err, "Creating Release Notes for version %s", newVersion)
|
utils.CheckIfError(err, "Creating Release Notes for version %s", newVersion)
|
||||||
Info("Release Notes %s completed", notes.Version)
|
utils.Info("Release Notes %s completed", notes.Version)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeReleaseNotes(newVersion string) (*ReleaseNote, error) {
|
func makeReleaseNotes(newVersion, oldVersion string) (*utils.ReleaseNote, error) {
|
||||||
newReleaseNotes := ReleaseNote{}
|
newReleaseNotes := utils.ReleaseNote{}
|
||||||
|
|
||||||
newReleaseNotes.Version = newVersion
|
newReleaseNotes.Version = newVersion
|
||||||
allControllerTags := getAllControllerTags()
|
allControllerTags := getAllControllerTags()
|
||||||
|
@ -290,10 +260,13 @@ func makeReleaseNotes(newVersion string) (*ReleaseNote, error) {
|
||||||
}
|
}
|
||||||
// previous version
|
// previous version
|
||||||
newReleaseNotes.PreviousControllerVersion = allControllerTags[1]
|
newReleaseNotes.PreviousControllerVersion = allControllerTags[1]
|
||||||
|
if oldVersion != "" {
|
||||||
|
newReleaseNotes.PreviousControllerVersion = oldVersion
|
||||||
|
}
|
||||||
|
|
||||||
Info("New Version: %s Old Version: %s", newReleaseNotes.NewControllerVersion, newReleaseNotes.PreviousControllerVersion)
|
utils.Info("New Version: %s Old Version: %s", newReleaseNotes.NewControllerVersion, newReleaseNotes.PreviousControllerVersion)
|
||||||
|
|
||||||
commits := commitsBetweenTags()
|
commits := commitsBetweenTags(newReleaseNotes.NewControllerVersion, newReleaseNotes.PreviousControllerVersion)
|
||||||
|
|
||||||
// dependency_updates
|
// dependency_updates
|
||||||
// all_updates
|
// all_updates
|
||||||
|
@ -308,11 +281,11 @@ func makeReleaseNotes(newVersion string) (*ReleaseNote, error) {
|
||||||
if prRegex.Match([]byte(s)) {
|
if prRegex.Match([]byte(s)) {
|
||||||
// matches a dependant bot update
|
// matches a dependant bot update
|
||||||
if depBot.Match([]byte(s)) { //
|
if depBot.Match([]byte(s)) { //
|
||||||
Debug("#%v DEPENDABOT %v", i, s)
|
utils.Debug("#%v DEPENDABOT %v", i, s)
|
||||||
u := strings.SplitN(s, " ", 2)
|
u := strings.SplitN(s, " ", 2)
|
||||||
depUpdates = append(depUpdates, u[1])
|
depUpdates = append(depUpdates, u[1])
|
||||||
} else { // add it to the all updates slice
|
} else { // add it to the all updates slice
|
||||||
Debug("#%v ALL UPDATES %v", i, s)
|
utils.Debug("#%v ALL UPDATES %v", i, s)
|
||||||
u := strings.SplitN(s, " ", 2)
|
u := strings.SplitN(s, " ", 2)
|
||||||
allUpdates = append(allUpdates, u[1])
|
allUpdates = append(allUpdates, u[1])
|
||||||
|
|
||||||
|
@ -331,44 +304,44 @@ func makeReleaseNotes(newVersion string) (*ReleaseNote, error) {
|
||||||
newReleaseNotes.HelmUpdates = helmUpdates
|
newReleaseNotes.HelmUpdates = helmUpdates
|
||||||
|
|
||||||
// controller_image_digests
|
// controller_image_digests
|
||||||
imagesYaml, err := downloadFile(IMAGES_YAML)
|
imagesYaml, err := utils.DownloadFile(IMAGES_YAML)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorF("Could not download file %s : %s", IMAGES_YAML, err)
|
utils.ErrorF("Could not download file %s : %s", IMAGES_YAML, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
Debug("%s", imagesYaml)
|
utils.Debug("%s", imagesYaml)
|
||||||
|
|
||||||
data := ImageYamls{}
|
data := utils.ImageYamls{}
|
||||||
|
|
||||||
err = yaml.Unmarshal([]byte(imagesYaml), &data)
|
err = yaml.Unmarshal([]byte(imagesYaml), &data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorF("Could not unmarshal images yaml %s", err)
|
utils.ErrorF("Could not unmarshal images yaml %s", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// controller
|
// controller
|
||||||
controllerDigest := findImageDigest(data, "controller", newVersion)
|
controllerDigest := utils.FindImageDigest(data, "controller", newVersion)
|
||||||
if len(controllerDigest) == 0 {
|
if len(controllerDigest) == 0 {
|
||||||
ErrorF("Controller Digest could not be found")
|
utils.ErrorF("Controller Digest could not be found")
|
||||||
return nil, errors.New("Controller digest could not be found")
|
return nil, errors.New("Controller digest could not be found")
|
||||||
}
|
}
|
||||||
|
|
||||||
controllerChrootDigest := findImageDigest(data, "controller-chroot", newVersion)
|
controllerChrootDigest := utils.FindImageDigest(data, "controller-chroot", newVersion)
|
||||||
if len(controllerChrootDigest) == 0 {
|
if len(controllerChrootDigest) == 0 {
|
||||||
ErrorF("Controller Chroot Digest could not be found")
|
utils.ErrorF("Controller Chroot Digest could not be found")
|
||||||
return nil, errors.New("Controller Chroot digest could not be found")
|
return nil, errors.New("Controller Chroot digest could not be found")
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug("Latest Controller Digest %v", controllerDigest)
|
utils.Debug("Latest Controller Digest %v", controllerDigest)
|
||||||
Debug("Latest Controller Chroot Digest %v", controllerChrootDigest)
|
utils.Debug("Latest Controller Chroot Digest %v", controllerChrootDigest)
|
||||||
c1 := ControllerImage{
|
c1 := utils.ControllerImage{
|
||||||
Digest: controllerDigest,
|
Digest: controllerDigest,
|
||||||
Registry: INGRESS_REGISTRY,
|
Registry: INGRESS_REGISTRY,
|
||||||
Name: "ingress-nginx/controller",
|
Name: "ingress-nginx/controller",
|
||||||
Tag: fmt.Sprintf("v%s", newReleaseNotes.Version),
|
Tag: fmt.Sprintf("v%s", newReleaseNotes.Version),
|
||||||
}
|
}
|
||||||
|
|
||||||
c2 := ControllerImage{
|
c2 := utils.ControllerImage{
|
||||||
Digest: controllerChrootDigest,
|
Digest: controllerChrootDigest,
|
||||||
Registry: INGRESS_REGISTRY,
|
Registry: INGRESS_REGISTRY,
|
||||||
Name: "ingress-nginx/controller-chroot",
|
Name: "ingress-nginx/controller-chroot",
|
||||||
|
@ -377,141 +350,37 @@ func makeReleaseNotes(newVersion string) (*ReleaseNote, error) {
|
||||||
|
|
||||||
newReleaseNotes.ControllerImages = append(newReleaseNotes.ControllerImages, c1)
|
newReleaseNotes.ControllerImages = append(newReleaseNotes.ControllerImages, c1)
|
||||||
newReleaseNotes.ControllerImages = append(newReleaseNotes.ControllerImages, c2)
|
newReleaseNotes.ControllerImages = append(newReleaseNotes.ControllerImages, c2)
|
||||||
Debug("New Release Controller Images %s %s", newReleaseNotes.ControllerImages[0].Digest, newReleaseNotes.ControllerImages[1].Digest)
|
utils.Debug("New Release Controller Images %s %s", newReleaseNotes.ControllerImages[0].Digest, newReleaseNotes.ControllerImages[1].Digest)
|
||||||
|
|
||||||
if DEBUG {
|
if utils.DEBUG {
|
||||||
newReleaseNotes.printRelease()
|
newReleaseNotes.PrintRelease()
|
||||||
}
|
}
|
||||||
|
|
||||||
// write it all out to the changelog file
|
// write it all out to the changelog file
|
||||||
newReleaseNotes.template()
|
newReleaseNotes.Template()
|
||||||
|
|
||||||
return &newReleaseNotes, nil
|
return &newReleaseNotes, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i ControllerImage) print() string {
|
|
||||||
return fmt.Sprintf("%s/%s:%s@%s", i.Registry, i.Name, i.Tag, i.Digest)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r ReleaseNote) template() {
|
|
||||||
// Files are provided as a slice of strings.
|
|
||||||
changelogTemplate, err := os.ReadFile("Changelog.md.gotmpl")
|
|
||||||
if err != nil {
|
|
||||||
ErrorF("Could not read changelog template file %s", err)
|
|
||||||
}
|
|
||||||
Debug("ChangeLog Templates %s", string(changelogTemplate))
|
|
||||||
t := template.Must(template.New("changelog").Parse(string(changelogTemplate)))
|
|
||||||
// create a new file
|
|
||||||
file, err := os.Create(fmt.Sprintf("changelog/Changelog-%s.md", r.Version))
|
|
||||||
if err != nil {
|
|
||||||
ErrorF("Could not create changelog file %s", err)
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
err = t.Execute(file, r)
|
|
||||||
if err != nil {
|
|
||||||
ErrorF("executing template:", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r ReleaseNote) helmTemplate() {
|
|
||||||
// Files are provided as a slice of strings.
|
|
||||||
changelogTemplate, err := os.ReadFile("charts/ingress-nginx/changelog.md.gotmpl")
|
|
||||||
if err != nil {
|
|
||||||
ErrorF("Could not read changelog template file %s", err)
|
|
||||||
}
|
|
||||||
Debug("ChangeLog Templates %s", string(changelogTemplate))
|
|
||||||
t := template.Must(template.New("changelog").Parse(string(changelogTemplate)))
|
|
||||||
// create a new file
|
|
||||||
file, err := os.Create(fmt.Sprintf("charts/ingress-nginx/changelog/Changelog-%s.md", r.NewHelmChartVersion))
|
|
||||||
if err != nil {
|
|
||||||
ErrorF("Could not create changelog file %s", err)
|
|
||||||
}
|
|
||||||
defer file.Close()
|
|
||||||
|
|
||||||
err = t.Execute(file, r)
|
|
||||||
if err != nil {
|
|
||||||
ErrorF("executing template:", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r ReleaseNote) printRelease() {
|
|
||||||
Info("Release Version: %v", r.NewControllerVersion)
|
|
||||||
Info("Previous Version: %v", r.PreviousControllerVersion)
|
|
||||||
Info("Controller Image: %v", r.ControllerImages[0].print())
|
|
||||||
Info("Controller Chroot Image: %v", r.ControllerImages[1].print())
|
|
||||||
for i := range r.Updates {
|
|
||||||
Info("Update #%v - %v", i, r.Updates[i])
|
|
||||||
}
|
|
||||||
for j := range r.DepUpdates {
|
|
||||||
Info("Dependabot Update #%v - %v", j, r.DepUpdates[j])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func findImageDigest(yaml ImageYamls, image, version string) string {
|
|
||||||
version = fmt.Sprintf("v%s", version)
|
|
||||||
Info("Searching Digest for %s:%s", image, version)
|
|
||||||
for i := range yaml {
|
|
||||||
if yaml[i].Name == image {
|
|
||||||
for k, v := range yaml[i].Dmap {
|
|
||||||
if v[0] == version {
|
|
||||||
return k
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func downloadFile(url string) (string, error) {
|
|
||||||
client := &http.Client{
|
|
||||||
Transport: &http.Transport{
|
|
||||||
DialContext: (&net.Dialer{
|
|
||||||
Timeout: 5 * time.Second,
|
|
||||||
KeepAlive: 5 * time.Second,
|
|
||||||
}).DialContext,
|
|
||||||
TLSHandshakeTimeout: 5 * time.Second,
|
|
||||||
ResponseHeaderTimeout: 5 * time.Second,
|
|
||||||
ExpectContinueTimeout: 1 * time.Second,
|
|
||||||
MaxIdleConnsPerHost: -1,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
resp, err := client.Get(url)
|
|
||||||
if err != nil {
|
|
||||||
return "", nil
|
|
||||||
}
|
|
||||||
defer resp.Body.Close()
|
|
||||||
|
|
||||||
if resp.StatusCode != http.StatusOK {
|
|
||||||
return "", errors.New(fmt.Sprintf("Could not retrieve file, response from server %s for file %s", resp.StatusCode, url))
|
|
||||||
}
|
|
||||||
bodyBytes, err := io.ReadAll(resp.Body)
|
|
||||||
if err != nil {
|
|
||||||
return "", nil
|
|
||||||
}
|
|
||||||
return string(bodyBytes), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Latest returns latest Github Release
|
// Latest returns latest Github Release
|
||||||
func (Release) Latest() error {
|
func (Release) Latest() error {
|
||||||
r, _, err := latestRelease()
|
r, _, err := latestRelease()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorF("Latest Release error %s", err)
|
utils.ErrorF("Latest Release error %s", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
Info("Latest Release %v", r.String())
|
utils.Info("Latest Release %v", r.String())
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Release) ReleaseByTag(tag string) error {
|
func (Release) ReleaseByTag(tag string) error {
|
||||||
r, _, err := releaseByTag(tag)
|
r, _, err := releaseByTag(tag)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorF("Release retrieve tag error %s", tag, err)
|
utils.ErrorF("Release retrieve tag %s error %s", tag, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
Info("Latest Release %v", r.String())
|
utils.Info("Latest Release %v", r.String())
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -525,31 +394,3 @@ func latestRelease() (*github.RepositoryRelease, *github.Response, error) {
|
||||||
ghClient := githubClient()
|
ghClient := githubClient()
|
||||||
return ghClient.Repositories.GetLatestRelease(ctx, INGRESS_ORG, INGRESS_REPO)
|
return ghClient.Repositories.GetLatestRelease(ctx, INGRESS_ORG, INGRESS_REPO)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy Test function to copy a release
|
|
||||||
func (Release) Copy() error {
|
|
||||||
ghClient := githubClient()
|
|
||||||
kRelease, _, err := ghClient.Repositories.GetLatestRelease(ctx, "kubernetes", "ingress-nginx")
|
|
||||||
if err != nil {
|
|
||||||
ErrorF("Get Release from kubernetes %s", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
sRelease := &github.RepositoryRelease{
|
|
||||||
TagName: kRelease.TagName,
|
|
||||||
Name: kRelease.Name,
|
|
||||||
Body: kRelease.Body,
|
|
||||||
Draft: kRelease.Draft,
|
|
||||||
Prerelease: kRelease.GenerateReleaseNotes,
|
|
||||||
DiscussionCategoryName: kRelease.DiscussionCategoryName,
|
|
||||||
GenerateReleaseNotes: kRelease.GenerateReleaseNotes,
|
|
||||||
}
|
|
||||||
|
|
||||||
sRelease, _, err = ghClient.Repositories.CreateRelease(ctx, "strongjz", "ingress-nginx", sRelease)
|
|
||||||
if err != nil {
|
|
||||||
ErrorF("Creating Strongjz release %s", err)
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
Info("Copied over Kubernetes Release %v to Strongjz %v", &kRelease.Name, &sRelease.Name)
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,5 +1,3 @@
|
||||||
//go:build mage
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2023 The Kubernetes Authors.
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -16,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package steps
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -26,6 +24,8 @@ import (
|
||||||
semver "github.com/blang/semver/v4"
|
semver "github.com/blang/semver/v4"
|
||||||
"github.com/magefile/mage/mg"
|
"github.com/magefile/mage/mg"
|
||||||
"github.com/magefile/mage/sh"
|
"github.com/magefile/mage/sh"
|
||||||
|
|
||||||
|
utils "k8s.io/ingress-nginx/magefiles/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Tag mg.Namespace
|
type Tag mg.Namespace
|
||||||
|
@ -35,13 +35,13 @@ var git = sh.OutCmd("git")
|
||||||
// Nginx returns the ingress-nginx current version
|
// Nginx returns the ingress-nginx current version
|
||||||
func (Tag) Nginx() {
|
func (Tag) Nginx() {
|
||||||
tag, err := getIngressNGINXVersion()
|
tag, err := getIngressNGINXVersion()
|
||||||
CheckIfError(err, "")
|
utils.CheckIfError(err, "")
|
||||||
fmt.Printf("%v", tag)
|
fmt.Printf("%v", tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getIngressNGINXVersion() (string, error) {
|
func getIngressNGINXVersion() (string, error) {
|
||||||
dat, err := os.ReadFile("TAG")
|
dat, err := os.ReadFile("TAG")
|
||||||
CheckIfError(err, "Could not read TAG file")
|
utils.CheckIfError(err, "Could not read TAG file")
|
||||||
datString := string(dat)
|
datString := string(dat)
|
||||||
// remove newline
|
// remove newline
|
||||||
datString = strings.Replace(datString, "\n", "", -1)
|
datString = strings.Replace(datString, "\n", "", -1)
|
||||||
|
@ -49,21 +49,21 @@ func getIngressNGINXVersion() (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkSemVer(currentVersion, newVersion string) bool {
|
func checkSemVer(currentVersion, newVersion string) bool {
|
||||||
Info("Checking Sem Ver between current %s and new %s", currentVersion, newVersion)
|
utils.Info("Checking Sem Ver between current %s and new %s", currentVersion, newVersion)
|
||||||
cVersion, err := semver.Make(currentVersion[1:])
|
cVersion, err := semver.Make(currentVersion[1:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorF("TAG Error Current Tag %v Making Semver : %v", currentVersion[1:], err)
|
utils.ErrorF("TAG Error Current Tag %v Making Semver : %v", currentVersion[1:], err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
nVersion, err := semver.Make(newVersion)
|
nVersion, err := semver.Make(newVersion)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorF("TAG %v Error Making Semver %v \n", newVersion, err)
|
utils.ErrorF("TAG %v Error Making Semver %v \n", newVersion, err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
err = nVersion.Validate()
|
err = nVersion.Validate()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ErrorF("TAG %v not a valid Semver %v \n", newVersion, err)
|
utils.ErrorF("TAG %v not a valid Semver %v \n", newVersion, err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,10 +71,10 @@ func checkSemVer(currentVersion, newVersion string) bool {
|
||||||
//0 if newVersion == currentVersion
|
//0 if newVersion == currentVersion
|
||||||
//-1 if newVersion < currentVersion
|
//-1 if newVersion < currentVersion
|
||||||
//+1 if newVersion > currentVersion.
|
//+1 if newVersion > currentVersion.
|
||||||
Info("TAG Comparing Old %s to New %s", cVersion.String(), nVersion.String())
|
utils.Info("TAG Comparing Old %s to New %s", cVersion.String(), nVersion.String())
|
||||||
comp := nVersion.Compare(cVersion)
|
comp := nVersion.Compare(cVersion)
|
||||||
if comp <= 0 {
|
if comp <= 0 {
|
||||||
Warning("SemVer:%v is not an update\n", newVersion)
|
utils.Warning("SemVer:%v is not an update\n", newVersion)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
@ -82,29 +82,29 @@ func checkSemVer(currentVersion, newVersion string) bool {
|
||||||
|
|
||||||
// BumpNginx will update the nginx TAG
|
// BumpNginx will update the nginx TAG
|
||||||
func (Tag) BumpNginx(newTag string) {
|
func (Tag) BumpNginx(newTag string) {
|
||||||
Info("TAG BumpNginx version %v", newTag)
|
utils.Info("TAG BumpNginx version %v", newTag)
|
||||||
currentTag, err := getIngressNGINXVersion()
|
currentTag, err := getIngressNGINXVersion()
|
||||||
CheckIfError(err, "Getting Ingress-nginx Version")
|
utils.CheckIfError(err, "Getting Ingress-nginx Version")
|
||||||
bump(currentTag, newTag)
|
bump(currentTag, newTag)
|
||||||
}
|
}
|
||||||
|
|
||||||
func bump(currentTag, newTag string) {
|
func bump(currentTag, newTag string) {
|
||||||
// check if semver is valid
|
// check if semver is valid
|
||||||
if !checkSemVer(currentTag, newTag) {
|
if !checkSemVer(currentTag, newTag) {
|
||||||
ErrorF("ERROR: Semver is not valid %v", newTag)
|
utils.ErrorF("ERROR: Semver is not valid %v", newTag)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
Info("Updating Tag %v to %v", currentTag, newTag)
|
utils.Info("Updating Tag %v to %v", currentTag, newTag)
|
||||||
err := os.WriteFile("TAG", []byte(newTag), 0o666)
|
err := os.WriteFile("TAG", []byte(newTag), 0o666)
|
||||||
CheckIfError(err, "Error Writing New Tag File")
|
utils.CheckIfError(err, "Error Writing New Tag File")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Git Returns the latest git tag
|
// Git Returns the latest git tag
|
||||||
func (Tag) Git() {
|
func (Tag) Git() {
|
||||||
tag, err := getGitTag()
|
tag, err := getGitTag()
|
||||||
CheckIfError(err, "Retrieving Git Tag")
|
utils.CheckIfError(err, "Retrieving Git Tag")
|
||||||
Info("Git tag: %v", tag)
|
utils.Info("Git tag: %v", tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getGitTag() (string, error) {
|
func getGitTag() (string, error) {
|
||||||
|
@ -113,10 +113,10 @@ func getGitTag() (string, error) {
|
||||||
|
|
||||||
// ControllerTag Creates a new Git Tag for the ingress controller
|
// ControllerTag Creates a new Git Tag for the ingress controller
|
||||||
func (Tag) NewControllerTag(version string) {
|
func (Tag) NewControllerTag(version string) {
|
||||||
Info("Create Ingress Nginx Controller Tag v%s", version)
|
utils.Info("Create Ingress Nginx Controller Tag v%s", version)
|
||||||
tag, err := controllerTag(version)
|
tag, err := controllerTag(version)
|
||||||
CheckIfError(err, "Creating git tag")
|
utils.CheckIfError(err, "Creating git tag")
|
||||||
Debug("Git Tag: %s", tag)
|
utils.Debug("Git Tag: %s", tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
func controllerTag(version string) (string, error) {
|
func controllerTag(version string) (string, error) {
|
||||||
|
@ -126,22 +126,22 @@ func controllerTag(version string) (string, error) {
|
||||||
func (Tag) AllControllerTags() {
|
func (Tag) AllControllerTags() {
|
||||||
tags := getAllControllerTags()
|
tags := getAllControllerTags()
|
||||||
for i, s := range tags {
|
for i, s := range tags {
|
||||||
Info("#%v Version %v", i, s)
|
utils.Info("#%v Version %v", i, s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getAllControllerTags() []string {
|
func getAllControllerTags() []string {
|
||||||
allControllerTags, err := git("tag", "-l", "--sort=-v:refname", "controller-v*")
|
allControllerTags, err := git("tag", "-l", "--sort=-v:refname", "controller-v*")
|
||||||
CheckIfError(err, "Retrieving git tags")
|
utils.CheckIfError(err, "Retrieving git tags")
|
||||||
if !sh.CmdRan(err) {
|
if !sh.CmdRan(err) {
|
||||||
Warning("Issue Running Command")
|
utils.Warning("Issue Running Command")
|
||||||
}
|
}
|
||||||
if allControllerTags == "" {
|
if allControllerTags == "" {
|
||||||
Warning("All Controller Tags is empty")
|
utils.Warning("All Controller Tags is empty")
|
||||||
}
|
}
|
||||||
Debug("Controller Tags: %v", allControllerTags)
|
utils.Debug("Controller Tags: %v", allControllerTags)
|
||||||
|
|
||||||
temp := strings.Split(allControllerTags, "\n")
|
temp := strings.Split(allControllerTags, "\n")
|
||||||
Debug("There are %v controller tags", len(temp))
|
utils.Debug("There are %v controller tags", len(temp))
|
||||||
return temp
|
return temp
|
||||||
}
|
}
|
|
@ -1,5 +1,3 @@
|
||||||
//go:build mage
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2023 The Kubernetes Authors.
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -16,10 +14,14 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"net"
|
||||||
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
@ -80,3 +82,32 @@ func Debug(format string, args ...interface{}) {
|
||||||
func ErrorF(format string, args ...interface{}) {
|
func ErrorF(format string, args ...interface{}) {
|
||||||
fmt.Printf("\x1b[31;1m%s ERROR: %s\x1b[0m\n", timeStamp(), fmt.Sprintf(format, args...))
|
fmt.Printf("\x1b[31;1m%s ERROR: %s\x1b[0m\n", timeStamp(), fmt.Sprintf(format, args...))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DownloadFile(url string) (string, error) {
|
||||||
|
client := &http.Client{
|
||||||
|
Transport: &http.Transport{
|
||||||
|
DialContext: (&net.Dialer{
|
||||||
|
Timeout: 5 * time.Second,
|
||||||
|
KeepAlive: 5 * time.Second,
|
||||||
|
}).DialContext,
|
||||||
|
TLSHandshakeTimeout: 5 * time.Second,
|
||||||
|
ResponseHeaderTimeout: 5 * time.Second,
|
||||||
|
ExpectContinueTimeout: 1 * time.Second,
|
||||||
|
MaxIdleConnsPerHost: -1,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
resp, err := client.Get(url)
|
||||||
|
if err != nil {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
defer resp.Body.Close()
|
||||||
|
|
||||||
|
if resp.StatusCode != http.StatusOK {
|
||||||
|
return "", errors.New(fmt.Sprintf("could not retrieve file, response from server %d for file %s", resp.StatusCode, url))
|
||||||
|
}
|
||||||
|
bodyBytes, err := io.ReadAll(resp.Body)
|
||||||
|
if err != nil {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
return string(bodyBytes), nil
|
||||||
|
}
|
68
magefiles/utils/controller.go
Normal file
68
magefiles/utils/controller.go
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
/*
|
||||||
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/google/go-github/v48/github"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ControllerImage - struct with info about controllers
|
||||||
|
type ControllerImage struct {
|
||||||
|
Tag string
|
||||||
|
Digest string
|
||||||
|
Registry string
|
||||||
|
Name string
|
||||||
|
}
|
||||||
|
|
||||||
|
// IngressRelease All the information about an ingress-nginx release that gets updated
|
||||||
|
type IngressRelease struct {
|
||||||
|
ControllerVersion string
|
||||||
|
ControllerImage ControllerImage
|
||||||
|
ReleaseNote ReleaseNote
|
||||||
|
Release *github.RepositoryRelease
|
||||||
|
}
|
||||||
|
|
||||||
|
// IMAGES_YAML returns this data structure
|
||||||
|
type ImageYamls []ImageElement
|
||||||
|
|
||||||
|
// ImageElement - a specific image and it's data structure the dmap is a list of shas and container versions
|
||||||
|
type ImageElement struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Dmap map[string][]string `json:"dmap"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (i ControllerImage) print() string {
|
||||||
|
return fmt.Sprintf("%s/%s:%s@%s", i.Registry, i.Name, i.Tag, i.Digest)
|
||||||
|
}
|
||||||
|
|
||||||
|
func FindImageDigest(yaml ImageYamls, image, version string) string {
|
||||||
|
version = fmt.Sprintf("v%s", version)
|
||||||
|
Info("Searching Digest for %s:%s", image, version)
|
||||||
|
for i := range yaml {
|
||||||
|
if yaml[i].Name == image {
|
||||||
|
for k, v := range yaml[i].Dmap {
|
||||||
|
if v[0] == version {
|
||||||
|
return k
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
140
magefiles/utils/e2edocs.go
Normal file
140
magefiles/utils/e2edocs.go
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
/*
|
||||||
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bufio"
|
||||||
|
"bytes"
|
||||||
|
"embed"
|
||||||
|
"fmt"
|
||||||
|
"io/fs"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"regexp"
|
||||||
|
"strings"
|
||||||
|
"text/template"
|
||||||
|
|
||||||
|
"slices"
|
||||||
|
)
|
||||||
|
|
||||||
|
//go:embed templates/e2edocs.tpl
|
||||||
|
var tplContent embed.FS
|
||||||
|
|
||||||
|
var (
|
||||||
|
skipFiles = []string{
|
||||||
|
"test/e2e/framework/framework.go",
|
||||||
|
"test/e2e/e2e.go",
|
||||||
|
"test/e2e/e2e_test.go",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
testDir = "test/e2e"
|
||||||
|
describe = "Describe"
|
||||||
|
URL = "https://github.com/kubernetes/ingress-nginx/tree/main/"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
betweenquotes = regexp.MustCompile(`("|\')(?P<TestDescription>.*)("|\')`)
|
||||||
|
)
|
||||||
|
|
||||||
|
type E2ETemplate struct {
|
||||||
|
URL string
|
||||||
|
Tests []string
|
||||||
|
}
|
||||||
|
|
||||||
|
func getDescription(linetext, path, url string, lineN int, isDescription bool) string {
|
||||||
|
var descriptionLine string
|
||||||
|
prefix := "-"
|
||||||
|
if isDescription {
|
||||||
|
prefix = "###"
|
||||||
|
}
|
||||||
|
|
||||||
|
matches := betweenquotes.FindStringSubmatch(linetext)
|
||||||
|
contentIndex := betweenquotes.SubexpIndex("TestDescription")
|
||||||
|
if len(matches) < 2 || contentIndex == -1 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
fileName := fmt.Sprintf("%s/%s", url, path)
|
||||||
|
descriptionLine = fmt.Sprintf("%s [%s](%s#L%d)", prefix, matches[contentIndex], fileName, lineN)
|
||||||
|
|
||||||
|
return descriptionLine
|
||||||
|
}
|
||||||
|
|
||||||
|
func containsGinkgoTest(line string) bool {
|
||||||
|
if !strings.Contains(line, describe) && !strings.Contains(line, "It") {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return strings.Contains(line, "func() {")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *E2ETemplate) walkE2eDir(path string, d fs.DirEntry, errAggregated error) error {
|
||||||
|
if errAggregated != nil {
|
||||||
|
return errAggregated
|
||||||
|
}
|
||||||
|
// Remove ignored files or non .go files
|
||||||
|
if d.IsDir() || slices.Contains(skipFiles, path) || !strings.HasSuffix(path, ".go") {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
content, err := os.ReadFile(path)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
fileScanner := bufio.NewScanner(bytes.NewReader(content))
|
||||||
|
|
||||||
|
fileScanner.Split(bufio.ScanLines)
|
||||||
|
|
||||||
|
tests := make([]string, 0)
|
||||||
|
var lineN = 0
|
||||||
|
for fileScanner.Scan() {
|
||||||
|
lineN = lineN + 1
|
||||||
|
if !containsGinkgoTest(fileScanner.Text()) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
line := getDescription(fileScanner.Text(), path, t.URL, lineN, strings.Contains(fileScanner.Text(), describe))
|
||||||
|
if line != "" {
|
||||||
|
tests = append(tests, line)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
t.Tests = append(t.Tests, tests...)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func GenerateE2EDocs() (string, error) {
|
||||||
|
e2etpl := &E2ETemplate{URL: URL}
|
||||||
|
err := filepath.WalkDir(testDir, e2etpl.walkE2eDir)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
tmpl, err := template.New("e2edocs.tpl").ParseFS(tplContent, "templates/e2edocs.tpl")
|
||||||
|
if err != nil {
|
||||||
|
return "", fmt.Errorf("error parsing the template file: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
tplBuff := new(bytes.Buffer)
|
||||||
|
err = tmpl.Execute(tplBuff, e2etpl)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return tplBuff.String(), nil
|
||||||
|
|
||||||
|
}
|
|
@ -1,5 +1,3 @@
|
||||||
//go:build mage
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Copyright 2023 The Kubernetes Authors.
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
|
@ -16,178 +14,7 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package utils
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
semver "github.com/blang/semver/v4"
|
|
||||||
"github.com/helm/helm/pkg/chartutil"
|
|
||||||
"github.com/magefile/mage/mg"
|
|
||||||
"github.com/magefile/mage/sh"
|
|
||||||
yamlpath "github.com/vmware-labs/yaml-jsonpath/pkg/yamlpath"
|
|
||||||
"gopkg.in/yaml.v3"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
HelmChartPath = "charts/ingress-nginx/Chart.yaml"
|
|
||||||
HelmChartValues = "charts/ingress-nginx/values.yaml"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Helm mg.Namespace
|
|
||||||
|
|
||||||
// UpdateAppVersion Updates the Helm App Version of Ingress Nginx Controller
|
|
||||||
func (Helm) UpdateAppVersion() {
|
|
||||||
updateAppVersion()
|
|
||||||
}
|
|
||||||
|
|
||||||
func updateAppVersion() {
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateVersion Update Helm Version of the Chart
|
|
||||||
func (Helm) UpdateVersion(version string) {
|
|
||||||
updateVersion(version)
|
|
||||||
}
|
|
||||||
|
|
||||||
func currentChartVersion() string {
|
|
||||||
chart, err := chartutil.LoadChartfile(HelmChartPath)
|
|
||||||
CheckIfError(err, "HELM Could not Load Chart")
|
|
||||||
return chart.Version
|
|
||||||
}
|
|
||||||
|
|
||||||
func currentChartAppVersion() string {
|
|
||||||
chart, err := chartutil.LoadChartfile(HelmChartPath)
|
|
||||||
CheckIfError(err, "HELM Could not Load Chart")
|
|
||||||
return chart.AppVersion
|
|
||||||
}
|
|
||||||
|
|
||||||
func updateVersion(version string) {
|
|
||||||
Info("HELM Reading File %v", HelmChartPath)
|
|
||||||
|
|
||||||
chart, err := chartutil.LoadChartfile(HelmChartPath)
|
|
||||||
CheckIfError(err, "HELM Could not Load Chart")
|
|
||||||
|
|
||||||
// Get the current tag
|
|
||||||
// appVersionV, err := getIngressNGINXVersion()
|
|
||||||
// CheckIfError(err, "HELM Issue Retrieving the Current Ingress Nginx Version")
|
|
||||||
|
|
||||||
// remove the v from TAG
|
|
||||||
appVersion := version
|
|
||||||
|
|
||||||
Info("HELM Ingress-Nginx App Version: %s Chart AppVersion: %s", appVersion, chart.AppVersion)
|
|
||||||
if appVersion == chart.AppVersion {
|
|
||||||
Warning("HELM Ingress NGINX Version didnt change Ingress-Nginx App Version: %s Chart AppVersion: %s", appVersion, chart.AppVersion)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the helm chart
|
|
||||||
chart.AppVersion = appVersion
|
|
||||||
cTag, err := semver.Make(chart.Version)
|
|
||||||
CheckIfError(err, "HELM Creating Chart Version: %v", err)
|
|
||||||
|
|
||||||
if err = cTag.IncrementPatch(); err != nil {
|
|
||||||
ErrorF("HELM Incrementing Chart Version: %v", err)
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
chart.Version = cTag.String()
|
|
||||||
Debug("HELM Updated Chart Version: %v", chart.Version)
|
|
||||||
|
|
||||||
err = chartutil.SaveChartfile(HelmChartPath, chart)
|
|
||||||
CheckIfError(err, "HELM Saving new Chart")
|
|
||||||
}
|
|
||||||
|
|
||||||
func updateChartReleaseNotes(releasesNotes []string) {
|
|
||||||
Info("HELM Updating the Chart Release notes")
|
|
||||||
chart, err := chartutil.LoadChartfile(HelmChartPath)
|
|
||||||
CheckIfError(err, "HELM Could not Load Chart to update release notes %s", HelmChartPath)
|
|
||||||
var releaseNoteString string
|
|
||||||
for i := range releasesNotes {
|
|
||||||
releaseNoteString = fmt.Sprintf("%s - \"%s\"\n", releaseNoteString, releasesNotes[i])
|
|
||||||
}
|
|
||||||
Info("HELM Release note string %s", releaseNoteString)
|
|
||||||
chart.Annotations["artifacthub.io/changes"] = releaseNoteString
|
|
||||||
err = chartutil.SaveChartfile(HelmChartPath, chart)
|
|
||||||
CheckIfError(err, "HELM Saving updated release notes for Chart")
|
|
||||||
}
|
|
||||||
|
|
||||||
func UpdateChartChangelog() {
|
|
||||||
}
|
|
||||||
|
|
||||||
// UpdateChartValue Updates the Helm ChartValue
|
|
||||||
func (Helm) UpdateChartValue(key, value string) {
|
|
||||||
updateChartValue(key, value)
|
|
||||||
}
|
|
||||||
|
|
||||||
func updateChartValue(key, value string) {
|
|
||||||
Info("HELM Updating Chart %s %s:%s", HelmChartValues, key, value)
|
|
||||||
|
|
||||||
// read current values.yaml
|
|
||||||
data, err := os.ReadFile(HelmChartValues)
|
|
||||||
CheckIfError(err, "HELM Could not Load Helm Chart Values files %s", HelmChartValues)
|
|
||||||
|
|
||||||
// var valuesStruct IngressChartValue
|
|
||||||
var n yaml.Node
|
|
||||||
CheckIfError(yaml.Unmarshal(data, &n), "HELM Could not Unmarshal %s", HelmChartValues)
|
|
||||||
|
|
||||||
// update value
|
|
||||||
// keyParse := parsePath(key)
|
|
||||||
p, err := yamlpath.NewPath(key)
|
|
||||||
CheckIfError(err, "HELM cannot create path")
|
|
||||||
|
|
||||||
q, err := p.Find(&n)
|
|
||||||
CheckIfError(err, "HELM unexpected error finding path")
|
|
||||||
|
|
||||||
for _, i := range q {
|
|
||||||
Info("HELM Found %s at %s", i.Value, key)
|
|
||||||
i.Value = value
|
|
||||||
Info("HELM Updated %s at %s", i.Value, key)
|
|
||||||
}
|
|
||||||
|
|
||||||
//// write to file
|
|
||||||
var b bytes.Buffer
|
|
||||||
yamlEncoder := yaml.NewEncoder(&b)
|
|
||||||
yamlEncoder.SetIndent(2)
|
|
||||||
err = yamlEncoder.Encode(&n)
|
|
||||||
CheckIfError(err, "HELM Could not Marshal new Values file")
|
|
||||||
err = os.WriteFile(HelmChartValues, b.Bytes(), 0o644)
|
|
||||||
CheckIfError(err, "HELM Could not write new Values file to %s", HelmChartValues)
|
|
||||||
|
|
||||||
Info("HELM Ingress Nginx Helm Chart update %s %s", key, value)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (Helm) Helmdocs() error {
|
|
||||||
return runHelmDocs()
|
|
||||||
}
|
|
||||||
|
|
||||||
func runHelmDocs() error {
|
|
||||||
err := installHelmDocs()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
err = sh.RunV("helm-docs", "--chart-search-root=${PWD}/charts")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func installHelmDocs() error {
|
|
||||||
Info("HELM Install HelmDocs")
|
|
||||||
g0 := sh.RunCmd("go")
|
|
||||||
|
|
||||||
err := g0("install", "github.com/norwoodj/helm-docs/cmd/helm-docs@v1.11.0")
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func parsePath(key string) []string { return strings.Split(key, ".") }
|
|
||||||
|
|
||||||
func updateHelmDocs() {
|
|
||||||
}
|
|
||||||
|
|
||||||
type IngressChartValue struct {
|
type IngressChartValue struct {
|
||||||
CommonLabels struct{} `yaml:"commonLabels"`
|
CommonLabels struct{} `yaml:"commonLabels"`
|
91
magefiles/utils/releasenote.go
Normal file
91
magefiles/utils/releasenote.go
Normal file
|
@ -0,0 +1,91 @@
|
||||||
|
/*
|
||||||
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package utils
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"text/template"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ReleaseNote - All the pieces of information/documents that get updated during a release
|
||||||
|
type ReleaseNote struct {
|
||||||
|
Version string
|
||||||
|
NewControllerVersion string
|
||||||
|
PreviousControllerVersion string
|
||||||
|
ControllerImages []ControllerImage
|
||||||
|
DepUpdates []string
|
||||||
|
Updates []string
|
||||||
|
HelmUpdates []string
|
||||||
|
NewHelmChartVersion string
|
||||||
|
PreviousHelmChartVersion string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ReleaseNote) Template() {
|
||||||
|
// Files are provided as a slice of strings.
|
||||||
|
changelogTemplate, err := os.ReadFile("Changelog.md.gotmpl")
|
||||||
|
if err != nil {
|
||||||
|
ErrorF("Could not read changelog template file %s", err)
|
||||||
|
}
|
||||||
|
Debug("ChangeLog Templates %s", string(changelogTemplate))
|
||||||
|
t := template.Must(template.New("changelog").Parse(string(changelogTemplate)))
|
||||||
|
// create a new file
|
||||||
|
file, err := os.Create(fmt.Sprintf("changelog/Changelog-%s.md", r.Version))
|
||||||
|
if err != nil {
|
||||||
|
ErrorF("Could not create changelog file %s", err)
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
err = t.Execute(file, r)
|
||||||
|
if err != nil {
|
||||||
|
ErrorF("executing template: %s", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ReleaseNote) HelmTemplate() {
|
||||||
|
// Files are provided as a slice of strings.
|
||||||
|
changelogTemplate, err := os.ReadFile("charts/ingress-nginx/changelog.md.gotmpl")
|
||||||
|
if err != nil {
|
||||||
|
ErrorF("Could not read changelog template file %s", err)
|
||||||
|
}
|
||||||
|
Debug("ChangeLog Templates %s", string(changelogTemplate))
|
||||||
|
t := template.Must(template.New("changelog").Parse(string(changelogTemplate)))
|
||||||
|
// create a new file
|
||||||
|
file, err := os.Create(fmt.Sprintf("charts/ingress-nginx/changelog/Changelog-%s.md", r.NewHelmChartVersion))
|
||||||
|
if err != nil {
|
||||||
|
ErrorF("Could not create changelog file %s", err)
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
err = t.Execute(file, r)
|
||||||
|
if err != nil {
|
||||||
|
ErrorF("executing template: %s", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r ReleaseNote) PrintRelease() {
|
||||||
|
Info("Release Version: %v", r.NewControllerVersion)
|
||||||
|
Info("Previous Version: %v", r.PreviousControllerVersion)
|
||||||
|
Info("Controller Image: %v", r.ControllerImages[0].print())
|
||||||
|
Info("Controller Chroot Image: %v", r.ControllerImages[1].print())
|
||||||
|
for i := range r.Updates {
|
||||||
|
Info("Update #%v - %v", i, r.Updates[i])
|
||||||
|
}
|
||||||
|
for j := range r.DepUpdates {
|
||||||
|
Info("Dependabot Update #%v - %v", j, r.DepUpdates[j])
|
||||||
|
}
|
||||||
|
}
|
10
magefiles/utils/templates/e2edocs.tpl
Normal file
10
magefiles/utils/templates/e2edocs.tpl
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<!---
|
||||||
|
This file is autogenerated!
|
||||||
|
Do not try to edit it manually.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# e2e test suite for [Ingress NGINX Controller]({{.URL}})
|
||||||
|
|
||||||
|
{{ range $test := .Tests }}
|
||||||
|
{{ $test }}
|
||||||
|
{{- end }}
|
Loading…
Reference in a new issue