Giter Club home page Giter Club logo

Comments (3)

pb82 avatar pb82 commented on May 20, 2024 1

@AdheipSingh I ran the automatic code generation against master (operator-sdk generate k8s) and it doesn't look like anything is missing. Since the deployment spec is added as a pointer in the grafana type spec, I don't think we need a layer of deepcopy for it.

Are you seeing any issues with this on master?

from grafana-operator.

pb82 avatar pb82 commented on May 20, 2024 1

@AdheipSingh No, i don't think we should manually add anything to the auto generated code. Closing this issue as i don't think there's a problem with the auto generated code.

from grafana-operator.

AdheipSingh avatar AdheipSingh commented on May 20, 2024

@pb82 yes i see that, the only thing which concerned me is that replicas were not included in the deepcopy objects whereas annotations and labels were rightly present.

I ran the same command but strange it does'nt genereate deepcopy for replicas.

Don't you think replicas should also be added in this, as the deployment spec also includes the replica paramenter. Maybe i am missing on some thing.

func (in *GrafanaDeployment) DeepCopyInto(out *GrafanaDeployment) {
	*out = *in
	if in.Replicas != nil {
		in, out := &in.Replicas, &out.Replicas
		*out = new(int32)
		**out = **in
	}
	if in.Annotations != nil {
		in, out := &in.Annotations, &out.Annotations
		*out = make(map[string]string, len(*in))
		for key, val := range *in {
			(*out)[key] = val
		}
	}
	if in.Labels != nil {
		in, out := &in.Labels, &out.Labels
		*out = make(map[string]string, len(*in))
		for key, val := range *in {
			(*out)[key] = val
		}
	}
	return
}

from grafana-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.