Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAISTRA-1575 create new SMCP structure for Istio 1.6 #467

Merged
merged 20 commits into from
Jul 13, 2020

Conversation

rcernich
Copy link
Contributor

New SMCP structure that better organizes (I hope) configuration settings.

@rcernich
Copy link
Contributor Author

rcernich commented Jul 2, 2020

The first cut at a new structure for SMCP is complete. Still to do:

  • Verify installation still works with 1.0/1.1
  • Integrate istio 1.6 charts
  • Write conversion code from v1 to v2
  • Add conversion webhook

@lgtm-com
Copy link

lgtm-com bot commented Jul 2, 2020

This pull request introduces 2 alerts and fixes 2 when merging c4a3dbc into 32740c9 - view on LGTM.com

new alerts:

  • 2 for Useless assignment to local variable

fixed alerts:

  • 2 for Size computation for allocation may overflow

@lgtm-com
Copy link

lgtm-com bot commented Jul 2, 2020

This pull request fixes 2 alerts when merging d87387b into 32740c9 - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

@rcernich
Copy link
Contributor Author

rcernich commented Jul 2, 2020

@dgn, here's a link to some example yaml for the new structure: https://github.com/maistra/istio-operator/blob/6121c576086fbe56edb04f957f8fff24193d657c/pkg/apis/maistra/v2/smcp_new.yaml

I've also sprinkled the code with XXX comments where I'm unsure about things or need to come back and fix/decide what to do (e.g. maybe some settings don't map to values.yaml, but should be supported).

@lgtm-com
Copy link

lgtm-com bot commented Jul 2, 2020

This pull request fixes 2 alerts when merging 6121c57 into 32740c9 - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

@rcernich
Copy link
Contributor Author

rcernich commented Jul 2, 2020

I'm currently using enabled = !null in a lot of places, and I'm not sure whether or not I should include an explicit "enabled" field.

@lgtm-com
Copy link

lgtm-com bot commented Jul 2, 2020

This pull request fixes 2 alerts when merging 87e755d into 32740c9 - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

@rcernich
Copy link
Contributor Author

rcernich commented Jul 2, 2020

SMCP reconciler has been converted to use v2 resource and all unit tests are passing. I think there are some differences in the way things are defaulted, e.g. gateways.ingress and gateways.egress must be specified, as should policy, telemetry, and the various addons, which I think were all enabled by default. (See my comment above about having a separate enabled field, as opposed to using enabled = field != nil.)

@lgtm-com
Copy link

lgtm-com bot commented Jul 2, 2020

This pull request fixes 2 alerts when merging 8221b4a into 32740c9 - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

@lgtm-com
Copy link

lgtm-com bot commented Jul 7, 2020

This pull request fixes 2 alerts when merging 63bb20a into 32740c9 - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

@lgtm-com
Copy link

lgtm-com bot commented Jul 8, 2020

This pull request fixes 2 alerts when merging 8a091b0 into 32740c9 - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

@lgtm-com
Copy link

lgtm-com bot commented Jul 8, 2020

This pull request fixes 2 alerts when merging e5b6857 into 32740c9 - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

@lgtm-com
Copy link

lgtm-com bot commented Jul 8, 2020

This pull request fixes 2 alerts when merging 112af55 into 32740c9 - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
Signed-off-by: rcernich <rcernich@redhat.com>
@lgtm-com
Copy link

lgtm-com bot commented Jul 8, 2020

This pull request fixes 2 alerts when merging b60115d into ee739ef - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

Signed-off-by: rcernich <rcernich@redhat.com>
@lgtm-com
Copy link

lgtm-com bot commented Jul 8, 2020

This pull request fixes 2 alerts when merging c981148 into ee739ef - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

Signed-off-by: rcernich <rcernich@redhat.com>
@rcernich rcernich changed the title WIP: MAISTRA-1575 create new SMCP structure for Istio 1.6 MAISTRA-1575 create new SMCP structure for Istio 1.6 Jul 9, 2020
@mergify mergify bot removed the work in progress label Jul 9, 2020
@rcernich
Copy link
Contributor Author

rcernich commented Jul 9, 2020

This is working for v1.1 installs.

@lgtm-com
Copy link

lgtm-com bot commented Jul 9, 2020

This pull request fixes 2 alerts when merging 0363dca into ee739ef - view on LGTM.com

fixed alerts:

  • 2 for Size computation for allocation may overflow

with children
properties:
children:
description: 'TODO: can we remove this? it''s not used anywhere
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planning on removing hte TODO before merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I anticipate a couple of rounds of cleanup, so not at this point. I need to get this in so we can start getting 2.0 installations going. This is a pretty big change and needs a lot of eyeballs and a proper design review. I don't anticipate this being the final revision, but a starting point to get it dialed in.

Copy link
Contributor

@dgn dgn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting this, Rob. I added a few comments but they don't have to be addressed in this PR. Generally, I think we should finalize the spec asap and then start working on documentation - because that'll become really important with this change

)

const (
imageNameSDS = "node-agent-k8s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this used for? upstream 1.5+ does not have this anymore, and we never shipped it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just trying to cover the full range of items and wasn't sure if this was something special for gateways. It can be removed.

type: Jaeger # or Zipkin, Lightstep, Datadog, Stackdriver
jaeger:
name: jaeger # name of Jaeger CR to reference/create
install: # create a jaeger CR if it doesn't already exist
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you trigger installation? just by settings any values under install?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if install is not null, maistra will create a CR with the settings. If a CR already exists, no action will be taken.

pod: {}
kiali:
name: kiali # kiali CR to create/reference
install: # install kiali CR if not present
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should nest the options underneath install, because every addon setting we provide will be an installation setting. maybe install should just be the bool that determines whether the addon is managed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to preserve the existing behavior, where the maistra operator installs and manages these things. The difference is, once installed, maistra will only manage certain fields in the CR. For example, in the case of Kiali, the settings for grafana, prometheus, and jaeger, and possibly the version (to ensure it is compatible with the control plane version).

@mergify mergify bot merged commit 20344b0 into maistra:maistra-1.2 Jul 13, 2020
@mergify mergify bot removed the ready to merge label Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants