Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Support for additional resources #10

Closed
jason-riddle opened this issue Mar 31, 2016 · 2 comments
Closed

Support for additional resources #10

jason-riddle opened this issue Mar 31, 2016 · 2 comments

Comments

@jason-riddle
Copy link

I don't expect this to be supported anytime soon but I just wanted to bring this up. Kubernetes 1.2 was released about a week ago and with the release it brought a new resource.

Config Map

Now it is possible to use a config map to define your environment variables, an example I threw together is shown here

env:
  - name: TEAMCITY_SERVER_MEM_OPTS
    value: '-Xmx2500m'
  - name: TEAMCITY_SERVER_OPTS
    value: '-Dteamcity.git.fetch.separate.process=false'
  - name: TEAMCITY_DATA_PATH
    value: '/var/lib/teamcity'
  - name: CATALINA_OPTS
    valueFrom:
      configMapKeyRef:
      name: catalina-config
      key: proxy.properties

This isn't supported by the github.com/kubernetes/charts/common/replicatedservice:v2 template at the moment due to the assumption that every entry in env will have the keys 'name' and 'value'.

https://github.com/kubernetes/charts/blob/2ecf8f3cd3a12e36c2d9d4e1faf4ddd531c55838/common/replicatedservice/v2/replicatedservice.py#L192-L194.

for entry in tmp_env:
  if isinstance(entry, dict):
    env.append({'name': entry.get('name'), 'value': entry.get('value')})

Also, it looks like the following aren't supported at the moment as well, which Kubernetes has had prior to 1.2.

Limits and Requests

resources:
  requests:
    memory: "3Gi"
  limits:
    memory: "4Gi"

Liveness Probe

livenessProbe:
  httpGet:
    path: /mnt
    port: 8111
  initialDelaySeconds: 20
  timeoutSeconds: 2

I'd be happy to submit a pull request adding functionality to replicatedservice:v2, but I had a few questions first.

  1. As Kubernetes comes out with support for additional resources, how quickly will these be supported? Is this template (replicatedservice:v2) trying to support all of the resources or only a popular subset?
  2. Should this just be added to v2 or should a v3 be created?
  3. Is someone already aware / working on this and should I just be patient and wait?

I know I can just fork and modify the template to suit my needs and then just use that, but then that wouldn't be any use to the community.

@jackgr
Copy link
Contributor

jackgr commented Apr 4, 2016

@jason-riddle Thanks for the issue.

Yes, we need to support the new resource types. A PR would be most welcome.

Re: questions:

  1. The client and server code in kubernetes/helm are reflective, and don't favor specific resource types, so as far as they're concerned, new types are supported immediately. That said, replicatedservice.py and other charts do need to be updated as new resource types appear. Ideally, we would add support for new types in a given release here at the same time as or shortly after kubernetes/helm moves to that release.
  2. The major version has moved to 3 in kubernetes/helm. We're going to need to move that chart over here, so it'll replace v2. Since the changes are additions and therefore don't break backward compatibility, we should stay with major version 3. However, since they do represent new functionality, we should bump the minor version from 0 to 1. So, let's call it v3.1.
  3. Don't know of anyone else doing it. Please feel free to self assign.

sebgoa pushed a commit that referenced this issue Apr 6, 2016
feat(charts): add more charts
@prydonius
Copy link
Member

Closing this as charts have been cleared as of #18

gdmello added a commit to gdmello/charts that referenced this issue Feb 14, 2019
…byte of ...|thStyle":true,"s3Url|..., bigger context ..."
gdmello added a commit to gdmello/charts that referenced this issue Feb 14, 2019
…byte of ...|thStyle":true,"s3Url|..., bigger context ..."

Signed-off-by: gdmello <gavindmello@gmail.com>
k8s-ci-robot pushed a commit that referenced this issue Feb 19, 2019
… of ...|thStyle":true,"s3Url|..., bigger context ..." (#11427)

Signed-off-by: gdmello <gavindmello@gmail.com>
mhamwala added a commit to mhamwala/helm-charts that referenced this issue Apr 24, 2019
hyperbolic2346 added a commit to hyperbolic2346/charts that referenced this issue Oct 13, 2020
I'm using helm 3 version `version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"clean", GoVersion:"go1.14.9"}` and I can't create this chart with git enabled. The following error is thrown:
```
Error: Deployment in version "v1" cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Env: []v1.EnvVar: v1.EnvVar.Value: ReadString: expects " or n, but found 3, error found in helm#10 byte of ...|,"value":30},{"name"|..., bigger context ...|e":"FETCH_HEAD"},{"name":"GIT_SYNC_WAIT","value":30},{"name":"GIT_SYNC_DEST","value":"/git"}],"image|...
```

This change quotes the timeout and allows chart creation.
hyperbolic2346 added a commit to hyperbolic2346/charts that referenced this issue Oct 13, 2020
I'm using helm 3 version `version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"clean", GoVersion:"go1.14.9"}` and I can't create this chart with git enabled. The following error is thrown:
```
Error: Deployment in version "v1" cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Env: []v1.EnvVar: v1.EnvVar.Value: ReadString: expects " or n, but found 3, error found in helm#10 byte of ...|,"value":30},{"name"|..., bigger context ...|e":"FETCH_HEAD"},{"name":"GIT_SYNC_WAIT","value":30},{"name":"GIT_SYNC_DEST","value":"/git"}],"image|...
```

This change quotes the timeout and allows chart creation.

Signed-off-by: Mike Wilson <knobby@burntsheep.com>
k8s-ci-robot pushed a commit that referenced this issue Nov 8, 2020
* Adding quote to git sync wait

I'm using helm 3 version `version.BuildInfo{Version:"v3.3.4", GitCommit:"a61ce5633af99708171414353ed49547cf05013d", GitTreeState:"clean", GoVersion:"go1.14.9"}` and I can't create this chart with git enabled. The following error is thrown:
```
Error: Deployment in version "v1" cannot be handled as a Deployment: v1.Deployment.Spec: v1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Env: []v1.EnvVar: v1.EnvVar.Value: ReadString: expects " or n, but found 3, error found in #10 byte of ...|,"value":30},{"name"|..., bigger context ...|e":"FETCH_HEAD"},{"name":"GIT_SYNC_WAIT","value":30},{"name":"GIT_SYNC_DEST","value":"/git"}],"image|...
```

This change quotes the timeout and allows chart creation.

Signed-off-by: Mike Wilson <knobby@burntsheep.com>

* updating chart version

Signed-off-by: Mike Wilson <knobby@burntsheep.com>
jonty-uk-gov-mirror pushed a commit to uk-gov-mirror/ministryofjustice.charts that referenced this issue Apr 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants