Skip to content

Conversation

@nitishm
Copy link
Contributor

@nitishm nitishm commented Jan 21, 2022

  • Moved files from top level npm/ folder to their own respective folders
    for controller and daemon components
  • Generated new deployment manifests for each components and moved into
    the respective folders under npm/deploy

Signed-off-by: Nitish Malhotra nitishm@microsoft.com

Reason for Change:

Issue Fixed:

Requirements:

Notes:

- Moved files from top level npm/ folder to their own respective folders
  for controller and daemon components
- Generated new deployment manifests for each components and moved into
  the respective folders under npm/deploy

Signed-off-by: Nitish Malhotra <nitishm@microsoft.com>
@nitishm nitishm marked this pull request as draft January 21, 2022 22:08
@nitishm
Copy link
Contributor Author

nitishm commented Jan 21, 2022

Checking this in for tracking. Will port to kustomize in follow up commits.

Signed-off-by: Nitish Malhotra <nitishm@microsoft.com>
@nitishm nitishm marked this pull request as ready for review January 24, 2022 21:17
@nitishm nitishm requested review from huntergregory, matmerr and vakalapa and removed request for matmerr and vakalapa January 24, 2022 21:17
@nitishm nitishm force-pushed the nitishm/feat/kubernetes-yamls-decomposed-mode branch 4 times, most recently from e289220 to 479d729 Compare January 24, 2022 21:41
Signed-off-by: Nitish Malhotra <nitishm@microsoft.com>
@nitishm nitishm force-pushed the nitishm/feat/kubernetes-yamls-decomposed-mode branch from 479d729 to 5360c30 Compare January 24, 2022 21:44
@@ -99,18 +99,12 @@ spec:
volumeMounts:
- name: xtables-lock
mountPath: /run/xtables.lock
- name: log
Copy link
Contributor

Choose a reason for hiding this comment

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

We will need to update this new file location for all tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matmerr mentioned this is obsolete? Do the tests still use this?

Copy link
Contributor

Choose a reason for hiding this comment

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

impacts these:

@huntergregory huntergregory added the npm Related to NPM. label Jan 27, 2022
Copy link
Contributor

@huntergregory huntergregory left a comment

Choose a reason for hiding this comment

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

This is awesome. We should consider better names for services. We are stuck with "npm-metrics-cluster-service" for vanilla npm and npm daemon for Prometheus backwards compatibility. Perhaps we should reserve the term "cluster-metrics" for this service only

@@ -0,0 +1,24 @@
---
apiVersion: v1
kind: ConfigMap
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps a better location: npm/profiles/

Copy link
Contributor

Choose a reason for hiding this comment

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

or we could move profiles/ into deploy/ but there are dependencies on the profiles path

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's move profiles/ to deploy/profiles/ to keep everything together. Can we move all configmap yamls to this folder?

After moving the profiles/ folder, we'll need to update these (similar to the ones for moving azure-npm.yaml):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upstream the common practice is to add deployment manifests to the deploy folder. You keep your helm charts, kustomize, vanilla k8s yamls and any related manifests that get picked up by these resources.
The Configmaps are common to both overlays hence they are in the base folder. If you still think profiles should go there I am happy to do that :)

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense. base/ seems good (as long as the current profiles are in the same folder, for testing sake)

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets not increase the scope of this PR, for now, keep it simple with the filename changes and we can do a separate effort/PR to standardize this process , wdygt ?

@@ -0,0 +1,67 @@

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove empty line

@@ -0,0 +1,24 @@
---
apiVersion: v1
kind: ConfigMap
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this supposed to be used?

Copy link
Contributor

Choose a reason for hiding this comment

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

similarly for npm-serviceaccount.yaml and rbac.yaml in the common/ folder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Common across all deployments (aka overlays in kustomize)

@@ -99,18 +99,12 @@ spec:
volumeMounts:
- name: xtables-lock
mountPath: /run/xtables.lock
- name: log
Copy link
Contributor

Choose a reason for hiding this comment

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

impacts these:

- name: protocols
mountPath: /etc/protocols
- name: azure-npm-config
mountPath: /etc/azure-npm
hostNetwork: true
volumes:
- name: log
Copy link
Contributor

Choose a reason for hiding this comment

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

wondering why we are removing /var/log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matmerr said we are using this in production anymore. I made an assumption it wasn't being used at all. I will add it back in :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Mat said we are or aren't?

Copy link
Contributor

Choose a reason for hiding this comment

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

We are NOT logging to a file anymore so we can safely remove this.

apiVersion: v1
kind: Service
metadata:
name: npm-deamon-metrics-cluster-service
Copy link
Contributor

@huntergregory huntergregory Jan 27, 2022

Choose a reason for hiding this comment

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

per our Prometheus discussion yesterday, we'll need to serve up the same "cluster-metrics" service that we have currently

name: npm-metrics-cluster-service

Copy link
Contributor

Choose a reason for hiding this comment

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

If we add daemon-specific metrics to npm-metrics-cluster-service, then we'll need to update a scrape config owned by Container Insights team

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good point. Can we discuss this on chat?

Signed-off-by: Nitish Malhotra <nitishm@microsoft.com>
…into nitishm/feat/kubernetes-yamls-decomposed-mode

Signed-off-by: Nitish Malhotra <nitishm@microsoft.com>
@huntergregory
Copy link
Contributor

Discussed offline: we can use one service for the daemon (whether for vanilla NPM or the fan-out mode), which will have 3+ endpoints. The current ones will be for customers:

  • /cluster-metrics
  • /node-metrics

and new endpoints can be for internal use

Signed-off-by: Ubuntu <nitishm@acn-dev.a3ahweixzwte5k2rkdoyg14y4b.gx.internal.cloudapp.net>
Ubuntu and others added 3 commits February 1, 2022 21:59
Use the remote port for the client to connect to the k8s service port

Signed-off-by: Nitish Malhotra <nitishm@microsoft.com>
Signed-off-by: Nitish Malhotra <nitishm@Ubuntu-21.10>
Signed-off-by: Nitish Malhotra <nitishm@microsoft.com>
@@ -0,0 +1,10 @@
allow_k8s_contexts('acn-dev-azure-cni')
default_registry('ttl.sh/nitishm-12390')
Copy link
Member

Choose a reason for hiding this comment

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

if this is an ephemeral image can we put it on acnpublic instead?

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 couldnt find how to provide the credentials (plus we don't want the credentials checked in). Need to look into this

"k8s.io/klog"
)

var aiMetadata string //nolint // aiMetadata is set in Makefile
Copy link
Member

Choose a reason for hiding this comment

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

will require further verification of how this is used, but this is set via the Makefile on build in the dockerfile. Not sure of implications with introducing it into subpackages, and/or if aiMetadata is even relevant in this scope if used in the parent npm/

Address: "0.0.0.0",
Port: defaultGrpcPort,
Address: "0.0.0.0",
Port: defaultGrpcPort,
Copy link
Member

Choose a reason for hiding this comment

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

maybe ServerPort to be extra explicit alongside the RemotePort?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ServicePort maybe?

"EnableV2NPM": false,
"PlaceAzureChainFirst": false
},
"Transport": {
Copy link
Member

Choose a reason for hiding this comment

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

can we add this to examples/windows/* manifests too

@vakalapa
Copy link
Contributor

vakalapa commented Feb 4, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Copy link
Contributor

@huntergregory huntergregory left a comment

Choose a reason for hiding this comment

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

Will need to revisit service names when we finalize the fan-out model

@nitishm nitishm merged commit d3aeda7 into Azure:master Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

npm Related to NPM.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants