diff --git a/api/v1/search/zz_generated.deepcopy.go b/api/v1/search/zz_generated.deepcopy.go index c66322146..d18d025f8 100644 --- a/api/v1/search/zz_generated.deepcopy.go +++ b/api/v1/search/zz_generated.deepcopy.go @@ -159,7 +159,7 @@ func (in *MongoDBSearchSpec) DeepCopyInto(out *MongoDBSearchSpec) { *out = new(v1.ResourceRequirements) (*in).DeepCopyInto(*out) } - out.Security = in.Security + in.Security.DeepCopyInto(&out.Security) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MongoDBSearchSpec. @@ -231,7 +231,11 @@ func (in *MongoDBSource) DeepCopy() *MongoDBSource { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Security) DeepCopyInto(out *Security) { *out = *in - out.TLS = in.TLS + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(TLS) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Security. diff --git a/scripts/release/kubectl_mongodb/python/promote_kubectl_plugin.py b/scripts/release/kubectl_mongodb/python/promote_kubectl_plugin.py index 73aacd239..efc2687c2 100644 --- a/scripts/release/kubectl_mongodb/python/promote_kubectl_plugin.py +++ b/scripts/release/kubectl_mongodb/python/promote_kubectl_plugin.py @@ -243,6 +243,13 @@ def download_artifacts_from_s3(release_version: str, commit_sha: str, staging_s3 return True +def set_permissions_filter(tarinfo): + if tarinfo.name == "kubectl-mongodb": + # This is the binary, make it executable: rwxr-xr-x + tarinfo.mode = 0o755 + return tarinfo + + # create_tarballs creates `.tar.gz` archives for the artifacts that before promoting them. def create_tarballs(): logger.info(f"Creating archives for subdirectories in {LOCAL_ARTIFACTS_DIR}") @@ -256,7 +263,14 @@ def create_tarballs(): archive_name = f"{dir_name}.tar.gz" with tarfile.open(archive_name, "w:gz") as tar: - tar.add(dir_name) + # Iterate over the contents of the subdirectory (e.g., 'kubectl-mongodb_linux_s390x') + # and add them one by one. + for item_name in os.listdir(dir_name): + full_item_path = os.path.join(dir_name, item_name) + # Add just the binary (kubectl-mongodb_None_linux_s390x/kubectl-mongodb) to the tar + # instead of adding the dir. + # filter is passed to make the binary file executable + tar.add(full_item_path, arcname=item_name, filter=set_permissions_filter) full_archive_path = os.path.join(original_cwd, LOCAL_ARTIFACTS_DIR, archive_name) logger.info(f"Successfully created archive at {full_archive_path}")