mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
19 lines
589 B
Plaintext
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;
|
|
}
|
|
---- |