types.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.
  11. */
  12. package v1
  13. // A reference to an object in the same namespace as the referent.
  14. type LocalObjectReference struct {
  15. // Name of the resource being referred to.
  16. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  17. Name string `json:"name"`
  18. }
  19. // A reference to a specific 'key' within a Secret resource,
  20. // In some instances, `key` is a required field.
  21. type SecretKeySelector struct {
  22. // The name of the Secret resource being referred to.
  23. LocalObjectReference `json:",inline"`
  24. // Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
  25. // to the namespace of the referent.
  26. // +optional
  27. Namespace *string `json:"namespace,omitempty"`
  28. // The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
  29. // defaulted, in others it may be required.
  30. // +optional
  31. Key string `json:"key,omitempty"`
  32. }