diff --git a/dzver/app.py b/dzver/app.py index 05aad9f..0764281 100644 --- a/dzver/app.py +++ b/dzver/app.py @@ -19,6 +19,8 @@ def json_all_the_things(): k3s_data = json.loads(requests.get("https://update.k3s.io/v1-release/channels").text) k3s_out = json.dumps(k3s_data["data"][0]["latest"]).replace('"', '') + + k3s_rke_out = json.dumps(k3s_data["data"][1]["latest"]).replace('"', '') cert_data = json.loads(requests.get("https://api.github.com/repos/cert-manager/cert-manager/releases/latest", headers=headers).text) cert_out = json.dumps(cert_data["tag_name"]).replace('"', '') @@ -38,7 +40,7 @@ def json_all_the_things(): hauler_data = json.loads(requests.get("https://api.github.com/repos/rancherfederal/hauler/releases/latest", headers=headers).text) hauler_out = json.dumps(hauler_data["tag_name"]).replace('"', '') - return jsonify({'k3s': k3s_out, 'rke2 stable': rke_out, 'rke latest': late_rke_out, 'cert-manager': cert_out, 'rancher': rancher_out, 'longhorn': longhorn_out, 'neuvector': neuvector_out, 'harvester': harvester_out, 'hauler': hauler_out}), 200 + return jsonify({'k3s stable': k3s_out, 'k3s latest': k3s_rke_out, 'rke2 stable': rke_out, 'rke latest': late_rke_out, 'cert-manager': cert_out, 'rancher': rancher_out, 'longhorn': longhorn_out, 'neuvector': neuvector_out, 'harvester': harvester_out, 'hauler': hauler_out}), 200 @app.route('/', methods=['GET']) def curl_all_the_things(): @@ -49,6 +51,8 @@ def curl_all_the_things(): k3s_data = json.loads(requests.get("https://update.k3s.io/v1-release/channels").text) k3s_out = json.dumps(k3s_data["data"][0]["latest"]).replace('"', '') + + k3s_rke_out = json.dumps(k3s_data["data"][1]["latest"]).replace('"', '') cert_data = json.loads(requests.get("https://api.github.com/repos/cert-manager/cert-manager/releases/latest", headers=headers).text) cert_out = json.dumps(cert_data["tag_name"]).replace('"', '') @@ -68,7 +72,7 @@ def curl_all_the_things(): hauler_data = json.loads(requests.get("https://api.github.com/repos/rancherfederal/hauler/releases/latest", headers=headers).text) hauler_out = json.dumps(hauler_data["tag_name"]).replace('"', '') - return render_template('index.html', rancher_ver=rancher_out, rke_ver=rke_out, late_rke_ver=late_rke_out, k3s_ver=k3s_out, longhorn_ver=longhorn_out, neu_ver=neuvector_out, cert_ver=cert_out, harv_ver=harvester_out, hauler_ver=hauler_out) + return render_template('index.html', rancher_ver=rancher_out, rke_ver=rke_out, late_rke_ver=late_rke_out, k3s_ver=k3s_out, late_k3s_ver=k3s_rke_out, longhorn_ver=longhorn_out, neu_ver=neuvector_out, cert_ver=cert_out, harv_ver=harvester_out, hauler_ver=hauler_out) if __name__ == '__main__': app.run(host='0.0.0.0',debug=False) diff --git a/dzver/templates/index.html b/dzver/templates/index.html index 6574eed..945fcdc 100644 --- a/dzver/templates/index.html +++ b/dzver/templates/index.html @@ -23,6 +23,10 @@

Latest Rancher Stack Versions

K3s - Stable {{k3s_ver}} + + K3s - Latest + {{late_k3s_ver}} + Rancher {{rancher_ver}}