Skip to content
Snippets Groups Projects
Commit 8c3f5f08 authored by Smana's avatar Smana
Browse files

change licence to apache2

parent c4beee38
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2016 Kubespray
# #
# This file is part of Kargo. # 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
# #
# Foobar is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# #
# Foobar is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU General Public License
# along with Foobar. If not, see <http://www.gnu.org/licenses/>.
import os import os
import sys import sys
import hashlib import hashlib
...@@ -90,11 +89,22 @@ if __name__ == '__main__': ...@@ -90,11 +89,22 @@ if __name__ == '__main__':
) )
args = parser.parse_args() args = parser.parse_args()
file_sub('../roles/kubernetes/node/defaults/main.yml', r'.*hyperkube_image_repo.*', 'hyperkube_image_repo: "%s"' % args.docker_repository) kargo_root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
file_sub('../roles/kubernetes/node/defaults/main.yml', r'.*hyperkube_image_tag.*', 'hyperkube_image_tag: "%s"' % args.kube_version)
file_sub(
os.path.join(kargo_root_path, 'roles/kubernetes/node/defaults/main.yml'),
r'.*hyperkube_image_repo.*', 'hyperkube_image_repo: "%s"' % args.docker_repository
)
file_sub(
os.path.join(kargo_root_path, 'roles/kubernetes/node/defaults/main.yml'),
r'.*hyperkube_image_tag.*', 'hyperkube_image_tag: "%s"' % args.kube_version
)
kube_binaries = ['kubelet', 'kubectl', 'kube-apiserver'] kube_binaries = ['kubelet', 'kubectl', 'kube-apiserver']
var_files = ['../roles/uploads/vars/kube_versions.yml', '../roles/download/vars/kube_versions.yml'] var_files = [
os.path.join(kargo_root_path, 'roles/uploads/vars/kube_versions.yml'),
os.path.join(kargo_root_path, 'roles/download/vars/kube_versions.yml')
]
kube_download_url = "https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/amd64" % args.kube_version kube_download_url = "https://storage.googleapis.com/kubernetes-release/release/%s/bin/linux/amd64" % args.kube_version
new = get_kube_sha256(args.kube_version, kube_download_url, kube_binaries) new = get_kube_sha256(args.kube_version, kube_download_url, kube_binaries)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment