1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/osdk-java-controller-labels-memcached.adoc
Andrew Taylor c61d8f0384 OSDOCS-2933 Java OSDK
peer review feedback

SME/QE review

final review feedback
2022-07-22 13:43:37 +00:00

19 lines
589 B
Plaintext

// Module included in the following assemblies:
//
// * operators/operator_sdk/java/osdk-java-tutorial.adoc
:_content-type: CONCEPT
[id="osdk-java-controller-labels-memcached_{context}"]
= Defining `labelsForMemcached`
`labelsForMemcached` is a utility to return a map of the labels to attach to the resources:
[source,java]
----
private Map<String, String> labelsForMemcached(Memcached m) {
Map<String, String> labels = new HashMap<>();
labels.put("app", "memcached");
labels.put("memcached_cr", m.getMetadata().getName());
return labels;
}
----