Giter Club home page Giter Club logo

jenkins-service's People

Contributors

christian-kreuzberger-dtx avatar grabnerandi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

jenkins-service's Issues

Use k8s ServiceAccount with a restricted set of permissions instead of default

Currently, the service uses the default Service Account with a set of high privileges inside the k8s clusters.

Use a dedicated service account with a minimum set of privileges as described in our contributing guidelines here keptn-sandbox/contributing#2

Definition of Done:

  • Service either uses the keptn-default Service Account which has no privileges at all or a new, dedicated Service Account with a minimal set of permissions

Wrong order of GetServiceResources

Hi,

the order of the parameters is wrong in this Line
https://github.com/keptn-sandbox/jenkins-service/blob/master/jenkinshelper.go#L51

Right now it is:

keptnResourceContent, err := resourceHandler.GetServiceResource(keptnEvent.service, keptnEvent.stage, keptnEvent.project, JenkinsConfigFilename)

but should be
keptnResourceContent, err := resourceHandler.GetServiceResource(keptnEvent.project, keptnEvent.stage, keptnEvent.service, JenkinsConfigFilename)

From resourceUtils.go

// GetServiceResource retrieves a service resource from the configuration service
func (r *ResourceHandler) GetServiceResource(project string, stage string, service string, resourceURI string) (*models.Resource, error) {
	return r.getResource(r.Scheme + "://" + r.BaseURL + "/v1/project/" + project + "/stage/" + stage + "/service/" + url.QueryEscape(service) + "/resource/" + url.QueryEscape(resourceURI))
}

Cheers,

Christian

Upgrade keptn/distributor to 0.8.4 for properly showing up at the integrations page in Keptn Bridge

In Keptn 0.8.4, the distributor will be extended with the functionality of registering itself as a Keptn uniform integration at the Keptn's Uniform API.

Related Video with short Tutorial (part of community meeting on June 17th): https://youtu.be/oZlf1v5qUvc?t=436

Goal: The integration/service should be visible in Keptn's Bridge Uniform screen:
image

If you have any questions, please reply to keptn/keptn#4418


To enable this feature, the following changes need to be made:

First, the image of the distributor container of the deployment needs to be set to keptn/distributor:0.8.4:

        - name: distributor
              image: keptn/distributor:0.8.4

Second, locate the env section of the distributor container:

        - name: distributor
          image: keptn/distributor:0.8.4
          resources: ...
          env:
            ...

and add the following environment variables:

            - name: VERSION
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: 'metadata.labels[''app.kubernetes.io/version'']'
            - name: K8S_DEPLOYMENT_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: 'metadata.labels[''app.kubernetes.io/name'']'
            - name: K8S_POD_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.name
            - name: K8S_NAMESPACE
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
            - name: K8S_NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName

Last but not least, ensure that the labels app.kubernetes.io/version and app.kubernetes.name are available under spec.template.metadata.labels in the K8s deployment:

        app.kubernetes.io/name: dynatrace-service
        app.kubernetes.io/version: 0.14.1

You can find a complete example of deployment.yaml (or service.yaml) here: https://github.com/keptn-contrib/unleash-service/blob/release-0.3.2/deploy/service.yaml

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.