mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Add a deprecation note to k/k/cluster/log-dump directory
This commit is contained in:
		
							
								
								
									
										19
									
								
								cluster/log-dump/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								cluster/log-dump/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					## This directory is deprecated!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Log dumping utility was ported from kubernetes/kubernetes repository to
 | 
				
			||||||
 | 
					[kubernetes/test-infra](https://github.com/kubernetes/test-infra/tree/master/logexporter/cluster).
 | 
				
			||||||
 | 
					If you require changes to this script, please consider migrating your jobs to use the new
 | 
				
			||||||
 | 
					log dumping mechanism first.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Currently, `log-dump.sh` file is added to every newly released `kubekins-e2e` image.
 | 
				
			||||||
 | 
					In order to leverage that script, add `USE_KUBEKINS_LOG_DUMPING` environment variable
 | 
				
			||||||
 | 
					to your test job and set its value to `true`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Migration steps
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For the time being, only GCE and GKE providers are supported by the log-dump mechanism.
 | 
				
			||||||
 | 
					To make the mechanism support your Kubernetes provider in tests using `kubekins-e2e`, modify
 | 
				
			||||||
 | 
					the `logDumpPath` function in
 | 
				
			||||||
 | 
					[kubetest](https://github.com/kubernetes/test-infra/tree/master/kubetest) to handle your provider and
 | 
				
			||||||
 | 
					adapt [log-dump.sh](https://github.com/kubernetes/test-infra/blob/master/logexporter/cluster/log-dump.sh)
 | 
				
			||||||
 | 
					in accord to your needs.
 | 
				
			||||||
@@ -71,6 +71,15 @@ logexporter_failed=0
 | 
				
			|||||||
# process will exit with a non-zero exit code).
 | 
					# process will exit with a non-zero exit code).
 | 
				
			||||||
readonly log_dump_expected_success_percentage="${LOG_DUMP_EXPECTED_SUCCESS_PERCENTAGE:-0}"
 | 
					readonly log_dump_expected_success_percentage="${LOG_DUMP_EXPECTED_SUCCESS_PERCENTAGE:-0}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function print-deprecation-note() {
 | 
				
			||||||
 | 
					  local -r dashline=$(printf -- '-%.0s' {1..100})
 | 
				
			||||||
 | 
					  echo "${dashline}"
 | 
				
			||||||
 | 
					  echo "k/k version of the log-dump.sh script is deprecated!"
 | 
				
			||||||
 | 
					  echo "Please migrate your test job to use test-infra's repo version of log-dump.sh!"
 | 
				
			||||||
 | 
					  echo "Migration steps can be found in the readme file."
 | 
				
			||||||
 | 
					  echo "${dashline}"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# TODO: Get rid of all the sourcing of bash dependencies eventually.
 | 
					# TODO: Get rid of all the sourcing of bash dependencies eventually.
 | 
				
			||||||
function setup() {
 | 
					function setup() {
 | 
				
			||||||
  KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
 | 
					  KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
 | 
				
			||||||
@@ -670,6 +679,7 @@ function detect_node_failures() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function main() {
 | 
					function main() {
 | 
				
			||||||
 | 
					  print-deprecation-note
 | 
				
			||||||
  setup
 | 
					  setup
 | 
				
			||||||
  kube::util::ensure-temp-dir
 | 
					  kube::util::ensure-temp-dir
 | 
				
			||||||
  # Copy master logs to artifacts dir locally (through SSH).
 | 
					  # Copy master logs to artifacts dir locally (through SSH).
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user