Skip to content

Commit

Permalink
Remove daemonset code
Browse files Browse the repository at this point in the history
  • Loading branch information
sjberman committed Feb 11, 2025
1 parent ef71abb commit 8265e5d
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 6,902 deletions.
23 changes: 1 addition & 22 deletions apis/v1alpha2/nginxproxy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,22 +358,14 @@ const (
NginxPlusAllowIPAddressType NginxPlusAllowAddressType = "IPAddress"
)

// Kubernetes contains the configuration for the nginx deployment and service Kubernetes objects.
// +kubebuilder:validation:XValidation:message="Only one of deployment or daemonset can be specified",rule="((!has(self.deployment) && !has(self.daemonset)) || (has(self.deployment) && !has(self.daemonset)) || (!has(self.deployment) && has(self.daemonset)))"
//
//nolint:lll
// KubernetesSpec contains the configuration for the nginx deployment and service Kubernetes objects.
type KubernetesSpec struct {
// Deployment is the configuration for the nginx Deployment.
// This is the default deployment option.
//
// +optional
Deployment *DeploymentSpec `json:"deployment,omitempty"`

// DaemonSet is the configuration for the nginx DaemonSet.
//
// +optional
DaemonSet *DaemonSetSpec `json:"daemonset,omitempty"`

// Service is the configuration for the nginx Service.
//
// +optional
Expand All @@ -398,19 +390,6 @@ type DeploymentSpec struct {
Container ContainerSpec `json:"container,omitempty"`
}

// DaemonSet is the configuration for the nginx DaemonSet.
type DaemonSetSpec struct {
// Pod defines Pod-specific fields.
//
// +optional
Pod PodSpec `json:"pod,omitempty"`

// Container defines container fields for the nginx container.
//
// +optional
Container ContainerSpec `json:"container,omitempty"`
}

// PodSpec defines Pod-specific fields.
type PodSpec struct {
// TerminationGracePeriodSeconds is the optional duration in seconds the pod needs to terminate gracefully.
Expand Down
22 changes: 0 additions & 22 deletions apis/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions charts/nginx-gateway-fabric/templates/nginxproxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,6 @@ spec:
{{- end }}
image:
{{- toYaml .Values.nginx.image | nindent 10 }}
{{- else if eq .Values.nginx.kind "daemonset" }}
daemonset:
{{- if .Values.nginx.pod }}
pod:
{{- toYaml .Values.nginx.pod | nindent 8 }}
{{- end }}
container:
{{- if .Values.nginx.container }}
{{- toYaml .Values.nginx.container | nindent 8 }}
{{- end }}
image:
{{- toYaml .Values.nginx.image | nindent 10 }}
{{- end }}
{{- if .Values.nginx.service }}
service:
Expand Down
3 changes: 1 addition & 2 deletions charts/nginx-gateway-fabric/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@
"default": "deployment",
"description": "The kind of NGINX deployment.",
"enum": [
"deployment",
"daemonset"
"deployment"
],
"required": [],
"title": "kind"
Expand Down
1 change: 0 additions & 1 deletion charts/nginx-gateway-fabric/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ nginx:
# @schema
# enum:
# - deployment
# - daemonset
# @schema
# -- The kind of NGINX deployment.
kind: deployment
Expand Down
3,388 changes: 0 additions & 3,388 deletions config/crd/bases/gateway.nginx.org_nginxproxies.yaml

Large diffs are not rendered by default.

3,388 changes: 0 additions & 3,388 deletions deploy/crds.yaml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions internal/mode/static/provisioner/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,6 @@ func (p *NginxProvisioner) buildImage(nProxyCfg *graph.EffectiveNginxProxy) (str
if nProxyCfg != nil && nProxyCfg.Kubernetes != nil {
if nProxyCfg.Kubernetes.Deployment != nil {
image, tag, pullPolicy = getImageAndPullPolicy(nProxyCfg.Kubernetes.Deployment.Container)
} else if nProxyCfg.Kubernetes.DaemonSet != nil {
image, tag, pullPolicy = getImageAndPullPolicy(nProxyCfg.Kubernetes.DaemonSet.Container)
}
}

Expand Down
66 changes: 1 addition & 65 deletions site/content/reference/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,6 @@ sigs.k8s.io/gateway-api/apis/v1alpha2.PolicyStatus
</h3>
<p>
(<em>Appears on: </em>
<a href="#gateway.nginx.org/v1alpha2.DaemonSetSpec">DaemonSetSpec</a>,
<a href="#gateway.nginx.org/v1alpha2.DeploymentSpec">DeploymentSpec</a>)
</p>
<p>
Expand Down Expand Up @@ -2065,54 +2064,6 @@ until the action is complete, unless the container process fails, in which case
</tr>
</tbody>
</table>
<h3 id="gateway.nginx.org/v1alpha2.DaemonSetSpec">DaemonSetSpec
<a class="headerlink" href="#gateway.nginx.org%2fv1alpha2.DaemonSetSpec" title="Permanent link">¶</a>
</h3>
<p>
(<em>Appears on: </em>
<a href="#gateway.nginx.org/v1alpha2.KubernetesSpec">KubernetesSpec</a>)
</p>
<p>
<p>DaemonSet is the configuration for the nginx DaemonSet.</p>
</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>pod</code><br/>
<em>
<a href="#gateway.nginx.org/v1alpha2.PodSpec">
PodSpec
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Pod defines Pod-specific fields.</p>
</td>
</tr>
<tr>
<td>
<code>container</code><br/>
<em>
<a href="#gateway.nginx.org/v1alpha2.ContainerSpec">
ContainerSpec
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Container defines container fields for the nginx container.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="gateway.nginx.org/v1alpha2.DeploymentSpec">DeploymentSpec
<a class="headerlink" href="#gateway.nginx.org%2fv1alpha2.DeploymentSpec" title="Permanent link">¶</a>
</h3>
Expand Down Expand Up @@ -2319,7 +2270,7 @@ PullPolicy
<a href="#gateway.nginx.org/v1alpha2.NginxProxySpec">NginxProxySpec</a>)
</p>
<p>
<p>Kubernetes contains the configuration for the nginx deployment and service Kubernetes objects.</p>
<p>KubernetesSpec contains the configuration for the nginx deployment and service Kubernetes objects.</p>
</p>
<table class="table table-bordered table-striped">
<thead>
Expand All @@ -2346,20 +2297,6 @@ This is the default deployment option.</p>
</tr>
<tr>
<td>
<code>daemonset</code><br/>
<em>
<a href="#gateway.nginx.org/v1alpha2.DaemonSetSpec">
DaemonSetSpec
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>DaemonSet is the configuration for the nginx DaemonSet.</p>
</td>
</tr>
<tr>
<td>
<code>service</code><br/>
<em>
<a href="#gateway.nginx.org/v1alpha2.ServiceSpec">
Expand Down Expand Up @@ -2805,7 +2742,6 @@ be unique across all targetRef entries in the ObservabilityPolicy.</p>
</h3>
<p>
(<em>Appears on: </em>
<a href="#gateway.nginx.org/v1alpha2.DaemonSetSpec">DaemonSetSpec</a>,
<a href="#gateway.nginx.org/v1alpha2.DeploymentSpec">DeploymentSpec</a>)
</p>
<p>
Expand Down

0 comments on commit 8265e5d

Please sign in to comment.