GitOps for k8s
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

statefulset.go 511B

1234567891011121314151617181920212223242526
  1. package resource
  2. import (
  3. "github.com/fluxcd/flux/image"
  4. "github.com/fluxcd/flux/resource"
  5. )
  6. type StatefulSet struct {
  7. baseObject
  8. Spec StatefulSetSpec
  9. }
  10. type StatefulSetSpec struct {
  11. Replicas int
  12. Template PodTemplate
  13. }
  14. func (ss StatefulSet) Containers() []resource.Container {
  15. return ss.Spec.Template.Containers()
  16. }
  17. func (ss StatefulSet) SetContainerImage(container string, ref image.Ref) error {
  18. return ss.Spec.Template.SetContainerImage(container, ref)
  19. }
  20. var _ resource.Workload = StatefulSet{}