Coder Social home page Coder Social logo

Comments (6)

mfanjie avatar mfanjie commented on May 18, 2024

can you elaborate more about what's the reason of putting the recommendation to annotation?

from crane.

qmhu avatar qmhu commented on May 18, 2024

Currently we put the recommendation result in recommendation.status like this:

apiVersion: analysis.crane.io/v1alpha1
kind: Analytics
metadata:
  name: craned-hpa
  namespace: crane-system
spec:
  completionStrategy:
    completionStrategyType: Periodical
    periodSeconds: 86400
  resourceSelectors:
  - apiVersion: apps/v1
    kind: Deployment
    labelSelector: {}
    name: craned
  type: HPA
status:
  lastSuccessfulTime: "2022-01-13T07:26:18Z"
  recommendations:
  - apiVersion: analysis.crane.io/v1alpha1
    kind: Recommendation
    name: craned-hpa-hpa-2f22w
    namespace: crane-system
    uid: 397733ee-986a-4630-af75-736d2b58bfac

We can also put the result into target's annotation, then user can view the result from target's annotation, it's convenient for dashboard requirements and so on.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: php-apache
  annotations:
    analysis.crane.io/recommend-hpa: {json encoded string}

from crane.

mfanjie avatar mfanjie commented on May 18, 2024

firstly I think the reference is defined in Analytics and Recommendation, so if dashboard need the relation, it can get directly.
secondly, if we really want a reversed annotation in deployment, the recommendation name is enough already, right?

from crane.

qmhu avatar qmhu commented on May 18, 2024

firstly I think the reference is defined in Analytics and Recommendation, so if dashboard need the relation, it can get directly. secondly, if we really want a reversed annotation in deployment, the recommendation name is enough already, right?

If customer have a deployment list and want to show the recommendation about it, if we only provide name, then they need to fetch N times to get all deployment's recommendation.

from crane.

qmhu avatar qmhu commented on May 18, 2024

Api design :
gocrane/api#40

from crane.

qmhu avatar qmhu commented on May 18, 2024

implement by #192

from crane.

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.