@Override public void visit(SecretBuilder element) { final Map<String, String> annotations = element.buildMetadata().getAnnotations(); try { final Map<String, String> secretAnnotations = createSecretFromAnnotations(annotations); element.addToData(secretAnnotations); } catch (IOException e) { throw new IllegalArgumentException(e); } } });
@Override public void visit(SecretBuilder secretBuilder) { Map<String, String> annotation = secretBuilder.buildMetadata().getAnnotations(); if (!annotation.containsKey(getAnnotationKey())) { return; } String dockerId = annotation.get(getAnnotationKey()); Map<String, String> data = generateData(dockerId); if (data == null) { return; } // remove the annotation key annotation.remove(getAnnotationKey()); secretBuilder.addToData(data); } });
@Override public void visit(SecretBuilder secretBuilder) { Map<String, String> annotation = secretBuilder.buildMetadata().getAnnotations(); if (!annotation.containsKey(getAnnotationKey())) { return; } String dockerId = annotation.get(getAnnotationKey()); Map<String, String> data = generateData(dockerId); if (data == null) { return; } // remove the annotation key annotation.remove(getAnnotationKey()); secretBuilder.addToData(data); } });
.addToData("password", Base64.getEncoder().encodeToString("secret".getBytes(UTF_8))) .build();
.addToData("password", Base64.getEncoder().encodeToString("secret".getBytes(UTF_8))) .build();