Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 22.0.0 #3758

Open
brendandburns opened this issue Oct 23, 2024 · 2 comments
Open

Release 22.0.0 #3758

brendandburns opened this issue Oct 23, 2024 · 2 comments
Assignees

Comments

@brendandburns
Copy link
Contributor

@yue9944882 I think we're ready to release 22.0.0 in support of Kubernetes 1.31.x.

Any concerns?

@rjeberhard
Copy link
Contributor

Will you continue to release "legacy" versions? I'm hoping that these versions will continue to be supported until the issue with empty maps is resolved. Note: I really like the new non-legacy API's but am blocked from upgrading our projects.

@souravthedifferent
Copy link

public void updateKeyStoreInSecret(
            @NonNull final KeyStore keyStore,
            @NonNull final String keyStorePassword,
            @NonNull final String secretKeyName)
            throws KubernetesException {

        final ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
        try {
            keyStore.store(byteStream, keyStorePassword.toCharArray());
        } catch (KeyStoreException | IOException | NoSuchAlgorithmException | CertificateException ex) {
            throw new KubernetesException("Cannot store keystore", ex);
        }
        final PatchBody patchBody =
                new PatchBody(
                        PATCH_ADD_OPERATION,
                        String.format(SECRET_KEY_NAME_PATH + secretKeyName),
                        Base64.getEncoder().encodeToString(byteStream.toByteArray()));

        final V1Secret v1Secret;

        try {
            final V1Patch patch = new V1Patch(new ObjectMapper().writeValueAsString(List.of(patchBody)));
            v1Secret =
                    kubernetesClientCoreApi
                            .patchNamespacedSecret(getSecretName(), namespace, patch)
                            .execute();
        } catch (final ApiException | JsonProcessingException e) {
            final String errorMessage =
                    String.format("Failed to update secret %s in namespace %s", secretKeyName, namespace);
            log.error("error in updateKeyStoreInSecret :{}{}", e.getMessage(), e.getCause(), e);
            throw new KubernetesException(errorMessage, e);
        }

        if (v1Secret == null || v1Secret.getData() == null) {
            final String errorMessage = String.format("Failed to update secret %s", secretKeyName);
            throw new KubernetesException(errorMessage);
        }
    }

This is not working with 22.0.0 but used to work with 19.0.0. Could you pls convert it to PatchUtils compatible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants